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

LangChain Python

Install

TerminalCode
pip install langchain-mcp-adapters

Connect

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

Note: transport value is "streamable_http" (underscore).

You get four tools rather than the tools of each app. Your agent uses them to reach every app you have connected. See How MewCP works.


Call a tool directly

Code
call_tool = next(t for t in tools if t.name == "call_tool") result = await call_tool.ainvoke( { "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 you have connected more than one account for the same app, add "alias": "work" to select one.


Use with a LangChain agent

Hand all four tools to the agent and let it work out the rest:

Code
import asyncio from langchain_mcp_adapters.client import MultiServerMCPClient from langchain_openai import ChatOpenAI from langgraph.prebuilt import create_react_agent async def main(): async with MultiServerMCPClient( { "mewcp": { "transport": "streamable_http", "url": "https://gateway.mewcp.com/personal/mcp", "headers": {"Authorization": f"Bearer {MEWCP_API_KEY}"}, } } ) as client: tools = await client.get_tools() model = ChatOpenAI(model="gpt-4o") agent = create_react_agent(model, tools) result = await agent.ainvoke( {"messages": [{"role": "user", "content": "What is on my calendar tomorrow?"}]} ) print(result["messages"][-1].content) asyncio.run(main())

The agent will call search to find the calendar tool, get_schema for its parameters, then call_tool to run it.


Where to find your values

ValueWhere to get it
API_KEYDashboard -> API Keys
Connected appsDashboard -> Servers
Last modified on October 15, 2026
CrewAILangChain TypeScript
On this page
  • Install
  • Connect
  • Call a tool directly
  • Use with a LangChain agent
  • Where to find your values