Skip to main content
Glama
x-mcp-server

x-mcp-server

by lluisfont

X MCP Server

适用于官方 X API 的 TypeScript Model Context Protocol (MCP) 服务器。

该项目允许兼容 MCP 的代理(包括 ChatGPT 代理)通过运行在您自己计算机上的本地服务器,安全地读取 X 账户并向其发布内容。

该服务器支持:

  • 读取已认证的 X 账户。

  • 按用户名查找 X 用户。

  • 按 ID 读取帖子。

  • 列出用户的最新帖子。

  • 使用 X 搜索语法搜索最新帖子。

  • 在显式启用写入模式时创建帖子和回复。

  • 为每台本地计算机安装选择不同的 X 账户。

  • 通过 stdio 为本地 MCP 主机运行。

  • 通过 OpenAI Secure MCP Tunnels 为 ChatGPT 在本地 Streamable HTTP 上运行。

项目状态

这是一个功能完善的 MVP。

已实现:

  • 基于 stdio 的 MCP 服务器。

  • 基于 Streamable HTTP 的 MCP 服务器。

  • 官方 X API 客户端。

  • 本地多账户配置。

  • 默认安全的 read-only 模式。

  • 显式的 read-write 模式,用于发布和回复。

  • 用于 X 账户重新授权的本地 OAuth 2.0 Authorization Code + PKCE 辅助工具。

  • 使用 Vitest 的单元测试。

  • 通过 OpenAI Secure MCP Tunnels 连接 ChatGPT 的指南。

  • Windows 上手动和自动启动的本地服务器生命周期指南。

Related MCP server: X API FastMCP Server

工作原理

对于本地 MCP 主机:

MCP host
  -> stdio
  -> x-mcp-server
  -> official X API

对于 ChatGPT 代理:

ChatGPT agent
  -> custom MCP app
  -> OpenAI Secure MCP Tunnel
  -> tunnel-client on your computer
  -> http://127.0.0.1:3001/mcp
  -> x-mcp-server
  -> official X API

X 凭据保留在本地。ChatGPT 通过隧道连接到本地 MCP 服务器;它不会收到您的 X 访问令牌。

可用的 MCP 工具

工具

类型

描述

x_get_active_account

读取

返回选定的本地配置文件、已配置的账户、模式以及已认证的 X 用户。

x_get_me

读取

返回已认证的 X 用户。

x_get_user

读取

按用户名查找 X 用户。

x_get_post

读取

按 ID 读取帖子。

x_get_user_posts

读取

列出由用户 ID 撰写的最新帖子。

x_search_posts

读取

使用官方 X 查询语法搜索最新帖子。

x_create_post

写入

发布新帖子。需要 X_MCP_MODE=read-write。

x_reply_post

写入

回复帖子。需要 X_MCP_MODE=read-write。

除非设置了 X_MCP_MODE=read-write,否则写入工具会被阻止。

要求

  • Node.js 20 或更高版本。

  • 一个 X Developer 账户。

  • 一个启用了 OAuth 2.0 的 X Developer App。

  • X 读取范围:tweet.read users.read。

  • 用于发布和回复的 X 写入范围:tweet.write。

  • 推荐的 X 刷新范围:offline.access。

  • 对于 ChatGPT:已启用开发者模式。

  • 对于 ChatGPT 本地连接:一个 OpenAI Secure MCP Tunnel 和 tunnel-client。

分步安装

1. 克隆仓库

git clone https://github.com/lluisfont/x-mcp-server.git
cd x-mcp-server

如果您已经有该仓库:

cd C:\Repos\x-mcp-server
git pull

2. 安装依赖

npm install

3. 创建本地环境文件

Copy-Item .env.example .env

在本地编辑 .env。

不要提交 .env。它可能包含访问令牌、刷新令牌、客户端密钥和私有 API 密钥。

4. 配置活动的 X 账户

对于命名本地账户:

X_MCP_ACCOUNT=fcbnews2026
X_MCP_MODE=read-only
X_API_BASE_URL=https://api.x.com

