> For the complete documentation index, see [llms.txt](https://docs.synthdata.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.synthdata.co/mcp.md).

# MCP

All Synth MCP tools support both 1-hour and 24-hour forecast horizons. When using tools like `get-prediction-percentiles`, `get-insights-volatility`, or `get-insights-option-pricing`, you can specify the horizon by passing `horizon=1h` or `horizon=24h` (default).

MCP allows AI agents to integrate seamlessly to external data sources and tools.

Synth API MCP is a remote MCP server at <https://mcp.synthdata.co/v1/mcp/apikey/json>.

There are 2 authentications methods:

* OAuth (coming soon)
* API Key

To authenticate the MCP with your API key, you need to add custom headers:

* header key: Authorization
* header value: Bearer \<your synth api key>

### Connect with Claude Desktop

Download the Desktop Extension: [synth.mcpb](https://github.com/mode-network/synth-mcp/releases/download/v0.0.10/synth.mcpb).&#x20;

To add the extension double click on the file and Claude Desktop will ask you to install, and input your API key.

### Connect with Claude Code CLI

Claude Code provides a CLI to use the agentic coding tool of Anthropic. Read more [here](https://code.claude.com/docs/en/overview#terminal).

To add the SynthData MCP server, type the command:

```shellscript
claude mcp add --transport http synthdata https://mcp.synthdata.co/v1/mcp/apikey/json --header "Authorization: Bearer <your api key>"
```

### Connect with mcp-remote

mcp-remote is a tool that allows you to install a remote MCP server for a local MCP client. It creates a local STDIO MCP to proxies to the remote HTTP Stream Synth MCP. Read more [here](https://www.npmjs.com/package/mcp-remote).

Type the command to add the Synth MCP:

```shellscript
npx -y mcp-remote https://mcp.synthdata.co/v1/mcp/apikey/json --header "Authorization: Bearer <your api key>" --allow-http
```

### Connect with Vercel AI SDK

Vercel AI SDK supports connecting to remote MCP servers. Read more [here](https://ai-sdk.dev/docs/ai-sdk-core/mcp-tools).

```typescript
  const mcpClient = await createMCPClient({
    transport: {
      type: "http",
      url: "https://mcp.synthdata.co/v1/mcp/apikey/json",

      headers: { Authorization: `Bearer ${process.env.SYNTH_API_KEY}` },
    },
  });

  const tools = await mcpClient.tools();

  const result = streamText({
    model: gateway(modelId),
    tools,
    system: "You are an agent working with SynthData's MCP.",
    messages: convertToModelMessages(messages),
    onError: (e) => {
      console.error("Error while streaming.", e);
    },
  });
```

### Connect with OpenAI

OpenAI platform allows you to connect to MCP server:

1. go to the Open AI Platform: <https://platform.openai.com/chat>
2. on the tools configuration, click "Add"
3. chose "MCP server"
4. click on "+ Server" button
5. input the url: <https://mcp.synthdata.co/v1/mcp/apikey/json>
6. chose a label: synth
7. on authentication, select "Custom headers"
8. type "Authorization" in the header input
9. type "Bearer \<your api key>" in the value input, change with your API key that you create here [https://dashboard.synthdata.co/api-keys](https://dashboard.synthdata.co/api-keys/)
10. Click on "Connect"

You can now prompt the LLM and ask for Synth Insights.
