360 Secure SkillHub
360 安全技能中心

X

封装本地 XMCP 服务,经 mcporter 调用 X API,完成对帖子、用户、时间线与搜索结果的读取和操作;发帖、删除、转发、点赞、关注等写操作需用户确认,OAuth 凭据在安装时由环境变量写入本地保管库。

分类:营销
maverick
maverick
热度 45.45
最近更新 2026-10-22 07:52:11

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add maverick/maverick-x-mcp
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
maverick-x-mcp
description
Search, read, and work with X posts, users, timelines, and search through a local XMCP wrapper. Use when the user asks about X posts, users, timelines, or search.
homepage
https://docs.x.com/tools/mcp
metadata
{"openclaw":{"emoji":"𝕏","requires":{"bins":["mcporter","uv"],"env":["MAVERICK_X_MCP_ACCESS_TOKEN","MAVERICK_X_MCP_REFRESH_TOKEN","MAVERICK_X_MCP_CLIENT_ID","MAVERICK_X_MCP_CLIENT_SECRET"]},"primaryEnv":"MAVERICK_X_MCP_REFRESH_TOKEN","setup":{"script":"scripts/setup.sh"},"install":[{"id":"node","kind":"node","package":"mcporter@0.13.10","bins":["mcporter"],"label":"Install mcporter (node)"},{"id":"brew-uv","kind":"brew","formula":"uv","bins":["uv"],"label":"Install uv (brew)"}]}}

X

Quick start

Always invoke through the local HTTP wrapper. The wrapper starts this skill's local XMCP server on loopback when needed, waits for readiness, and then calls mcporter. OAuth vault seeding happens separately through scripts/setup.sh before agent use.

uv run --script {baseDir}/scripts/local_http_invoke.py list maverick-x --schema

For structured output:

uv run --script {baseDir}/scripts/local_http_invoke.py call --output json maverick-x.<tool> key=value

Safety

Write operations that post, delete posts, reply, repost, like, follow, edit, or otherwise publish externally visible X content require explicit user confirmation with the exact final text or action. Search and read tools are safe to call freely while exploring. Resolve user handles and post IDs before acting on them.

Authentication

Credentials are provisioned at setup time by scripts/setup.sh (a thin delegator to scripts/init-mcporter-oauth.sh) and stored in mcporter's local vault. The setup hook requires these credential env vars:

  • MAVERICK_X_MCP_REFRESH_TOKEN
  • MAVERICK_X_MCP_CLIENT_ID
  • MAVERICK_X_MCP_CLIENT_SECRET
  • MAVERICK_X_MCP_ACCESS_TOKEN

For refresh-aware seeding, setup also reads optional expiry metadata env vars when the provisioner supplies them:

  • MAVERICK_X_MCP_EXPIRES_AT
  • MAVERICK_X_MCP_EXPIRES_IN
  • MAVERICK_X_MCP_REFRESH_TOKEN_EXPIRES_AT

mcporter refreshes expired X access tokens through X's OAuth2 token endpoint before calling the local XMCP server. If calls keep returning HTTP 401 after retry, the OAuth grant has likely been revoked or expired; reconnect the integration.

Data flow

Tool calls travel from the agent to mcporter, then to this skill's local XMCP server at http://127.0.0.1:8765/mcp. The local server forwards X API requests with the bearer token supplied on each MCP request. X sees the post, user, timeline, and search data referenced by each call. Use this skill for X-related work only; do not pass unrelated sensitive content through these tools.

Dependencies

  • mcporter (github.com/openclaw/mcporter) — MCP CLI used to invoke the local MCP server. If it is missing from PATH, the frontmatter installs the exact mcporter@0.13.10 package with npm install scripts disabled.
  • uv (docs.astral.sh/uv) — runs the Python wrapper and local XMCP launcher from inline script metadata.