# TwitterTools MCP

> TwitterTools MCP is an open-source MCP server for developer tools. Fetch public X posts and threads and count or split text with X's real limits. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://twittertools.com
- **Repository:** https://github.com/steley/twittertools/tree/HEAD/mcp
- **MCP Registry name:** io.github.steley/twittertools-mcp
- **Categories:** developer tools, communication
- **Listing updated:** 2026-11-16

## About

Two of the five tools call the stateless twittertools.com API, which resolves public posts through X's free syndication endpoint; the other three run offline on your machine. Media is not proxied: post results carry direct pbs.twimg.com and video.twimg.com URLs that any client can fetch itself.

The character counter applies X's actual rules, with CJK characters counted double and every link counted as 23. The thread splitter breaks long text into numbered posts that fit the limit, and the URL parser returns the ID, author handle, posting time and canonical permalink.

The package has zero dependencies, with a hand-rolled line-delimited JSON-RPC layer over stdio, which the README presents as a small supply-chain surface. It needs Node 18 or newer. It stores nothing and has no telemetry, accounts or API keys. Set TWITTERTOOLS_API_BASE to point lookups at your own self-hosted instance. The project is MIT licensed and independent of X Corp.

## Features

- **Post fetching:** Get a public post by URL or ID with text, author and direct media URLs.
- **Thread unrolling:** Returns a thread's posts in order and flags partial results.
- **Real character counting:** Applies the 280 limit with CJK doubled and links fixed at 23.
- **Thread splitting:** Turns long text into numbered posts that fit the limit.
- **URL parsing:** Extracts ID, handle, time and permalink from a post link.
- **Self-hostable API:** Point the server at your own instance to keep lookups on your infrastructure.

## Good for

- Have an assistant read a linked post or thread
- Draft a long post and split it into a numbered thread
- Check whether text fits X's limit before posting
- Extract the author and timestamp from a post URL
- Run lookups through a self-hosted instance

## Install

### Claude Code (Terminal)

```sh
claude mcp add twittertools-mcp -- npx -y twittertools-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "twittertools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "twittertools-mcp"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "twittertools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "twittertools-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "twittertools-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "twittertools-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "twittertools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "twittertools-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "twittertools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "twittertools-mcp"
      ]
    }
  }
}
```

## Tools

- `get_tweet`: Fetch a public post by URL or ID.
- `get_thread`: Unroll a thread into its posts.
- `count_chars`: Measure text against X's 280-character limit.
- `split_thread`: Split long text into numbered posts.
- `parse_tweet_url`: Turn a URL or ID into ID, handle, time and permalink.

## FAQ

### Do I need an X login or API key?

No. It needs no login, tracking or API keys.

### Which tools work offline?

count_chars, split_thread and parse_tweet_url run offline; get_tweet and get_thread call the twittertools.com API.

### What do I need to run it?

Node 18 or newer; launch it with npx -y twittertools-mcp.

### What is the licence?

MIT.

### Is TwitterTools MCP free?

Yes. TwitterTools MCP is open source, so you can use and self-host it for free.

### How do I add TwitterTools MCP to Claude Code?

Run this command in your terminal: claude mcp add twittertools-mcp -- npx -y twittertools-mcp

### What are the best alternatives to TwitterTools MCP?

The closest alternatives to TwitterTools MCP are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/twittertools-mcp
