A X MCP server for your AI agent
Spaces gives your AI agent an MCP server for your own X account at https://api.spacesos.com/mcp/x. It lists only your X accounts and the tools that work on X, so the agent stays on that channel. Please read X's rules below before you connect.
Conversations people start
The best fit is replying to people who send you a direct message: support questions, product questions and follow-ups they asked for. Your agent reads the chat and replies in the same conversation, and hands anything sensitive to a person.
What your agent can do on X
These tools are listed in the Spaces docs:
- List direct message chats, with an option for unread only, and read messages and attachments.
- Reply in a chat, or start a chat with a username. Start chats only with people who expect to hear from you.
- Look up a profile and check usage against Spaces' per-account limits.
One server per channel, or one for all
https://api.spacesos.com/mcp/x is limited to X: an account from another channel is refused, and connect links are for X only. https://api.spacesos.com/mcp covers every channel with the same key.
Pacing and safe retries
Spaces enforces per-account limits for every key and every agent, however the agent is prompted. New accounts warm up over their first week. Over a limit, the API returns 429 with Retry-After, and nothing was sent. Every send needs an Idempotency-Key, and the same key never sends twice.
Set up
- Sign up with your email and the 6-digit code Spaces sends. An agent can do this for you through the onboarding MCP server at https://api.spacesos.com/mcp/start.
- Add a card at checkout. Don't connect an account until checkout is finished.
- Connect X: open the connect link ("channel": "x") and sign in.
- Create an API key. It starts with spc_live_ and is shown only once, so store it safely.
- Add the X MCP server https://api.spacesos.com/mcp/x to your agent, or call the REST API at https://api.spacesos.com/v1.
Connect Claude, ChatGPT, Cursor or Grok
Every client uses the same MCP URL, https://api.spacesos.com/mcp/x, with your API key as a Bearer token. Grok, Grok Bot and Cursor can also sign in with OAuth instead of a key.
| Client | How it connects |
|---|---|
| Claude Code | Run claude mcp add with the URL and an Authorization header (below). |
| Claude Desktop | Settings, then Developer, then Edit Config: add the server with mcp-remote and your key, then restart Claude. |
| Claude API | Pass the URL in mcp_servers with your key as authorization_token, and add an mcp_toolset. |
| ChatGPT | Add a custom MCP connector with the URL and the Authorization header. |
| Cursor | Add an MCP server named spaces with the URL and header, or sign in with OAuth. |
| Grok | Use the xAI API's MCP tool with the URL and header, or sign in with OAuth. |
| Grok Bot | Connect with OAuth: no key needed. Grok Bot finds Spaces through the OAuth discovery document and you approve access. |
Claude Code, in one line:
claude mcp add --transport http spaces https://api.spacesos.com/mcp/x --header "Authorization: Bearer spc_live_xxxxxxxxxxxxxxxx"OAuth discovery is at https://api.spacesos.com/.well-known/oauth-authorization-server. API keys keep working alongside OAuth.
Who you message
Pricing
FAQ
How do I connect X to Spaces?
Open the connect link from the dashboard, the API or MCP, and sign in to your X account.
Can the agent post on X?
No. On X the tools are direct messages. Posting is available on LinkedIn.
Do I need a separate key for the X MCP server?
No. The same API key works on https://api.spacesos.com/mcp/x and on https://api.spacesos.com/mcp. Grok, Grok Bot and Cursor can also sign in with OAuth.