Skip to main content
Glama
tweetapi

TweetAPI MCP

Official
by tweetapi

TweetAPI MCP

MCP server for TweetAPI, a third-party Twitter data API. It lets AI agents read public Twitter data (search, profiles, followers, timelines, lists, communities and Spaces) and look up TweetAPI's own docs.

TweetAPI is an independent service and is not affiliated with X Corp.

Hosted server

The easiest way to use it is the hosted server. You sign in with your TweetAPI account and pick which API key backs the connection. New accounts get 100 free API units and no card is needed.

https://mcp.tweetapi.com/mcp

Codex:

codex mcp add tweetapi --url https://mcp.tweetapi.com/mcp
codex mcp login tweetapi

Claude Code:

claude mcp add --transport http --scope user tweetapi https://mcp.tweetapi.com/mcp
claude mcp login tweetapi

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "tweetapi": {
      "url": "https://mcp.tweetapi.com/mcp"
    }
  }
}

The hosted server uses Streamable HTTP and OAuth. More setup notes are in the agents guide.

Related MCP server: TwitterAPI.io MCP Server

Run it locally

You can also run the server yourself over stdio with an API key from the TweetAPI dashboard. Node 18 or newer and pnpm are required.

git clone https://github.com/tweetapi/tweetapi-mcp.git
cd tweetapi-mcp
pnpm install
pnpm run build

Then point your MCP client at it:

{
  "mcpServers": {
    "tweetapi": {
      "command": "node",
      "args": ["/path/to/tweetapi-mcp/dist/bin.js", "--live"],
      "env": {
        "TWEETAPI_API_KEY": "your_tweetapi_key_here"
      }
    }
  }
}

Without --live, only the docs tools are available and no API key is needed.

Tools

Docs (free, no API calls): tweetapi_docs_search, tweetapi_endpoint_lookup, tweetapi_docs_get_page, tweetapi_sdk_guidance, tweetapi_tool_catalog.

Live data (33 read-only tools):

  • Users: profile by username or ID, batches of up to 100, About this account, tweets, tweets and replies, followers and following (profiles or IDs), verified followers, subscriptions, follow check.

  • Tweets: search, details with replies, metrics only, batches of up to 200 by ID, quotes, retweets, translation.

  • Lists: details, tweets, members, followers.

  • Communities: details, tweets, members, search.

  • Spaces: details and audio stream URL.

Each live tool call makes exactly one TweetAPI request and is billed like any other API call. Tools never paginate on their own; the agent passes the cursor when it wants the next page.

Live tools are read-only. There are no tools for posting, DMs, follows, profile edits, account cookies or billing.

Hosted service

This repo is also the source for the service at mcp.tweetapi.com. In HTTP mode it accepts dashboard-issued OAuth tokens with the tweetapi:read scope, resolves the backing API key on the server, and never sends the bearer token upstream. It depends on TweetAPI's OAuth server, so it is not meant to be self-hosted as is. See docs/security.md and docs/deployment.md for how it works.

docker build -t tweetapi-mcp .
docker run --rm -p 3100:3100 -e MCP_ALLOWED_HOSTS=localhost,127.0.0.1 tweetapi-mcp
curl http://localhost:3100/healthz

Development

pnpm install
pnpm run check
pnpm run check:release

The checks cover formatting, Markdown lint, TypeScript, unit tests, stdio and HTTP smoke tests, and a secret scan. Tests mock the docs and the API; they never call the live TweetAPI API.

Security

Please report vulnerabilities privately. See SECURITY.md.

License

MIT

Available Tools

5 tools
tweetapi_docs_get_pageGet TweetAPI Docs PageB
Read-onlyIdempotent

Return a full endpoint documentation section from ai-docs-v2.txt.

NameRequiredDescriptionDefault
pathOrKeywordYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds the source file but does not disclose behavior like what happens if the path/keyword is not found or whether the returned content is raw text. It is consistent with annotations but adds limited context beyond them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that gets straight to the point. It contains no unnecessary words or repetition, and each word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one parameter and strong annotations, but the description fails to explain the parameter semantics, which is essential for correct invocation. It also doesn't describe the output format beyond 'full endpoint documentation section', but given no output schema, a bit more detail would help. Overall, it is minimally adequate but has gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has a single required parameter pathOrKeyword with no description (0% coverage). The description does not explain what pathOrKeyword accepts (e.g., a file path or keyword), leaving the agent to guess. With zero schema coverage, this is a significant gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear action ('Return') and a specific resource ('full endpoint documentation section') from a named source ('ai-docs-v2.txt'). This distinguishes it from sibling tools like tweetapi_docs_search and tweetapi_endpoint_lookup, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives such as tweetapi_docs_search or tweetapi_endpoint_lookup. It doesn't mention any context or exclusions, leaving the agent without direction on selecting this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tweetapi_endpoint_lookupLookup TweetAPI EndpointA
Read-onlyIdempotent

Find likely TweetAPI endpoint docs by path or keyword.

