Context API MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "CONTEXT_API_KEY=${CONTEXT_API_KEY}" context-api -- npx -y context-api-mcp
Required:CONTEXT_API_KEY
README.md

Access the doppelgangers.ai Social Media Context API for Twitter/X posts

Context API MCP Server

MCP (Model Context Protocol) server to access the doppelgangers.ai Social Media Context API.

This MCP server provides access to contextualized renderings (XML descriptions) of Twitter/X posts. The contextualization allows for:

  • More high-quality retrieval of relevant information from the posts,
  • More high-quality analysis of insights, trends, topics, etc. from the posts

The contextualization is achieved by adding the following information to the XML description of each post:

  • Descriptions of referenced posts and images
  • When the post is a reply in a conversation, the conversation or a summary of the conversation.
  • Metadata about the post (e.g., creation data, post ID, etc.)

Note that no descriptions are added yet related to referenced videos or links (external sites).

The XML structure helps to describe the relationship between posts and their context.

Using the available tools has a cost associated with it, with each call the credit balance is updated.

Features

  • search_relevant_posts: Semantic search of contextualized post renderings of a certain Twitter/X user, based on a natural language queries like "What does @visionscaper think about the future of AI?".

  • get_all_user_posts: Retrieve all contextualized post renderings of a specific Twitter/X user. This is useful to analyse the posts for insights, trends and topics over all posts.

  • check_credits: View your API credit balance and usage.

Installation

1. Get your API Key

Request an API key at dev.doppelgangers.ai:3003 or via the API:

curl -X POST https://dev.doppelgangers.ai:3003/auth/request-key \
  -H "Content-Type: application/json" \
  -d '{"email": "your@email.com", "name": "Your Name"}'

2. Configure Your Client

Add the following config to your MCP client:

{
  "mcpServers": {
    "context-api": {
      "command": "npx",
      "args": ["-y", "context-api-mcp"],
      "env": {
        "CONTEXT_API_KEY": "your-api-key-here"
      }
    }
  }
}

MCP Client configuration

Amp

Follow Amp's MCP guide and use the config provided above. You can also install the Context API MCP server using the CLI:

amp mcp add context-api -- npx context-api-mcp
Antigravity

To use the Context API MCP server follow the instructions from Antigravity's docs to install a custom MCP server. Add the following config to the MCP servers config:

{
  "mcpServers": {
    "context-api": {
      "command": "npx",
      "args": ["-y", "context-api-mcp"],
      "env": {
        "CONTEXT_API_KEY": "your-api-key-here"
      }
    }
  }
}

Note: If you encounter an "EOF" error, try using the absolute path to npx (e.g., /usr/local/bin/npx) or invoke the CLI script directly via node.

Claude Code

Use the Claude Code CLI to add the Context API MCP server (guide):

claude mcp add context-api npx context-api-mcp
Claude Desktop

Edit your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the Context API MCP server:

{
  "mcpServers": {
    "context-api": {
      "command": "npx",
      "args": ["-y", "context-api-mcp"],
      "env": {
        "CONTEXT_API_KEY": "your-api-key-here"
      }
    }
  }
}

After updating the configuration, restart Claude Desktop for changes to take effect.

Cline

Follow Cline's MCP guide and use the config provided above.

Codex

Follow the configure MCP guide using the standard config from above. You can also install the Context API MCP server using the Codex CLI:

codex mcp add context-api -- npx context-api-mcp
Copilot CLI

Start Copilot CLI:

copilot

Start the dialog to add a new MCP server by running:

/mcp add

Configure the following fields and press CTRL+S to save the configuration:

  • Server name: context-api
  • Server Type: [1] Local
  • Command: npx -y context-api-mcp
Copilot / VS Code

Follow the MCP install guide, with the standard config from above. You can also install the Context API MCP server using the VS Code CLI:

code --add-mcp '{"name":"context-api","command":"npx","args":["-y","context-api-mcp"],"env":{"

Tools (3)

search_relevant_postsPerforms a semantic search of contextualized post renderings of a specific Twitter/X user based on natural language queries.
get_all_user_postsRetrieves all contextualized post renderings of a specific Twitter/X user for analysis.
check_creditsViews your current API credit balance and usage.

Environment Variables

CONTEXT_API_KEYrequiredAPI key obtained from dev.doppelgangers.ai

Configuration

claude_desktop_config.json
{"mcpServers": {"context-api": {"command": "npx", "args": ["-y", "context-api-mcp"], "env": {"CONTEXT_API_KEY": "your-api-key-here"}}}}

Try it

What does @visionscaper think about the future of AI?
Retrieve all recent posts from @elonmusk and summarize his stance on space exploration.
Check my current API credit balance for the Context API.
Analyze the conversation context for the latest posts by @anthropicai.

Frequently Asked Questions

What are the key features of Context API?

Semantic search of contextualized Twitter/X posts. Retrieval of full user post history with conversation context. XML-based rendering of posts including metadata and conversation summaries. Built-in credit balance and usage monitoring.

What can I use Context API for?

Analyzing social media trends and topics for specific users. Retrieving conversation context for high-quality information extraction. Monitoring public sentiment on specific subjects via semantic search. Automating research on social media discourse for content analysis.

How do I install Context API?

Install Context API by running: npx -y context-api-mcp

What MCP clients work with Context API?

Context API works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Context API docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare