xctx-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
xctx.
The context layer for X.
Bring X into your AI's context.
An open-source, zero-cost MCP server that brings X content and personal writing context into AI assistants.
Repository | |
Plugin |
|
MCP server |
|
What it does
xctx makes content you provide from X available as structured, attributed context over MCP. It keeps your imported posts, archive, and writing preferences local by default. An AI client can retrieve that context and use it in the conversation.
xctx looks up your imports first. For a public link outside your library, ChatGPT can use its own web search to find and cite the exact post. Coverage depends on what the search can surface. ChatGPT integration
Related MCP server: pyX-MCP
Architecture
flowchart LR
U[You] --> C[ChatGPT or another MCP client]
C --> M[xctx-mcp]
M --> P[Manual post library]
M --> A[Imported X archive]
M --> S[Style and preferences]
P --> M
A --> M
S --> M
M --> CsequenceDiagram
actor You
participant Chat as ChatGPT
participant MCP as xctx-mcp
participant Data as Local context
You->>Chat: X URL and a question
Chat->>MCP: get_post(url)
MCP->>Data: Look up imported post
Data-->>MCP: Content with provenance, or not found
MCP-->>Chat: Structured result
opt No import and public URL
Chat->>Web: Search for the exact post
Web-->>Chat: Matching source, if available
end
Chat-->>You: Cited answer or request for the textWeb results stay in the chat. If the host cannot source the exact post, paste the text or attach a screenshot.
Requirements
Node.js 24 or later
npm
Install and run
git clone https://github.com/ozgureyilmaz/xctx.git
cd xctx
npm ci
npm run build
npm run mcp:stdioUse npm run dev while developing. The package also provides typecheck, test, lint, test:integration, and smoke scripts. See local setup for HTTP mode, imports, and troubleshooting.
For local HTTP mode, xctx binds to loopback by default and uses port 8787. Override the port with XCTX_PORT. HTTP requests are checked against the host and origin and require the XCTX_HTTP_TOKEN token.
export XCTX_HTTP_TOKEN="$(openssl rand -hex 32)"
XCTX_PORT=8787 npm run mcp:httpConfigure the trusted local MCP client with the same token using its private environment or secret settings. Keep the token private. Do not expose this listener to the network. See local setup.
Import your content
Import a post when you have its text:
npm run import:post -- \
--url "https://x.com/example/status/123" \
--text "The post text you supplied"Or import a JSON record:
npm run import:post -- --file ./post.jsonImport your own downloaded X archive:
npm run import:archive -- ./x-archive.zipThe data directory defaults to ./data and is ignored by Git. It contains manual post records under data/manual/, archive records in data/archive.json, and editable data/style.md and data/preferences.json files. Imports are local and are not live synchronization with X. For archive format and storage details, see local setup and privacy.
MCP tools
Tool | Purpose |
| Retrieve an imported post by X URL. |
| Return the configured writing style and preferences. |
| Search the locally imported archive with deterministic text matching. |
| Report safe configuration and data availability. |
All MCP tools are read-only. Imports are local owner operations, not MCP tools. There are no X account actions.
ChatGPT use
With the private ChatGPT plugin connected, try:
@xctx https://x.com/example/status/123 explain this in Turkish@xctx https://x.com/example/status/123 write five quote tweets in my style@xctx compare these two X postsThese prompts require a connected private Site plugin. The local MCP server can also be connected through a supported MCP client. ChatGPT integration
Cost and privacy
Running the local software has no service fee. The default provider makes no automated X requests, uses no paid X API, external LLM API, paid database, or paid hosting. ChatGPT use follows the limits of your existing account. ChatGPT Sites hosting is currently included with Plus and Pro, with shared usage and storage limits; check OpenAI's Sites documentation for current terms.
Imported content stays in the local data/ directory unless you choose to send it to an MCP client. Content returned to ChatGPT is processed under the account and workspace settings in effect there. See privacy and the threat model.
Current status
Manual post imports and local archive/style context are the supported data sources.
Automated X retrieval remains disabled. No real X provider calls are part of the supported flow.
The repository includes a Worker adapter and private Site deployment instructions. Sites deployment
Build, protocol, and hosted verification are recorded in the test report.
Documentation
License
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
X (formerly Twitter) posts, profiles, and search for AI agents. Free key, self-minted, no signup.
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
X (formerly Twitter): X (formerly Twitter) public and private data API for search, posts (Tweets).
Persistent, verbatim, searchable memory for AI assistants — one memory across every MCP client.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to access Twitter/X data including user profiles, tweets, search, and follower events via a set of MCP tools.MIT
- FlicenseAqualityDmaintenanceEnables AI assistants to post, search, and manage tweets on X (Twitter) via the MCP protocol.102-
- AlicenseNot gradedqualityBmaintenanceEnables to search, draft, and profile from your X/Twitter archive locally via MCP tools.MIT
- AlicenseNot gradedqualityCmaintenanceTurns saved X posts and long-form articles into a private, searchable context base accessible via MCP. Lets coding agents import, search, read, and enrich the library using the user's existing browser session.MIT