twitter_api_safe_relay_mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@twitter_api_safe_relay_mcpsearch for tweets with keyword 'AI'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
twitter_api_safe_relay_mcp
A simple MCP server that forwards HTTP requests to
twitter_api_safe_relay.
GitHub: nakasyou/twitter_api_safe_relay_mcp
Getting started
Start the relay server and set its URL in the environment:
TWITTER_RELAY_BASE_URL=http://localhost:6900 npx twitter_api_safe_relay_mcpExample MCP client configuration:
{
"mcpServers": {
"twitter-api-safe-relay": {
"command": "npx",
"args": ["twitter_api_safe_relay_mcp"],
"env": {
"TWITTER_RELAY_BASE_URL": "http://localhost:6900"
}
}
}
}Related MCP server: MCP Relay Server
Tools
The server exposes two tools:
twitter_request_catalog: Searches the latest request catalog by operation name or path and returns executable templates.twitter_api_request: Sends a request to the relay using a template.
Start by finding an operation in the catalog. The server fetches
requests.ndjson
on every catalog call, so updated query IDs and feature flags are picked up automatically.
{
"query": "SearchTimeline",
"limit": 5
}Pass the returned request to twitter_api_request, changing only the values needed for your task, such as the search query, username, ID, or result count. Do not change features, fieldToggles, queryId, or operation-specific variable names.
Example twitter_api_request call:
{
"endpoint": "/i/api/graphql/QUERY_ID/UserByScreenName",
"method": "GET",
"params": {
"variables": {
"screen_name": "example"
},
"features": {}
}
}endpoint: The path sent to the relay. Absolute URLs are not accepted.method:GET(default),POST,PUT,PATCH, orDELETE.params: URL query parameters. Object values are converted to JSON strings.body: JSON request body.headers: Optional HTTP headers.
The destination host is always restricted to TWITTER_RELAY_BASE_URL.
The /i/api prefix is added automatically to GraphQL catalog paths. It is not added to REST paths under /1.1 or /2. Confirm write operations before running them, then verify the result with a read operation. Note that GraphQL responses may contain errors even when the HTTP status is 200.
To use a different catalog source, set TWITTER_REQUESTS_CATALOG_URL.
Development and publishing
npm install
npm run typecheck
npm test
npm run build
npm publishOnce published, the server can be run on Node.js 18 or later with npx twitter_api_safe_relay_mcp. Bun users can run it with bunx twitter_api_safe_relay_mcp.
Releasing with GitHub Actions
Open the Release workflow in GitHub Actions, select the default branch, and choose patch, minor, or major. The workflow calculates the next version from the latest version on npm, runs the tests and build, publishes the package to npm, and creates a GitHub Release.
Before using the workflow, publish the package to npm once and configure a Trusted Publisher for it. The current workflow calculates the next version from the latest version available on npm, so it cannot perform the initial publication of a new package.
Provider: GitHub Actions
Organization or user:
nakasyouRepository:
twitter_api_safe_relay_mcpWorkflow filename:
release.ymlAllowed action:
npm publish
No long-lived npm token is required. The workflow uses a GitHub-hosted runner, Node.js 24, and npm OIDC Trusted Publishing.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that enables programmatic interaction with Twitter API, allowing users to post tweets, search for content, and retrieve user timelines through standardized MCP tools.20MIT
- FlicenseNot gradedqualityCmaintenanceExposes provider-specific tools and relays HTTP requests to configured providers like Supabase, Vercel, and Context7, enabling interaction with multiple external APIs through a unified MCP interface with configurable authentication and access controls.
- AlicenseNot gradedqualityDmaintenanceA read-only X/Twitter MCP server that enables data retrieval for user profiles, tweets, and social graphs using OAuth 2.0 Bearer Token authentication. It supports searching recent tweets, viewing timelines, and tracking engagement metrics like followers, likes, and retweets.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to safely interact with external services (HTTP, GraphQL, gRPC, Bash, SQL) using HCL templates and OS keychain secrets, preventing prompt injection by keeping request details from the LLM.112Apache 2.0
Related MCP Connectors
Search, document and execute authenticated API calls across 700+ apps via one MCP server
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
128 REST operations. 120 MCP routes; 119 JSON/text ops. OAuth 2.1. Not affiliated with X Corp.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nakasyou/twitter_api_safe_relay_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server