X_ACCOUNT_FCBNEWS2026_USER_ACCESS_TOKEN=
X_ACCOUNT_FCBNEWS2026_REFRESH_TOKEN=

对于同一台计算机上的多个账户:

X_MCP_ACCOUNT=fcbnews2026
X_MCP_MODE=read-only

X_ACCOUNT_FCBNEWS2026_USER_ACCESS_TOKEN=
X_ACCOUNT_FCBNEWS2026_REFRESH_TOKEN=

X_ACCOUNT_LLUISFONT_USER_ACCESS_TOKEN=
X_ACCOUNT_LLUISFONT_REFRESH_TOKEN=

X_MCP_ACCOUNT 选择此安装使用的本地配置文件。不同计算机可以选择不同账户,而无需更改代码。

同时支持传统的单账户模式:

X_MCP_ACCOUNT=default
X_USER_ACCESS_TOKEN=

新安装应优先使用命名账户。

5. 选择传输方式

对于直接启动进程的本地 MCP 主机:

X_MCP_TRANSPORT=stdio

对于通过本地隧道的 ChatGPT:

X_MCP_TRANSPORT=http
X_MCP_HTTP_PORT=3001
X_MCP_HTTP_PATH=/mcp

6. 运行类型检查和测试

npm run typecheck
npm test
npm run build

7. 启动 MCP 服务器

对于 stdio:

npm run dev

对于本地 HTTP:

npm run dev:http

默认的 HTTP MCP 端点为:

http://127.0.0.1:3001/mcp

健康检查:

Invoke-RestMethod http://127.0.0.1:3001/healthz | ConvertTo-Json -Compress

预期响应:

{"ok":true,"transport":"http","activeAccount":"fcbnews2026","mode":"read-only"}

本地 MCP 服务器生命周期

当 ChatGPT 通过隧道使用此 MCP 时,必须运行两个本地进程:

1. The MCP HTTP server
   -> npm run dev:http
   -> http://127.0.0.1:3001/mcp

2. tunnel-client
   -> .\.tools\tunnel-client\tunnel-client.exe run --profile <profile>
   -> OpenAI Secure MCP Tunnel

如果任一进程停止,ChatGPT 将无法使用 MCP 工具。

手动启动

终端 1:

cd C:\Repos\x-mcp-server
npm run dev:http

终端 2:

cd C:\Repos\x-mcp-server
.\.tools\tunnel-client\tunnel-client.exe run --profile x-fcbnews

保持两个终端都处于打开状态。

验证本地可用性

检查 MCP 服务器:

Invoke-RestMethod http://127.0.0.1:3001/healthz | ConvertTo-Json -Compress

检查隧道客户端:

Invoke-WebRequest http://127.0.0.1:8080/readyz -UseBasicParsing

隧道就绪端点应返回 HTTP 200。

手动停止

在以下位置按下 Ctrl+C:

  • 运行 npm run dev:http 的终端。

  • 运行 tunnel-client run 的终端。

一旦两者都停止,ChatGPT 将无法访问本地 MCP 服务器。

更改账户或安全模式

编辑 .env。

更改活动账户:

X_MCP_ACCOUNT=fcbnews2026

启用写入模式:

X_MCP_MODE=read-write

返回安全的只读模式:

X_MCP_MODE=read-only

更改 .env 后重启 MCP HTTP 服务器:

Ctrl+C
npm run dev:http

如果本地端口和 MCP 路径未更改,隧道可以保持运行。

在 Windows 登录时自动启动

对于需要定期托管此 MCP 的计算机,请使用 Windows 任务计划程序。

创建一个本地启动脚本,例如:

C:\Users\<user>\mcp-start\x-fcbnews-start.ps1

脚本:

$repo = "C:\Repos\x-mcp-server"
$profile = "x-fcbnews"

Set-Location $repo

Start-Process powershell.exe -ArgumentList @(
  "-NoExit",
  "-ExecutionPolicy", "Bypass",
  "-Command", "cd `"$repo`"; npm run dev:http"
) -WindowStyle Minimized

Start-Sleep -Seconds 5

Start-Process powershell.exe -ArgumentList @(
  "-NoExit",
  "-ExecutionPolicy", "Bypass",
  "-Command", "cd `"$repo`"; .\.tools\tunnel-client\tunnel-client.exe run --profile $profile"
) -WindowStyle Minimized

