x-link-fetcher
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.
X Link Fetcher
Transform X/Twitter URLs to Nitter and fetch tweet content without API keys. Works as an MCP server for Poke.
Features
⨠No API Keys Required - Works without Twitter/X API authentication
š Automatic URL Transformation - Converts X/Twitter URLs to Nitter instances
š JSON API - Returns structured tweet data in JSON format
š MCP Server Support - Compatible with Poke and other MCP clients
āļø Easy Deployment - Deploy to Vercel, Railway, Render, or any Node.js host
Related MCP server: pyX-MCP
Quick Start
Installation
# Clone the repository
git clone https://github.com/tomaitagaki/x-link-fetcher.git
cd x-link-fetcher
# Install dependencies
npm install
# Start the server
npm startThe server will start on http://localhost:5001
Development Mode
npm run devUsage
As a REST API
Fetch Tweet Content:
curl "http://localhost:5001/fetch?url=https://x.com/user/status/1234567890"Response:
{
"success": true,
"originalUrl": "https://x.com/user/status/1234567890",
"nitterUrl": "https://nitter.poast.org/user/status/1234567890",
"content": {
"text": "Tweet content here...",
"author": "@username",
"timestamp": "2025-12-27T12:00:00Z"
}
}As an MCP Server
Add to your Poke configuration file (file ~/.poke/config.json or similar):
{
"mcpServers": {
"x-link-fetcher": {
"url": "http://localhost:5001/sse",
"type": "streamable-http"
}
}
}Or if running remotely:
{
"mcpServers": {
"x-link-fetcher": {
"url": "https://your-deployment.vercel.app/sse",
"type": "streamable-http"
}
}
}Available MCP Tools:
fetch_tweet- Fetch and parse tweet content from X/Twitter URLtransform_url- Transform X/Twitter URL to Nitter URL
Both tools require a url parameter (e.g., https://x.com/user/status/123).
API Endpoints
GET /fetch
Fetch and parse tweet content.
Query Parameters:
url(required) - X/Twitter URL to fetch
Example:
GET /fetch?url=https://x.com/elonmusk/status/1234567890GET /transform
Transform X/Twitter URL to Nitter URL without fetching.
Query Parameters:
url(required) - X/Twitter URL to transform
Example:
GET /transform?url=https://x.com/user/status/123Response:
{
"originalUrl": "https://x.com/user/status/123",
"nitterUrl": "https://nitter.poast.org/user/status/123"
}GET/POST /sse
MCP Streamable HTTP endpoint for Poke and MCP client integration. This is the recommended endpoint for MCP clients.
Supported MCP Tools:
fetch_tweet- Fetch and parse tweet contenttransform_url- Transform X/Twitter URL to Nitter URL
Tool Parameters:
{
"url": "https://x.com/user/status/123"
}POST /mcp (Legacy)
Legacy MCP server endpoint (simple JSON-RPC style).
Body:
{
"method": "fetch_tweet",
"params": {
"url": "https://x.com/user/status/123"
}
}GET /health
Health check endpoint.
Response:
{
"status": "ok",
"timestamp": "2025-12-27T21:15:00Z"
}Deployment
Deploy to Vercel
# Install Vercel CLI
npm i -g vercel
# Deploy
vercelDeploy to Railway
Connect your GitHub repository
Railway will auto-detect the Node.js app
Deploy!
Deploy to Render
Create a new Web Service
Connect your repository
Set build command:
npm installSet start command:
npm startDeploy
Deploy to Heroku
# Install Heroku CLI and login
heroku login
# Create app
heroku create your-app-name
# Deploy
git push heroku mainEnvironment Variables
PORT- Server port (default: 5001)NITTER_INSTANCE- Nitter instance to use (default: nitter.poast.org)NODE_ENV- Environment (development/production)
Configuration
Custom Nitter Instance
You can specify a custom Nitter instance:
export NITTER_INSTANCE=nitter.net
npm startOr in your deployment platform's environment variables.
Available Nitter Instances
nitter.poast.org(default)nitter.netnitter.itnitter.privacydev.netnitter.unixfox.eu
Note: Nitter instances may have varying reliability. Test which works best for you.
How It Works
URL Transformation: Converts X/Twitter URLs to Nitter URLs
x.comānitter.poast.orgtwitter.comānitter.poast.org
Content Fetching: Makes HTTP requests to Nitter (no API needed)
HTML Parsing: Extracts tweet data from HTML using cheerio
JSON Response: Returns structured data
MCP Integration: Provides MCP-compatible endpoint for Poke
Examples
Node.js Client
const axios = require('axios');
async function fetchTweet(url) {
const response = await axios.get('http://localhost:5001/fetch', {
params: { url }
});
return response.data;
}
fetchTweet('https://x.com/user/status/123')
.then(data => console.log(data))
.catch(err => console.error(err));Python Client
import requests
def fetch_tweet(url):
response = requests.get('http://localhost:5001/fetch', params={'url': url})
return response.json()
data = fetch_tweet('https://x.com/user/status/123')
print(data)cURL
# Fetch tweet
curl "http://localhost:5001/fetch?url=https://x.com/user/status/123"
# Transform URL only
curl "http://localhost:5001/transform?url=https://x.com/user/status/123"
# Health check
curl http://localhost:5001/healthTroubleshooting
Nitter Instance Unreachable
If the default Nitter instance is down, try changing it:
export NITTER_INSTANCE=nitter.net
npm startRate Limiting
Nitter instances may rate limit. Consider:
Using your own Nitter instance
Implementing caching
Adding delays between requests
Parsing Errors
If tweet content can't be parsed:
The tweet may be deleted or private
Nitter's HTML structure may have changed
Try a different Nitter instance
Development
Project Structure
x-link-fetcher/
āāā server.js # Main Express server
āāā package.json # Dependencies and scripts
āāā README.md # Documentation
āāā LICENSE # MIT License
āāā .gitignore # Git ignore rules
āāā .github/
āāā workflows/
āāā deploy.yml # CI/CD automationRunning Tests
npm testCode Style
npm run lintContributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This tool is for educational purposes. Be respectful of rate limits and terms of service for both X/Twitter and Nitter instances.
Acknowledgments
Nitter - Privacy-focused Twitter frontend
Express - Web framework
Cheerio - HTML parsing
MCP Protocol for inter-application communication
Support
š Report a bug
š” Request a feature
ā Star this repo if you find it useful!
Made with ā¤ļø by Toma Itagaki
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
Official twitterapi.io hosted MCP: Twitter/X tweets, users, followers, trends. OAuth or API key.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Search, label, and manage your X (Twitter) bookmarks from any MCP client via Tweetsmash
FastMCP server for posting formatted content to X (Twitter) ā Tollbooth-monetized, DPYC-native
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interacting with Twitter/X through natural language, including searching tweets, posting, sending DMs, and managing timelines via any MCP client.8MIT
- FlicenseAqualityDmaintenanceEnables AI assistants to post, search, and manage tweets on X (Twitter) via the MCP protocol.102-
- AlicenseAqualityBmaintenanceMCP server to read X (Twitter) posts, threads, replies, quotes, and search using your own logged-in session, no API key required.852 PyPI4MIT
- AlicenseNot gradedqualityBmaintenanceMCP server that allows posting, deleting, and reading X (Twitter) tweets using your own browser session cookie, bypassing the official paid API. Includes tools for auth setup, tweet creation, deletion, timeline reading, and regex search.210 PyPI19MIT