What is MCP
Key Points
- MCP (Model Context Protocol) = open standard for AI applications to connect to external data sources and tools.
- Anthropic-introduced (Nov 2024); rapidly adopted across vendors.
- Three concepts: Tools (callable functions), Resources (read-only data), Prompts (reusable templates).
- Transport: stdio, HTTP/SSE, WebSockets.
- Status (2026): stable; broad adoption; C# SDK v1.0.
Why MCP
Before MCP, every AI app re-implemented integrations:
ChatGPT → custom plugin format
Claude → custom MCP-like
Cursor → its own
.NET agent → custom AIFunctionFactory
Result: tool implementations not portable. Every team rebuilds the same integrations (filesystem, GitHub, Slack, SQL).
With MCP:
[Claude] ─┐
[ChatGPT]─┼── MCP ──→ [Tool servers (filesystem, GitHub, Slack, SQL, ...)]
[Cursor] ─┤
[Custom] ─┘
Build a server once → reuse across all MCP-aware clients.
Core concepts
Tools
Callable functions exposed by server.
{
"name": "get_user",
"description": "Look up a user by ID",
"inputSchema": { "type": "object", "properties": { "id": {"type": "integer"} } }
}
Agent calls get_user(id=42); server returns result.
Resources
Read-only data with URIs.
Agent reads on demand.
Prompts
Templated message sequences.
Server returns rendered messages for the LLM.
Protocol shape
JSON-RPC 2.0 over the chosen transport.
Client request: { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {...} }
Server response: { "jsonrpc": "2.0", "id": 1, "result": {...} }
Bidirectional — server can also send notifications.
Initialization
Authentication
MCP doesn't mandate auth. Common patterns: - stdio: trusted by execution context. - HTTP: OAuth, API keys, mTLS.
For production: HTTP + OAuth.
Common public servers
@modelcontextprotocol/server-filesystem
@modelcontextprotocol/server-github
@modelcontextprotocol/server-slack
@modelcontextprotocol/server-postgres
@modelcontextprotocol/server-puppeteer
@modelcontextprotocol/server-fetch
@modelcontextprotocol/server-memory
@modelcontextprotocol/server-everart (image generation)
Plus growing community ecosystem.
.NET ecosystem
ModelContextProtocolNuGet package (C# SDK v1.0, March 2026).- Supports both server and client modes.
- Integrates with Microsoft.Extensions.AI and Agent Framework.
// As client (consume MCP server's tools)
var client = await McpClient.ConnectAsync(transport);
var tools = await client.ListToolsAsync();
var aiTools = tools.Select(t => t.AsAIFunction());
// As server (expose your .NET code as MCP tools)
var server = new McpServer(...);
server.RegisterTool("get_user", ...);
await server.RunAsync(transport);
Status (mid-2026)
- Spec stable.
- Anthropic, OpenAI, Microsoft all support.
- Cursor, Cline, Continue all consume MCP.
- C# SDK production-ready.
- Many third-party servers.
Use cases
- Internal tools to external agents: expose your company's data via MCP server; users use Claude / ChatGPT against it.
- Cross-product reusability: one MCP server serves your Copilot extension, your Cursor users, your custom .NET agent.
- Decoupling: tool implementation evolves independently of agent.
Trade-offs
| Aspect | Pros | Cons |
|---|---|---|
| Standard | Reusable | Yet another protocol |
| JSON-RPC | Simple | Schema overhead |
| Tool / Resource / Prompt | Rich | Mental model |
| Multi-transport | Flexible | Inconsistencies |
Senior considerations
- MCP servers can be malicious: tool descriptions can include prompt injection ("ignore prior instructions...") — sandbox carefully.
- Auth for production servers.
- Versioning: pin server versions; protocol may evolve.
- Performance: each MCP call has serialization overhead; batch where possible.