Claude SDK
Install
Code
How it works
The Anthropic SDK's MCP connector is different from other frameworks. Rather than giving you a direct MCP client, it lets the Anthropic API act as the MCP client on your behalf. You attach the MCP server to your API call, Claude decides which tools to call, and the API handles the MCP protocol round-trip.
You cannot call list_tools() or call_tool() imperatively. The model drives all tool use.
That suits MewCP well. Claude sees four tools, search, get_schema, list_accounts, and call_tool, and uses them to reach every app you have connected. See How MewCP works.
Example
Code
One server entry covers every app you have connected. Connecting another app in the dashboard needs no change here.
Choosing an account
When you have connected more than one account for the same app, say which one you mean in the prompt. Claude will call list_accounts and pick it by alias:
Code
Important notes
authorization_tokensends the value asAuthorization: Bearer <token>. Do not putBearerin the value.- The beta header is
"mcp-client-2025-11-20". The oldermcp-client-2025-04-04is deprecated. - Only MCP tools are supported via this connector. Prompts and resources are not exposed.
- The server URL must be
https://.
Where to find your values
| Value | Where to get it |
|---|---|
API_KEY | Dashboard -> API Keys |
| Connected apps | Dashboard -> Servers |