注册计划任务:

$action = New-ScheduledTaskAction `
  -Execute "powershell.exe" `
  -Argument "-ExecutionPolicy Bypass -File `"C:\Users\<user>\mcp-start\x-fcbnews-start.ps1`""

$trigger = New-ScheduledTaskTrigger -AtLogOn

Register-ScheduledTask `
  -TaskName "X MCP FCBNews2026" `
  -Action $action `
  -Trigger $trigger `
  -Description "Starts the local X MCP server and OpenAI tunnel-client at Windows logon."

禁用自动启动:

Disable-ScheduledTask -TaskName "X MCP FCBNews2026"

重新启用:

Enable-ScheduledTask -TaskName "X MCP FCBNews2026"

删除它:

Unregister-ScheduledTask -TaskName "X MCP FCBNews2026" -Confirm:$false

完整生命周期指南:

docs/local-server-lifecycle.md

连接到 ChatGPT

高层流程:

1. Run the MCP server over local HTTP.
2. Create a tunnel in OpenAI Platform.
3. Create a local tunnel-client profile pointing to http://127.0.0.1:3001/mcp.
4. Start tunnel-client.
5. Create a custom MCP app in the ChatGPT agent using Connection: Tunnel.
6. Test x_get_active_account or x_get_me before any write operation.

推荐的 ChatGPT 自定义 MCP 设置:

Connection: Tunnel
Tunnel: <your OpenAI tunnel>
Authentication: No authentication

当 MCP 服务器在本地管理最终服务凭据时(例如通过 .env),请使用 No authentication。

完整的 ChatGPT 设置指南:

docs/chatgpt-mcp-setup.md

重新授权 X 账户

在 X Developer 中配置应用:

OAuth 2.0: Enabled
App permissions: Read and write
Callback URI: http://127.0.0.1:3002/callback
Website URL: http://127.0.0.1:3002

运行:

$env:X_OAUTH_CLIENT_ID = "<OAuth 2.0 Client ID>"
$env:X_MCP_ACCOUNT = "fcbnews2026"
npm run x:oauth

在登录目标 X 账户的状态下打开生成的 URL。授权后,辅助工具会使用所选账户令牌更新 .env。

重新授权后重启 MCP 服务器:

npm run dev:http

然后使用以下命令验证:

x_get_active_account

详细的 OAuth 指南:

docs/x-oauth.md

安全模型

服务器默认以只读模式启动:

X_MCP_MODE=read-only

写入工具需要:

X_MCP_MODE=read-write

发布前:

  • 使用 x_get_active_account 验证活动账户。

  • 确认要发布的确切文本。

  • 确保 X 令牌具有 tweet.write。

  • 要求代理返回生成的 post_id。

  • 在 X 返回 ID 之前,不要将帖子视为已发布。

脚本

脚本

目的

npm run dev

通过 stdio 启动 MCP 服务器。

npm run dev:http

通过本地 HTTP 启动 MCP 服务器。

npm run x:oauth

运行本地 X OAuth 授权辅助工具。

npm run build

将 TypeScript 编译到 dist。

npm run start

通过 stdio 启动编译后的服务器。

npm run start:http

通过 HTTP 启动编译后的服务器。

npm run typecheck

运行 TypeScript 而不输出文件。

npm test

运行 Vitest 测试套件。

文档

操作安全

  • 将凭据保留在 Git 之外。

  • 保持 read-only 为默认模式。

  • 仅对受控工作流启用 read-write。

  • 发布前验证活动账户。

  • 不要记录访问令牌或刷新令牌。

  • 不要将令牌粘贴到聊天、问题、文档或拉取请求中。

  • 不要在共享计算机上以 read-write 模式运行自动启动。

许可证

尚未选择开源许可证。

Available Tools

8 tools
x_create_postB

Publish a new X post. Requires X_MCP_MODE=read-write and tweet.write scope.

NameRequiredDescriptionDefault
textYes

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the write/non-destructive profile is covered. The description adds genuine behavioral context by naming the required server mode and OAuth scope, but says nothing about idempotency, rate limits, or what the call returns.

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?

Two short sentences, zero filler, with the action front-loaded and the prerequisite immediately after. Every clause carries information.

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?

Prerequisites are covered, but with no output schema and an undocumented parameter, the definition leaves the agent guessing about the payload shape and the response. Adequate for a simple publish action but with clear 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?

Schema description coverage is 0% for the single required 'text' parameter, and the description never mentions it. No content format, mention/link handling, or length constraints are conveyed beyond the bare minLength/maxLength in the schema.

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

Purpose4/5

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

The description uses a specific verb+resource ('Publish a new X post'), which is unambiguous and distinguishable from the read-oriented siblings (x_get_post, x_search_posts). It does not explicitly contrast with x_reply_post, the other write sibling, so it stops short of a 5.

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

Usage Guidelines3/5

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

It states prerequisites (X_MCP_MODE=read-write, tweet.write scope), which implies context of use, but gives no explicit when-to-use versus x_reply_post or when-not guidance. Useful but inferential rather than directive.

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

x_get_active_accountA
Read-only

Get the local X account profile selected for this MCP server installation. Does not expose tokens.

NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior4/5

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

readOnlyHint=true already establishes the safety profile, so the bar is lower, and the description adds a genuine security-relevant disclosure: 'Does not expose tokens.' That is useful context beyond the annotation. It does not describe return contents, but the token caveat is the meaningful addition.

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?

Two short sentences, no filler, with the resource identity front-loaded and the security caveat in the second clause. Nothing extraneous.

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

Completeness4/5

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

For a zero-parameter read-only tool with annotations covering safety, this is nearly complete. The only missing piece is a hint about what profile fields come back, which matters slightly since no output schema exists.

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?

Zero parameters, so the baseline is 4 by rule. There is no parameter surface for the description to clarify or obscure.

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

Purpose4/5

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

States a specific verb and resource ('Get the local X account profile') and scopes it to the account selected for this installation. It is largely distinguishable from siblings, though the boundary with x_get_me is not spelled out in the description itself.

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 on when to use this versus x_get_me or x_get_user, which is the most likely confusion given the near-identical resource. The agent has to infer the distinction from the name alone.

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

x_get_meB
Read-only

Get the authenticated X user.

NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior3/5

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

The readOnlyHint=true annotation already establishes this is a safe read, so the description's main added value is the 'authenticated' scoping, which implies auth is required and no user id is passed. It says nothing about what identity fields come back or what happens if the token is invalid.

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?

A single front-loaded sentence with no filler. Every word carries information.

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 parameterless read with annotations covering the safety profile, this is nearly sufficient, but the ambiguity against x_get_user and x_get_active_account is unresolved and no return-shape hint is given (there is no output schema).

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?

Zero parameters, so there is nothing for the description to clarify; baseline 4 applies. The description correctly implies the user is derived from the authenticated session rather than passed in.

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

Purpose4/5

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

States a specific verb and resource ('get the authenticated X user'), which is meaningful against siblings like x_get_user and x_get_active_account. However, it does not explicitly distinguish itself from those overlapping siblings, so the reader must infer the difference.

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 on when to use this versus x_get_user or x_get_active_account, both of which plausibly return user data. The agent is left to infer the distinction from the word 'authenticated' alone.

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

x_get_postB
Read-only

Get a single X post by ID.

NameRequiredDescriptionDefault
postIdYes

TDQS

B3.4/5.0
Behavior3/5

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

The readOnlyHint annotation already declares this as a safe read, so the description's remaining burden is lower. It adds little beyond the annotation: no mention of auth requirements, deleted/protected post behavior, or rate limits. A 3 reflects that annotations carry the safety profile while the description adds almost nothing.

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?

A single, front-loaded sentence with zero waste. Appropriate for a simple lookup tool.

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 basic read-by-ID tool with annotations covering safety, this is minimally adequate. Missing are edge-case behavior, format of the ID, and sibling differentiation, leaving some gaps for an agent choosing among post-related tools.

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?

There is only one parameter, so the baseline is 4. Schema coverage is 0% and the description only restates 'by ID', but with a single obvious parameter the description is adequate.

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

Purpose4/5

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

The description states a specific verb and resource: retrieving a single X post by ID. It is clear on its own, but it offers no distinction from siblings like x_search_posts or x_get_user_posts, which also return post 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?

There is no guidance on when to use this tool versus x_search_posts or x_get_user_posts. The word 'single' implies an exact-ID lookup, but this is not explicit and no alternatives or exclusions are named.

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

x_get_userC
Read-only

Get an X user by username.

NameRequiredDescriptionDefault
usernameYesUsername without @

TDQS

C2.9/5.0
Behavior2/5

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

readOnlyHint=true already tells the agent this is a safe read, and the description adds nothing further: no failure behavior for unknown usernames, no note on what user data is returned, no authentication context. It restates the operation rather than disclosing behavior.

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

Conciseness4/5

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

A single front-loaded sentence with no filler. It is appropriately sized for a one-parameter lookup, though it is arguably too sparse to be maximally useful.

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 one-param read with annotations covering safety and full schema coverage, the essentials are present. Still missing is any signal about return content or how to distinguish this from x_get_me and x_get_active_account.

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

Parameters3/5

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

Schema description coverage is 100%, including the useful 'Username without @' constraint, so the schema carries full parameter meaning. The description adds nothing beyond that, which is the expected baseline when the schema does the work.

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

Purpose4/5

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

The description states a specific verb and resource ('Get an X user by username'), so its function is unambiguous. However, it does not distinguish itself from close siblings like x_get_me or x_get_active_account, leaving the agent to infer which retrieval path applies.

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?

There is no when-to-use guidance and no mention of alternatives. With siblings that also return users (x_get_me, x_get_active_account), the definition provides no basis for choosing between them.

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

x_get_user_postsC
Read-only

Get recent posts authored by an X user ID.

NameRequiredDescriptionDefault
userIdYes
maxResultsNo

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds one useful behavioral trait, that only 'recent' posts are returned (not full history), but it never defines that window or says anything about pagination or ordering.

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

Conciseness4/5

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

A single front-loaded sentence with no wasted words. It is efficient, though arguably under-specified rather than optimally concise.

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?

For a low-complexity two-parameter tool with no output schema, an agent still lacks what 'recent' means, how many posts come back, whether the list is paginated, and what fields are returned. The definition is too thin to call correctly with confidence.

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?

Schema description coverage is 0%, so the description must compensate, yet it only restates that userId is an X user ID. maxResults is entirely unaddressed in the description; the schema supplies default/min/max but no meaning for the value or how results are paged.

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

Purpose4/5

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

Names a specific verb and resource ('Get recent posts authored by an X user ID'), so the agent knows exactly what is retrieved. It does not distinguish itself from siblings like x_search_posts or x_get_post, but the by-user scoping is still clear.

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 when-to-use guidance, no mention of alternatives (e.g. x_search_posts for query-based retrieval, x_get_post for a single post), and no prerequisites such as requiring a user ID from x_get_user or x_get_me.

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

x_reply_postA

Reply to an X post. Requires X_MCP_MODE=read-write and tweet.write scope.

NameRequiredDescriptionDefault
textYes
postIdYes

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already establish this is a non-read-only, non-destructive write. The description adds the auth/config requirement (mode and scope), which is genuine value beyond the annotations. It omits rate limits, whether the reply threads to the parent, and error/permission failure behavior.

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?

Two tight sentences with zero filler; the action is front-loaded and the prerequisite follows. Sized appropriately for a simple two-parameter tool.

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?

No output schema exists, so the description should say what comes back, and it doesn't. Combined with undocumented parameters and no sibling differentiation, the definition is adequate but leaves real gaps for a write tool.

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

Parameters3/5

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

Two required parameters with 0% schema description coverage, so the schema alone explains nothing about 'text' (reply body) or 'postId' (target post). The description mentions replying to 'a post' but does not map either parameter or note the 25000-char limit implied by the schema.

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

Purpose4/5

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

Names a specific verb+resource ('Reply to an X post'), which is unambiguous on its own. It does not differentiate from the closely related sibling x_create_post (a reply is a kind of post creation), leaving the agent to infer the boundary.

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

Usage Guidelines3/5

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

Gives a real precondition (X_MCP_MODE=read-write and tweet.write scope), which is useful operational guidance. It says nothing about when to prefer this over x_create_post or x_get_post, and no exclusions are stated, so usage is only partially covered.

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

x_search_postsC
Read-only

Search recent X posts using the official X query syntax.

NameRequiredDescriptionDefault
queryYes
maxResultsNo

TDQS

C2.7/5.0
Behavior2/5

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

Annotations already establish readOnlyHint=true, so the safety profile is covered. The description adds one genuine behavioral fact — results are limited to 'recent' posts, not the full archive — but says nothing about rate limits, authentication requirements, result volume, or how results are ordered, leaving meaningful behavioral gaps for a search tool.

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

Conciseness4/5

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

A single front-loaded sentence with no wasted words. It is efficiently sized, though the extreme brevity is part of why other dimensions are thin.

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?

With no output schema, 0% parameter description coverage, and only a readOnlyHint annotation, the description would need to carry most of the load. Instead it omits the query syntax details, the meaning of maxResults, and any sense of the returned result shape, so an agent cannot call this confidently without outside knowledge.

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?

Schema description coverage is 0%, so both parameters are undocumented in the schema. The description nods at 'official X query syntax' for the query parameter but gives no operators, examples, or format rules, and it says nothing at all about maxResults (its default of 10, its 10-100 range, or how it interacts with the query).

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

Purpose4/5

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

States a specific verb ('Search') and resource ('recent X posts'), which is clear on its face. It does not, however, distinguish itself from siblings such as x_get_user_posts or x_get_post, which also return posts, so the agent must infer the distinction from the verb alone.

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?

There is no explicit when-to-use guidance, no conditions or exclusions, and no reference to the sibling tools that also retrieve posts. The word 'recent' implies a temporal scope but the description never tells the agent when search is preferable to x_get_user_posts or x_get_post.

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. 8 tool updatesv0.1.0
    • First observedx_create_post
    • First observedx_get_active_account
    • First observedx_get_me
    • First observedx_get_post
    • First observedx_get_user
    • First observedx_get_user_posts
    • First observedx_reply_post
    • First observedx_search_posts

TDQS

B3.4/5.0

Scored across 8 tools

Disambiguation4/5

Tools have largely distinct purposes: get_active_account (local config) vs get_me (authenticated API user) vs get_user (by username) are differentiated by descriptions, and get_post vs get_user_posts vs search_posts are clearly separated. Minor potential confusion among the three user-retrieval tools, but descriptions resolve it adequately.

Naming Consistency5/5

All tools follow a consistent snake_case pattern with an x_ prefix and verb_noun structure (e.g., x_get_user, x_create_post, x_reply_post). No deviations in style or convention.

Tool Count5/5

Eight tools is well-scoped for a focused X API server covering basic read and write operations. Each tool earns its place, with no redundant or excessive entries.

Completeness3/5

The surface covers reading posts/users and creating posts/replies, but notable gaps exist: no delete or edit post, no like/retweet, and no follow/unfollow. These missing operations limit common agent workflows.

Maintenance

ActivityStale
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that provides AI agents with full access to the X (Twitter) API for posting, searching, and managing engagement through natural language. It supports comprehensive tools for tweet management, media uploads, and account analytics across multiple MCP-compatible clients.
    15
    60
    MIT
  • F
    license
    Not graded
    quality
    F
    maintenance
    A local MCP server that exposes the X API (formerly Twitter API) as tools, enabling operations like posting, searching, user management, and more via natural language commands.
    867
    -
  • A
    license
    A
    quality
    B
    maintenance
    MCP server for the Twitter/X API, enabling search, user profiles, tweets, followers, and more via natural language.
    94
    390 npm
    6
    MIT