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 TypeScript

Install

TerminalCode
npm install @langchain/mcp-adapters

Connect

Code
import { MultiServerMCPClient } from "@langchain/mcp-adapters"; const MEWCP_API_KEY = "API_KEY"; async function main() { const client = new MultiServerMCPClient({ mcpServers: { mewcp: { url: "https://gateway.mewcp.com/personal/mcp", headers: { Authorization: `Bearer ${MEWCP_API_KEY}`, }, }, }, }); const tools = await client.getTools(); console.log( "Available tools:", tools.map((t) => t.name), ); // -> ["search", "get_schema", "list_accounts", "call_tool"] await client.close(); } main();

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
const callTool = tools.find((t) => t.name === "call_tool")!; const result = await callTool.invoke({ 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", }, }); console.log(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 { MultiServerMCPClient } from "@langchain/mcp-adapters"; import { ChatOpenAI } from "@langchain/openai"; import { createReactAgent } from "@langchain/langgraph/prebuilt"; import { HumanMessage } from "@langchain/core/messages"; async function main() { const client = new MultiServerMCPClient({ mcpServers: { mewcp: { url: "https://gateway.mewcp.com/personal/mcp", headers: { Authorization: `Bearer ${MEWCP_API_KEY}` }, }, }, }); const tools = await client.getTools(); const model = new ChatOpenAI({ model: "gpt-4o" }); const agent = createReactAgent({ llm: model, tools }); const result = await agent.invoke({ messages: [new HumanMessage("What is on my calendar tomorrow?")], }); console.log(result.messages.at(-1)?.content); await client.close(); } 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
LangChain PythonLangGraph
On this page
  • Install
  • Connect
  • Call a tool directly
  • Use with a LangChain agent
  • Where to find your values
TypeScript
TypeScript
TypeScript