> ## Documentation Index
> Fetch the complete documentation index at: https://modem.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Modem MCP Server

> Use the Modem Agent from external MCP clients

export const Prompt = ({text, variant = 'accent'}) => {
  const [copied, setCopied] = useState(false);
  const handleCopy = async () => {
    try {
      await navigator.clipboard.writeText(text);
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    } catch {}
  };
  const clipboardIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copy</title>
            <rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
            <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
        </svg>;
  const checkIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copied</title>
            <polyline points="20 6 9 17 4 12" />
        </svg>;
  const promptIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style={{
    flexShrink: 0,
    opacity: 0.4
  }}>
            <title>Prompt</title>
            <path d="M20 2H2v20h2V4h16v12H6v2H4v2h2v-2h16V2zM6 7h12v2H6zm8 4H6v2h8z" />
        </svg>;
  return <div className={`prompt prompt-${variant}`} style={{
    marginTop: '12px',
    marginBottom: '12px'
  }}>
            {promptIcon}
            <span className="prompt-text">{text}</span>
            <button className="prompt-copy" onClick={handleCopy} title="Copy to clipboard" type="button">
                {copied ? checkIcon : clipboardIcon}
            </button>
        </div>;
};

The Modem MCP Server lets MCP-compatible clients call the Modem Agent from outside the Modem dashboard. Use it when you want an external assistant to ask Modem about your customer feedback, topics, people, companies, and connected tools.

<Warning>The Modem MCP Server is currently in beta. Access may be limited to enabled organizations while we expand availability.</Warning>

<Info>
  This page is about connecting an external MCP client to Modem. To connect external MCP tool servers for the Modem Agent to use, see the
  [MCP Servers page](/integrations/mcp-servers).
</Info>

## Server URL

Use this URL in your MCP client:

```text theme={null}
https://mcp.modem.dev/mcp
```

The server uses **Streamable HTTP** and OAuth. You do not need to create or paste an API key.

## What It Can Do

The server currently exposes `invoke_modem_agent`, which runs the Modem Agent with a natural-language prompt and returns the final answer to your MCP client.

<Note>Treat each MCP call as a self-contained prompt. Follow-up conversation continuity from the MCP client is not supported yet.</Note>

## Prerequisites

* A Modem account with access to the organization you want to use
* Access to the Modem MCP Server beta for that organization
* An MCP client that supports remote **Streamable HTTP** servers with OAuth

Client support changes quickly. The examples below cover common MCP clients with remote HTTP support. Your client may use slightly different labels for the same fields, and it must support OAuth for Modem's server.

## Set Up Your Client

Use the setup path for your MCP client. In every case, the server URL is:

```text theme={null}
https://mcp.modem.dev/mcp
```

### Claude Code

Claude Code can add remote HTTP MCP servers from the CLI.

```bash theme={null}
claude mcp add --transport http modem https://mcp.modem.dev/mcp
```

Then run `/mcp` inside Claude Code and complete the browser authorization flow.

### Cursor

In Cursor, open **Settings** → **Cursor Settings** → **Tools & MCP**, then add a new MCP server. Cursor stores MCP configuration in an `mcp.json` file.

```json theme={null}
{
    "mcpServers": {
        "modem": {
            "url": "https://mcp.modem.dev/mcp"
        }
    }
}
```

If Cursor asks for a transport type, choose **Streamable HTTP**.

### VS Code and GitHub Copilot

VS Code stores MCP configuration in an `mcp.json` file, either in your user profile or in `.vscode/mcp.json` for a workspace.

```json theme={null}
{
    "servers": {
        "modem": {
            "type": "http",
            "url": "https://mcp.modem.dev/mcp"
        }
    }
}
```

Use **MCP: Add Server** or **MCP: Open User Configuration** from the command palette if you prefer to edit through VS Code.

### Windsurf

Windsurf stores MCP configuration in `~/.codeium/windsurf/mcp_config.json`. For remote HTTP servers, use `serverUrl`.

```json theme={null}
{
    "mcpServers": {
        "modem": {
            "serverUrl": "https://mcp.modem.dev/mcp"
        }
    }
}
```

### Cline

In Cline, open the MCP Servers panel and add a remote server manually:

