Model Context Protocol - connecting AI to your enterprise tools
What MCP is and how to use it in your projects
Model Context Protocol - connecting AI to your enterprise tools
One of the things that limits AI agents in enterprise settings is getting them connected to your actual data and tools. You can build a great agent but if it cant talk to your CRM, your file system or your internal APIs then its usefulness is limited.
Model Context Protocol, or MCP, is an open standard that was introduced by Anthropic and has since been adopted by many of the major AI platforms including Microsoft. The idea is simple - instead of every AI application building its own custom integrations, you build an MCP server that exposes your tools and data, and any MCP-compatible client can use it.
Think of it like a USB standard for AI tool integrations. You build the connector once and it works with any compatible AI client.
How MCP works
An MCP server exposes three things:
- Tools - functions the AI can call to take actions e.g. create a ticket, send an email
- Resources - data sources the AI can read from e.g. documents, database records
- Prompts - reusable prompt templates for common tasks
The AI client connects to the MCP server and discovers what is available. When the AI decides it needs to use a tool, it sends a request to the MCP server which executes the action and returns the result.
Building a simple MCP server in Python
Install the MCP SDK:
pip install mcpHere is a simple MCP server that exposes a tool for looking up customer information:
from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp.types import Tool, TextContent
import json
app = Server("customer-tools")
CUSTOMERS = {
"C001": {"name": "Acme Corp", "status": "active", "tier": "enterprise"},
"C002": {"name": "Globex Ltd", "status": "active", "tier": "standard"},
"C003": {"name": "Initech", "status": "suspended", "tier": "standard"},
}
@app.list_tools()
async def list_tools() -> list[Tool]:
return [
Tool(
name="get_customer",
description="Look up customer details by customer ID",
inputSchema={
"type": "object",
"properties": {
"customer_id": {
"type": "string",
"description": "The customer ID e.g. C001"
}
},
"required": ["customer_id"]
}
)
]
@app.call_tool()
async def call_tool(name: str, arguments: dict) -> list[TextContent]:
if name == "get_customer":
customer_id = arguments.get("customer_id")
customer = CUSTOMERS.get(customer_id)
if customer:
return [TextContent(type="text", text=json.dumps(customer))]
else:
return [TextContent(type="text", text=f"Customer {customer_id} not found")]
async def main():
async with stdio_server() as (read_stream, write_stream):
await app.run(read_stream, write_stream, app.create_initialization_options())
if __name__ == "__main__":
import asyncio
asyncio.run(main())Connecting to the MCP server from your agent
Once your server is running you can connect to it from any MCP-compatible client. Claude Desktop, Copilot Studio and several other tools support MCP natively.
For a Python agent you can use the MCP client library:
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
server_params = StdioServerParameters(
command="python",
args=["customer_server.py"],
)
async def run_agent(query: str):
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
print(f"Available tools: {[t.name for t in tools.tools]}")
result = await session.call_tool(
"get_customer",
arguments={"customer_id": "C001"}
)
print(result.content[0].text)Why this matters for enterprise
The real benefit of MCP in an enterprise setting is that your IT team can build and maintain a catalogue of MCP servers that expose your internal systems safely. The AI layer then connects to these servers without needing direct access to your databases or APIs.
You get a clean separation between the AI and your backend systems, which makes security reviews much simpler. You also get a reusable integration layer - build the MCP server for your ITSM tool once and every AI agent in your organisation can use it.
I expect MCP to become the standard way enterprise AI connects to internal tools over the next year or two. Worth getting familiar with it now.