NameRequiredDescriptionDefault
pathOrKeywordYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint false. The description adds that lookup works by path or keyword and uses 'likely' suggesting fuzzy matching, but it does not disclose output format, pagination, or any other behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is front-loaded and free of filler. Every word contributes to understanding the tool's purpose and input.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one parameter and strong annotations, but the lack of an output schema means the description should clarify what the lookup returns (e.g., links, content, or a list). The phrase 'Find likely... docs' leaves ambiguity about the result format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by clarifying that the sole parameter 'pathOrKeyword' accepts either a path or a keyword. This adds meaningful semantics beyond the bare schema, though it lacks concrete examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Find'), a clear resource ('TweetAPI endpoint docs'), and the search approach ('by path or keyword'). It distinguishes itself from sibling tools like tweetapi_docs_search by focusing on locating endpoint docs rather than general documentation pages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives. The description implies its use for finding docs, but does not mention when to prefer tweetapi_docs_search or tweetapi_docs_get_page, nor does it state exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tweetapi_sdk_guidanceTweetAPI SDK GuidanceB
Read-onlyIdempotent

Return concise SDK setup and usage guidance for a language/task.

NameRequiredDescriptionDefault
taskYes
languageYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnly, openWorld, idempotent, and non-destructive behavior, so the description only needs to add extra context. It adds 'concise' (response style) and clarifies it covers 'setup and usage' guidance, but does not disclose other behaviors like network usage or response format. This is modest added context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, front-loaded with the primary verb and resource, and contains no superfluous words. It is highly concise and efficiently communicates the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two string parameters and no output schema, the description conveys the tool's purpose and inputs. However, it lacks guidance on valid values for 'language' and 'task', and does not mention any limitations or return structure. This is adequate but not robust.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, leaving parameter semantics entirely to the description. However, the description only repeats the parameter names ('language/task') without defining expected values (e.g., programming language names) or the nature of 'task'. This adds little beyond the schema's structural definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Return concise SDK setup and usage guidance.' The verb 'Return' and resource 'SDK setup and usage guidance' are specific. It also specifies the inputs ('language/task') and distinguishes itself from siblings like docs_search or endpoint_lookup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus alternatives such as tweetapi_docs_get_page or tweetapi_endpoint_lookup. While the name implies its role, there is no stated context, prerequisites, or exclusion criteria, leaving the agent to infer usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tweetapi_tool_catalogTweetAPI MCP Tool CatalogB
Read-onlyIdempotent

Return a machine-readable catalog of current TweetAPI MCP tools.

NameRequiredDescriptionDefault
categoryNo
toolNameNo
endpointPathNo

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior. The description adds the 'machine-readable' attribute, hinting at the output format, but does not disclose further behavioral details like response structure or whether filters apply.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence that front-loads the action and object. Every word contributes, with no extraneous detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema and parameter descriptions, the description is insufficient. It does not clarify what the catalog contains, how the optional parameters filter results, or the nature of the machine-readable output. More detail is needed for effective usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema documentation coverage is 0% (no descriptions), and the description does not explain the parameters (category, toolName, endpointPath). While these names suggest filters, the exact meaning and usage are left to inference, so the description fails to compensate for the missing schema info.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Return a machine-readable catalog of current TweetAPI MCP tools.' It uses a specific verb (Return) and a clear resource (catalog of tools), distinguishing it from sibling tools that fetch specific data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention that it can be used to discover available tools before invoking other endpoints, nor does it exclude any use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.2.0
    • First observedtweetapi_docs_get_page
    • First observedtweetapi_docs_search
    • First observedtweetapi_endpoint_lookup
    • First observedtweetapi_sdk_guidance
    • First observedtweetapi_tool_catalog

TDQS

A3.6/5.0

Scored across 5 tools

Disambiguation3/5

The SDK guidance and tool catalog tools are clearly distinct, but docs_search, endpoint_lookup, and docs_get_page all retrieve documentation and have overlapping boundaries. An agent may struggle to choose between search-by-keyword and endpoint lookup, or between lookup and fetching a full page.

Naming Consistency4/5

All tools use a consistent tweetapi_ prefix and snake_case, which makes the set readable and grouped. However, patterns vary between resource_action (docs_search), resource_verb_noun (docs_get_page), and noun_noun (sdk_guidance, tool_catalog).

Tool Count5/5

Five tools is well-scoped for a documentation and SDK guidance server. Each tool has a plausible role: search, lookup, full-page retrieval, SDK help, and tool discovery.

Completeness4/5

The surface covers documentation search, endpoint discovery, full endpoint sections, SDK guidance, and a machine-readable catalog. A minor gap is the lack of an explicit list-all-endpoints or browse operation, though endpoint_lookup partially covers discovery.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables LLM agents to interact with Twitter (X) for searching tweets, posting content with images, analyzing engagement, and extracting topics using the Twitter API.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI agents and coding assistants with Twitter data access including tweets, user profiles, followers, and search functionality.
    MIT
  • A
    license
    C
    quality
    B
    maintenance
    Enables AI agents to search, read user profiles, timelines, media, follow threads, track trends, and manage accounts on X/Twitter via GraphQL, without browser automation or paid API keys.
    100
    11
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI agents to read, post, search, and engage with Twitter/X content, including AI-powered reply drafting and analytics.
    17
    MIT