MCP Framework & Tool Integrations

Learn the integration shape once, then map it to the framework or editor you actually use.

Practical mini-lab

Keep one server portable across three clients

A documentation-search MCP server should not contain OpenAI-, Claude- or editor-specific business logic. The server exposes a stable capability; each client handles its own configuration.

OpenAI Agent ─┐ Claude Client ─┼─→ docs MCP server → vector index / docs API VS Code ───────┘
# Server contract stays framework-neutral
@mcp.tool()
async def search_docs(query: str, limit: int = 5) -> list[dict]:
    return await index.search(query=query, limit=limit)
Portable layer

Tool names, schemas, authorization rules and domain behavior.

Client-specific layer

How the server is registered, credentials are supplied and approvals are displayed.

Trade-off: framework-specific shortcuts can be convenient, but keeping the MCP boundary clean prevents a server from becoming locked to one model provider.