---
title: "MCP server"
description: "Give Claude, Cursor, VS Code or Codex Reddit posts, subreddits and search through threadapi's remote MCP server."
---

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

# MCP server

threadapi runs a remote MCP server. There's nothing to install: point your client at the URL, then sign in to threadapi when the client asks, or send an API key.

| | |
| :--- | :--- |
| **URL** | `https://api.threadapi.dev/mcp` |
| **Transport** | Streamable HTTP |
| **Auth** | OAuth sign-in, or `Authorization: Bearer <YOUR_API_KEY>` |
| **Billing** | Tool calls cost the same as the REST routes. Connecting and listing tools is free. |

No account yet? An agent can create one for its user: see [Agent sign-up](/docs/agent-signup).

## Tools

| Tool | What it does | Credits |
| :--- | :--- | :--- |
| `get_reddit_post` | Returns a Reddit post (or a comment subtree when given a comment permalink) with its full comment tree (up to max_comments, default 200) as Markdown (default) or JSON. Costs 1 credit for up to 500 comments, and 1 more credit per additional 100 comments. A deleted or private post returns an error and costs nothing. Arguments: `post`, `format`, `max_comments`, `digest`, `comment`, `context`. | 1 for up to 500 comments, +1 per further 100 |
| `get_reddit_items` | Looks up to 100 Reddit posts or comments by their ID or URL. Returns posts and comments in request order, listing any that were deleted or not found. Arguments: `ids`. | 1 |
| `list_subreddit_posts` | Lists a subreddit's posts (hot, new, top, rising, or controversial) with scores, comment counts, post age, and pagination cursors. Arguments: `subreddit`, `sort`, `time`, `limit`, `after`, `nsfw`. | 1 |
| `get_subreddit` | Returns subreddit description, subscriber count, and rules. Arguments: `subreddit`. | 1 |
| `get_reddit_user` | Returns a Reddit user profile with karma and account details (1 credit). When include is 'posts' or 'comments', also returns their recent submissions or comments (2 credits). Arguments: `name`, `include`. | 1, or 2 with `include` |
| `search_reddit` | Searches Reddit posts, comments, subreddits, or users. Returns scores, links, snippets, and pagination cursors. Arguments: `query`, `type`, `subreddit`, `sort`, `time`, `limit`, `after`, `nsfw`. | 1 |
| `list_monitors` | Lists your keyword monitors, their current status (active or paused), match counts, and account limits. | 0 |
| `get_monitor_matches` | Returns recent matched posts and comments for a monitor, with match metadata, timestamps, and pagination cursors. Arguments: `monitor_id`, `order`, `after`, `before`, `limit`. | 0 |
| `create_monitor` | Creates a keyword monitor. Costs 10 credits a day while it runs; matches are free. Ask the user for confirmation before creating. Arguments: `name`, `keywords`, `exclude`, `subreddits`, `posts`, `comments`, `nsfw`, `webhook_url`, `webhook_kind`. | 10 credits / day |
| `update_monitor` | Updates an existing keyword monitor's settings. Free (0 credits). Ask the user for confirmation before updating. Arguments: `monitor_id`, `name`, `keywords`, `exclude`, `subreddits`, `posts`, `comments`, `nsfw`, `webhook_url`, `webhook_kind`. | 0 |
| `pause_monitor` | Pauses an active keyword monitor. It stops matching and incurs no daily charges while paused. Free (0 credits). Ask the user for confirmation before pausing. Arguments: `monitor_id`. | 0 |
| `resume_monitor` | Resumes a paused keyword monitor. Costs 10 credits a day while it runs; matches are free. Deducts 10 credits for the next 24 hours. Ask the user for confirmation before resuming. Arguments: `monitor_id`. | 10 credits / day |
| `delete_monitor` | Permanently deletes a keyword monitor. Free (0 credits). Ask the user for confirmation before deleting. Arguments: `monitor_id`. | 0 |

Errors come back as tool errors with a hint for the model, and cost nothing.

## Resources

Read-only context providers exposed through MCP URIs:

| Resource URI Template | MIME Type | Description |
| :--- | :--- | :--- |
| `reddit://post/{id}` | `text/markdown` | Direct markdown representation of a raw Reddit post and its full comment tree. |
| `reddit://r/{subreddit}/hot` | `text/plain` | Top hot posts from a subreddit in JSON format. |

## Client Setup

### Claude Code

1. Register ThreadAPI in Claude Code:

```bash
claude mcp add --transport http threadapi https://api.threadapi.dev/mcp
```

2. Sign in with OAuth:

Run `/mcp` in Claude Code and sign in when the browser opens.

### Claude Desktop / claude.ai

1. Open connector settings in Claude: Navigate to **Settings → Connectors** and click **Add custom connector**.
2. Enter the MCP server URL:

```text
https://api.threadapi.dev/mcp
```

3. Connect and authorize: Click **Connect** and authorize in your browser when prompted.

Note: Free Claude accounts support 1 custom connector.

### Cursor

1. Add configuration to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (project-specific):

```json
{
  "mcpServers": {
    "threadapi": {
      "url": "https://api.threadapi.dev/mcp"
    }
  }
}
```

2. Sign in with OAuth: When prompted by Cursor, authorize in your browser. Tokens refresh automatically.

If your client does not open a sign-in page, authenticate with an API key:

```json
{
  "mcpServers": {
    "threadapi": {
      "url": "https://api.threadapi.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

### VS Code

Add to `.vscode/mcp.json` or your user settings:

```json
{
  "servers": {
    "threadapi": {
      "type": "http",
      "url": "https://api.threadapi.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

### Windsurf

1. Add configuration to `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "threadapi": {
      "serverUrl": "https://api.threadapi.dev/mcp"
    }
  }
}
```

2. Sign in with OAuth: When prompted by Windsurf, authorize in your browser. Tokens refresh automatically.

If your client does not open a sign-in page, authenticate with an API key:

```json
{
  "mcpServers": {
    "threadapi": {
      "serverUrl": "https://api.threadapi.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

### Raw HTTP

Send JSON-RPC requests directly over HTTP:

```bash
curl -X POST https://api.threadapi.dev/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":1}'
```

Source: https://threadapi.dev/docs/mcp/index.mdx
