Context API MCP Server

Context API MCP Server

Accesses the doppelgangers.ai Social Media Context API to provide contextualized XML renderings of Twitter/X posts including conversation summaries and metadata. It enables semantic search and comprehensive post retrieval for high-quality analysis of social media trends and topics.

Category
访问服务器

README

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

<details> <summary>Amp</summary>

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

</details>

<details> <summary>Antigravity</summary>

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.

</details>

<details> <summary>Claude Code</summary>

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

claude mcp add context-api npx context-api-mcp

</details>

<details> <summary>Claude Desktop</summary>

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.

</details>

<details> <summary>Cline</summary>

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

</details>

<details> <summary>Codex</summary>

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

</details>

<details> <summary>Copilot CLI</summary>

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

</details>

<details> <summary>Copilot / VS Code</summary>

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":{"CONTEXT_API_KEY":"your-api-key-here"}}'

</details>

<details> <summary>Cursor</summary>

  1. Open Cursor Settings
  2. Go to Features > MCP
  3. Click + Add New MCP Server
  4. Enter the following details:
    • Name: Context API
    • Type: command
    • Command: npx -y context-api-mcp
  5. Add your API key in the environment variables section if supported, or ensure it's set in your system environment.

</details>

<details> <summary>Factory CLI</summary>

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

droid mcp add context-api "npx -y context-api-mcp"

</details>

<details> <summary>Gemini CLI</summary>

Install the Context API MCP server using the Gemini CLI.

Project wide:

gemini mcp add context-api npx context-api-mcp

Globally:

gemini mcp add -s user context-api npx context-api-mcp

Alternatively, follow the MCP guide and use the standard config from above.

</details>

<details> <summary>Gemini Code Assist</summary>

Follow the configure MCP guide using the standard config from above.

</details>

<details> <summary>JetBrains AI Assistant & Junie</summary>

Go to Settings | Tools | AI Assistant | Model Context Protocol (MCP) -> Add. Use the config provided above. The same way context-api-mcp can be configured for JetBrains Junie in Settings | Tools | Junie | MCP Settings -> Add. Use the config provided above.

</details>

<details> <summary>Kiro</summary>

In Kiro Settings, go to Configure MCP > Open Workspace or User MCP Config > Use the configuration snippet provided above.

Or, from the IDE Activity Bar > Kiro > MCP Servers > Click Open MCP Config. Use the configuration snippet provided above.

</details>

<details> <summary>Qoder</summary>

In Qoder Settings, go to MCP Server > + Add > Use the configuration snippet provided above.

Alternatively, follow the MCP guide and use the standard config from above.

</details>

<details> <summary>Qoder CLI</summary>

Install the Context API MCP server using the Qoder CLI (guide):

Project wide:

qodercli mcp add context-api -- npx context-api-mcp

Globally:

qodercli mcp add -s user context-api -- npx context-api-mcp

</details>

<details> <summary>Visual Studio</summary>

Follow the Visual Studio MCP documentation to add the server using the standard config from above.

</details>

<details> <summary>Warp</summary>

Go to Settings | AI | Manage MCP Servers -> + Add to add an MCP Server. Use the config provided above.

</details>

<details> <summary>Windsurf</summary>

Follow the configure MCP guide using the standard config from above.

</details>

<details> <summary>Zed</summary>

Edit your Zed settings file (settings.json):

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

</details>

Usage Examples

Once configured, you can use the tools in your MCP client:

Search Relevant Posts

Semantic search of contextualized post renderings of a certain Twitter/X user, based on a natural language query.

What does @elonmusk think about AI regulation?

Get All User Posts

Retrieve all contextualized post renderings of a specific Twitter/X user. This tool is useful when you need to analyse posts for insights, trends and topics over all posts.

What has recently been the mood of @elonmusk?

Check Credits

Check your Context API credit balance and usage statistics.

How many API credits do I have left?

Tool Reference

search_relevant_posts

search_relevant_posts

Semantic search of contextualized post renderings of a certain Twitter/X user, based on a natural language query. Use this tool to find specific posts, relevant to the query.

Parameter Type Required Description
query string Yes Natural language search query
username string Yes Twitter/X username (without @)
platform string No Platform (default: "X")

get_all_user_posts

Retrieve all contextualized post renderings of a specific Twitter/X user. This tool is useful when you need to analyse posts for insights, trends and topics over all posts.

Parameter Type Required Description
username string Yes Twitter/X username (without @)
platform string No Platform (default: "X")
simple boolean No If true, returns simplified post renderings without metadata
limit number No Max results to return (default: all)
offset number No Pagination offset (default: 0)

check_credits

Check your Context API credit balance and usage statistics. No parameters required.

Environment Variables

Variable Required Default Description
CONTEXT_API_KEY Yes - Your Context API key
CONTEXT_API_URL No https://dev.doppelgangers.ai:3003 API base URL (optional)

Troubleshooting

Server not showing in Client

  1. Ensure you have Node.js 18+ installed
  2. Check that CONTEXT_API_KEY is set correctly
  3. Restart your client completely

API errors

Check the client logs for detailed error messages. The server outputs to stderr to avoid interfering with the MCP protocol.

Test the server manually

CONTEXT_API_KEY=your-key npx context-api-mcp

Development

To run the server from source:

  1. Clone the repository
  2. Install dependencies:
    npm install
    
  3. Build the project:
    npm run build
    
  4. Run the server:
    node dist/index.js
    

Links

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选