<Steps>
  <Step title="Open MCP Servers">Click the MCP Servers icon in the Cline panel.</Step>
  <Step title="Add a remote server">Open the remote server flow, then enter `modem` as the server name.</Step>
  <Step title="Enter the server URL">Use `https://mcp.modem.dev/mcp` as the full endpoint URL.</Step>
  <Step title="Choose the transport">Select **Streamable HTTP**.</Step>
  <Step title="Authenticate">If your Cline version supports OAuth for remote servers, complete the browser authorization flow.</Step>
</Steps>

### Other MCP Clients

Use the client's remote HTTP or Streamable HTTP setup flow. If it asks for fields, use:

| Field          | Value                       |
| -------------- | --------------------------- |
| Name           | `modem`                     |
| URL            | `https://mcp.modem.dev/mcp` |
| Transport      | Streamable HTTP or HTTP     |
| Authentication | OAuth                       |

Client-specific MCP docs:

| Client      | Docs                                                                                                  |
| ----------- | ----------------------------------------------------------------------------------------------------- |
| Claude Code | [Connect Claude Code to tools via MCP](https://code.claude.com/docs/en/mcp)                           |
| Cursor      | [Cursor MCP documentation](https://docs.cursor.com/context/model-context-protocol)                    |
| VS Code     | [MCP configuration reference](https://code.visualstudio.com/docs/copilot/reference/mcp-configuration) |
| Windsurf    | [Cascade MCP integration](https://docs.windsurf.com/windsurf/cascade/mcp)                             |
| Cline       | [Cline MCP documentation](https://docs.cline.bot/mcp/mcp-overview)                                    |

## Authorize Modem

Your MCP client should open a browser window for OAuth authorization the first time it connects.

On the Modem consent screen:

* Confirm the requesting client name.
* Review the redirect destination.
* Choose the Modem organization if your account belongs to more than one.
* Approve the `agent:invoke` permission.

After authorization completes, your MCP client can call the Modem MCP tool.

## Example Prompts

Use prompts that give the Modem Agent a complete task. The MCP server returns the final answer synchronously.

<Prompt text="Use Modem to summarize the highest-priority bug reports from the last 7 days." />

<Prompt text="Ask Modem which customers requested SSO and whether any related Linear issues already exist." />

<Prompt text="Use Modem to find the top complaints from enterprise accounts this month and suggest what to prioritize." />

Because each MCP call is self-contained, include the context the agent needs in the prompt instead of relying on a previous MCP exchange.

## Security and Access

Modem authorizes the MCP client with OAuth. The access token is scoped to the Modem account and organization selected during consent.

The current MCP permission is:

| Scope          | Meaning                             |
| -------------- | ----------------------------------- |
| `agent:invoke` | Run the Modem Agent on your behalf. |

The MCP server resolves the organization from the OAuth token claims, not from the URL. Keep the server URL as `https://mcp.modem.dev/mcp`.

## Troubleshooting

<AccordionGroup>
  <Accordion title="My MCP client does not show the Modem tool">
    <ul>
      <li>Confirm the server URL is exactly `https://mcp.modem.dev/mcp`.</li>
      <li>Restart the client or reload its MCP server list.</li>
      <li>Make sure your client supports remote Streamable HTTP MCP servers with OAuth.</li>
    </ul>
  </Accordion>

  <Accordion title="Authorization fails or returns unauthorized">
    <ul>
      <li>Sign in with the Modem account that belongs to the organization you selected.</li>
      <li>Re-run the OAuth flow and approve the `agent:invoke` permission.</li>
      <li>If your organization is not enabled for the beta, contact Modem support.</li>
    </ul>
  </Accordion>

  <Accordion title="The answer is missing context from a previous MCP call">
    Each MCP call currently starts a separate Modem agent invocation. Include the necessary context in the prompt you send from your MCP
    client.
  </Accordion>

  <Accordion title="I connected the wrong organization">
    Remove or disconnect the Modem MCP server in your client, then authorize again and select the correct organization on the Modem
    consent screen.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="The Modem Agent" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/bot-bolt.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=dda761a2f7042ebc27c668cc644df76c" href="/features/agent" width="22" height="22" data-path="icons/bot-bolt.svg">
    Learn what the Modem Agent can query and do.
  </Card>

  <Card title="MCP Servers" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/link.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=e774d33588635d44c6c935b78ed55f13" href="/integrations/mcp-servers" width="24" height="24" data-path="icons/link.svg">
    Connect external MCP tool servers for the Modem Agent to use.
  </Card>
</CardGroup>
