---
title: "Agents: use Tapetide via MCP or REST"
description: "Connect Claude, ChatGPT, Cursor and other AI clients to Tapetide over MCP, or call the REST API from your own agent."
canonical: "https://developers.tapetide.com/guides/agents/"
---

# Agents: use Tapetide via MCP or REST

Tapetide has two front doors to the same data, account and quota.

|     | MCP server | REST API |
| --- | --- | --- |
| Endpoint | `https://mcp.tapetide.com/mcp` (Streamable HTTP) | `https://api.tapetide.com/v1` |
| Best for | Chat apps and coding assistants that speak MCP | Your own code, pipelines and custom agents |
| Auth | Google sign-in (OAuth) or a personal token | Personal token |
| Shape | 55 tools with LLM-oriented descriptions | Typed JSON documents described by OpenAPI 3.1 |

Calls on either side count against one quota: 50 successful calls a day on the free plan.

## Connect an MCP client

Most clients only need the server URL, then a Google sign-in when the browser opens.

**Claude Code**

```bash
claude mcp add --transport http tapetide https://mcp.tapetide.com/mcp
```

Then open `/mcp` in Claude Code, select Tapetide and sign in.

**Cursor** (`.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "tapetide": { "url": "https://mcp.tapetide.com/mcp" }
  }
}
```

**Codex**

```bash
codex mcp add tapetide --url https://mcp.tapetide.com/mcp
codex mcp login tapetide
```

**Claude.ai and ChatGPT**: add a custom connector named Tapetide with the URL `https://mcp.tapetide.com/mcp` and sign in with Google.

**Clients that cannot open a browser** send a personal token instead: `Authorization: Bearer tpt_rt_...`. Claude Desktop uses the local helper:

```json
{
  "mcpServers": {
    "tapetide": {
      "command": "bunx",
      "args": ["tapetide-mcp"],
      "env": { "TAPETIDE_TOKEN": "YOUR_TOKEN" }
    }
  }
}
```

Step-by-step pages for each client are canonical on tapetide.com:

-   Chat apps: [Claude.ai](https://tapetide.com/mcp/claude-ai), [ChatGPT](https://tapetide.com/mcp/chatgpt), [Grok](https://tapetide.com/mcp/grok), [Claude Desktop](https://tapetide.com/mcp/claude-desktop)
-   Editors: [Cursor](https://tapetide.com/mcp/cursor), [VS Code](https://tapetide.com/mcp/vscode), [Windsurf](https://tapetide.com/mcp/windsurf), [Zed](https://tapetide.com/mcp/zed), [Kiro](https://tapetide.com/mcp/kiro), [Antigravity](https://tapetide.com/mcp/antigravity)
-   Agents and CLIs: [Claude Code](https://tapetide.com/mcp/claude-code), [Codex](https://tapetide.com/mcp/codex), [Gemini CLI](https://tapetide.com/mcp/gemini-cli), [Cline](https://tapetide.com/mcp/cline), [OpenCode](https://tapetide.com/mcp/opencode), [Command Code](https://tapetide.com/mcp/commandcode)

Confirm the connection with a prompt such as “Use Tapetide to show Reliance’s latest price and when it was updated.” The answer should include a timestamp.

Full MCP tool reference: [tapetide.com/mcp/llms-full.txt](https://tapetide.com/mcp/llms-full.txt). For when to pick which, see [MCP vs API for Indian stock data](https://tapetide.com/mcp/guides/mcp-vs-api-indian-stock-data).

## Give your own agent the REST API

If you are building the agent, REST is usually simpler to control and test:

1.  Load the OpenAPI document from `https://api.tapetide.com/v1/openapi.json` and turn operations into tools. Most agent frameworks accept OpenAPI directly.
2.  Point the model at [`/llms.txt`](/llms.txt) or [`/llms-full.txt`](/llms-full.txt) for the conventions: units, nulls, paging.
3.  Put the token in the HTTP client, never in the prompt.
4.  Have the agent quote `meta.as_of` and any observation timestamp (`updated_at`, `snapshot_ts`) with numbers it reports.

A minimal tool for an agent loop:

```python
def tapetide_get(path: str, **params) -> dict:
    """GET a Tapetide API path such as /v1/stocks/TCS/quote. Returns the JSON body."""
    r = session.get(f"https://api.tapetide.com{path}", params=params, timeout=30)
    return r.json()  # errors come back as {"error": {"code", "message"}} for the model to read
```

Returning error bodies to the model works well: messages name the bad parameter and list accepted values.
