MewCPMewCP
  • AstheTech
  • Contact Us
  • Documentation
  • MewCP Auth API
Have a question?
  • ✉ Contact us - our dev team will reach out as soon as possible

© 2026 MewCP. All rights reserved.

githubx
Getting Started
Connect AI Apps
Frameworks & SDKs
    Vercel AI SDKGoogle ADKCrewAILangChain PythonLangChain TypeScriptLangGraphOpenAI Agents SDKClaude SDKPython MCP ClientTypeScript MCP Client
Authentication
Auth API Guides
powered by Zudoku
Frameworks & SDKs

Python MCP Client

Install

TerminalCode
pip install fastmcp

Connect

Code
import asyncio from fastmcp import Client GATEWAY_URL = "https://gateway.mewcp.com/personal/mcp" MEWCP_API_KEY = "API_KEY" headers = {"Authorization": f"Bearer {MEWCP_API_KEY}"} async def main(): client = Client(GATEWAY_URL, headers=headers) async with client: await client.ping() tools = await client.list_tools() print("Available tools:", [t.name for t in tools]) # -> ["search", "get_schema", "list_accounts", "call_tool"] asyncio.run(main())

Every app you have connected is reachable through this one endpoint. You get four tools rather than the tools of each app, and you use them to reach the rest.


Find a tool

Code
found = await client.call_tool("search", {"query": "calendar events"}) # each hit carries the server_maskedId and tool_name you need next schema = await client.call_tool( "get_schema", {"tools": [{"server_maskedId": "google-calendar", "tool_name": "list_events"}]}, )

Run a tool

Code
result = await client.call_tool( "call_tool", { "server_maskedId": "google-calendar", "tool_name": "list_events", "args": { "calendar_id": "primary", "time_min": "2026-01-15T00:00:00Z", "time_max": "2026-01-16T00:00:00Z", }, }, ) print(result)

If your code already knows which tool it wants, call call_tool directly. search and get_schema exist for agents that have to work it out at runtime.


Choosing an account

When you have connected more than one account for the same app, list them and pass the one you want as alias:

Code
accounts = await client.call_tool("list_accounts", {"provider": "google-gmail"}) result = await client.call_tool( "call_tool", { "server_maskedId": "google-gmail", "tool_name": "list_messages", "args": {"max_results": 10}, "alias": "work", }, )

With a single connected account you can leave alias out.


B2B: audience member credential routing

If you are managing audience member credentials via the MewCP Auth API, identify the end user with a header and MewCP resolves their stored credential automatically:

Code
headers = { "Authorization": f"Bearer {MEWCP_API_KEY}", "x-mewcp-enduser-id": current_user.id, }

Where to find your values

ValueWhere to get it
API_KEYDashboard -> API Keys
Connected appsDashboard -> Servers
Last modified on October 15, 2026
Claude SDKTypeScript MCP Client
On this page
  • Install
  • Connect
  • Find a tool
  • Run a tool
  • Choosing an account
  • B2B: audience member credential routing
  • Where to find your values