Who should use this

The Nango MCP server is designed for companies building AI-powered products that interact with their end-users. For example, a sales assistant that connects to your user’s CRM or a support bot that schedules meetings on their behalf.

Use the Nango MCP server if you’re building:

  • A customer-facing AI tool that needs access to external services like Slack, Google Calendar, a CRM, etc.
  • An AI agent that should take actions on behalf of your users by calling external APIs

What is MCP?

The Model Context Protocol is an open protocol that standardizes how applications provide context to LLMs. It follows a client-server architecture where:

  • MCP Hosts/Clients: Applications like Claude Desktop or AI tools that access data through MCP
  • MCP Servers: Programs that expose specific capabilities through the standardized protocol
  • Data Sources: External systems and services that MCP servers can connect to (in Nango’s case, API integrations)

Nango’s MCP server implementation allows your LLMs to interact with external APIs via your existing Nango connections and actions.

Why use Nango for MCP?

Nango gives you powerful building blocks out of the box to reliably connect LLMs to external APIs:

  • Simplified interface for agents: Nango actions can encapsulate complex multi-step API logic into a single tool. This allows agents to focus on intent rather than figuring out raw APIs, improving success rates and reducing hallucinations.
  • Standardized actions across providers: You can define consistent use cases across APIs (e.g., “create calendar event” for both Google Calendar and Microsoft Teams), giving LLMs a unified interface for tool calling.
  • Pre-built catalog of 400+ APIs: Instantly access a wide library of APIs with existing integrations and actions ready to use—no need to start from scratch.
  • Customizable and strongly typed actions: Extend pre-built actions or define your own from scratch using Nango’s custom integrations. All actions are strongly typed, making them safer and easier to consume from LLM clients.
  • Built-in authentication flows: Nango provides a ready-made UI to authorize your end users, supporting OAuth, API keys, Basic Auth, and Custom Auth. This means agents can operate on behalf of users securely without extra setup.
  • Deep observability: Each action execution is logged in detail, including external API calls and errors—making it easier to debug and monitor LLM behavior.

Together, these features let you deploy more capable, reliable, and maintainable AI agents without the overhead of building infrastructure around external APIs.

How it works

How it works

MCP servers expose your Nango actions as tools that can be invoked by LLM clients. Nango actions are predefined API interactions that you can run through Nango. For example, creating a calendar event in Google Calendar or fetching recent leads from a CRM. These are the operations exposed to the LLM via the MCP server.

When an LLM client connects to your MCP server:

  1. The server authenticates the request using your Nango secret key
  2. It identifies available actions based on the provided connection ID and integration ID (ak provider config key)
  3. It exposes these actions as tools for the LLM to invoke
  4. When the LLM invokes a tool, the MCP server executes the corresponding Nango action

Authentication

Requests to the MCP server must include the following headers:

  • Authorization: Bearer token with your Nango secret key
  • connection-id: The connection ID that determines available actions
  • provider-config-key: The integration ID

Connecting to the Nango MCP server

The Nango MCP server is exposed at https://api.nango.dev/mcp and supports the Streamable HTTP transport. The HTTP+SSE transport is NOT supported, as it’s being deprecated.

Programmatically with the Vercel AI SDK

Here’s an example of connecting to the Nango MCP server using Vercel’s AI SDK:

import { openai } from "@ai-sdk/openai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { experimental_createMCPClient, generateText } from "ai";

const mcpClient = await experimental_createMCPClient({
  transport: new StreamableHTTPClientTransport(new URL('https://api.nango.dev/mcp'), {
    requestInit: {
      headers: {
        'Authorization': 'Bearer <secret-key>',
        'connection-id': '<connection-id>',
        'provider-config-key': '<provider-config-key>'
      }
    },
  }),
});

const { text, toolCalls } = await generateText({
  model: openai('gpt-4o-mini'),
  tools: await mcpClient.tools(), // You can add tools from multiple connections
  maxSteps: 5,
  messages: [
    {
      role: 'user',
      content: 'Schedule a meeting with John Doe',
    },
  ],
});

Check out a full chat loop example in our Nango MCP Client Example repo.

Claude for Desktop

A good way to manually test the MCP server is to use Claude Desktop paired with the mcp-remote npm package.

Claude Desktop originally only supports the sdio transport, but the mcp-remote package allows you to proxy requests to the MCP server over the Streamable HTTP transport.

  1. Install Claude Desktop
  2. Open ~/Library/Application Support/Claude/claude_desktop_config.json (MacOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows) in a code editor and add your desired MCP server connections using mcp-remote. Eg:
    {
      "mcpServers": {
        "nango-google-drive": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://api.nango.dev/mcp",
            "--header",
            "Authorization:Bearer <secret-key>",
            "--header",
            "provider-config-key:google-drive",
            "--header",
            "connection-id:<connection-id>"
          ]
        },
        "nango-slack": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://api.nango.dev/mcp",
            "--header",
            "Authorization:Bearer <secret-key>",
            "--header",
            "provider-config-key:slack",
            "--header",
            "connection-id:<connection-id>"
          ]
        }
      }
    }
    

    Avoid modifying the spacing on the headers as mcp-remote is sensitive to it.

  3. Restart Claude Desktop to apply the changes.
  4. Claude should now be able to list and execute actions from the connections you added to the config file.

Additional resources

Nango MCP servers leverage Nango’s mature action infrastructure. For details, check out:

  • Customize or create your own actions: guide
  • Test actions locally before exposing them to LLMs: guide

Questions, problems, feedback? Please reach out in the Slack community.