MCP Server
The MCP (Model Context Protocol) Server allows AI assistants to directly access the News API without writing code. This enables natural language queries like "find me the latest AI news" to be automatically converted into API requests.
What is MCP Server?
MCP Server is a bridge between AI assistants (like Cursor, Claude Desktop) and the News API. Instead of manually writing API requests, you can ask questions in natural language, and the AI will automatically search for news using the News API.
The MCP server is available at https://mcp.apitube.io/ - ready to use with no installation required.
Use cases:
- Search for news articles directly from your AI assistant
- Filter news by language, sentiment, topics, and more
- Get breaking news and trending stories
- Research specific topics without leaving your IDE
Benefits:
- No installation or setup required
- Always up-to-date with the latest features
- 24/7 availability and reliability
- No maintenance required
- Just add your API key and start using
How to Connect
Step 1: Get API Key
First, you need an API key from APITube:
- Sign up on apitube.io
- Get your personal API key
- Keep it secure
Step 2: Configure MCP Client
Add the MCP server to your AI assistant's configuration:
For Cursor:
Open Cursor settings and add to MCP configuration:
{
"mcpServers": {
"news-api": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-fetch",
"https://mcp.apitube.io/"
],
"env": {
"NEWS_API_KEY": "your-api-key-here"
}
}
}
}For Claude Desktop:
Open Claude Desktop settings (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"news-api": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-fetch",
"https://mcp.apitube.io/"
],
"env": {
"NEWS_API_KEY": "your-api-key-here"
}
}
}
}TIP
No installation or maintenance required. Just add the configuration and you're ready to go!
Step 3: Restart Your AI Assistant
After adding the configuration, restart Cursor or Claude Desktop for the changes to take effect.
How to Use
Once connected, you can ask your AI assistant natural language questions:
Basic Examples
Search for news:
Find me the latest news about artificial intelligenceFilter by language:
Show me news about Bitcoin in EnglishGet breaking news:
What are the breaking news stories right now?Search with sentiment:
Find positive news about TeslaAdvanced Queries
The AI assistant can handle complex queries with multiple filters:
Multiple filters:
Find breaking news about climate change from verified sources published todaySpecific requirements:
Show me long-form articles about SpaceX with images, published in the last weekEntity search:
Find news mentioning Elon Musk and TeslaAvailable Features
The MCP server supports all News API features:
- Search by title/keywords - Find articles matching specific terms
- Language filtering - Filter by language (English, Russian, etc.)
- Sentiment analysis - Filter by positive, negative, or neutral sentiment
- Date ranges - Search within specific time periods
- Media filtering - Find articles with images or videos
- Source quality - Filter by verified or premium sources
- Breaking news - Get only breaking news stories
- Entity search - Find news about specific people, organizations, or locations
- Topic/Category filtering - Filter by predefined topics and categories
Technical Details
How It Works
- You ask a question in natural language
- The AI assistant converts it to an MCP tool call
- MCP server translates it to a News API request
- Results are returned to the AI assistant
- The AI formats and presents the news to you
API Endpoints
- JSON-RPC endpoint:
POST https://mcp.apitube.io/ - Protocol version:
2024-11-05 - Server version:
1.0.0
Available Tools
The MCP server provides the following tools:
- everything_news - Search for news articles with advanced filtering by language, category, sentiment, entities, media content, and more
Authentication
The MCP server automatically handles authentication using the API key provided in the configuration. The key is securely passed in request headers.
Troubleshooting
Testing Server Connection
Check if the server is available:
curl -X POST https://mcp.apitube.io/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {"name": "test", "version": "1.0.0"}
},
"id": 1
}'Expected response:
{
"jsonrpc": "2.0",
"result": {
"protocolVersion": "2024-11-05",
"serverInfo": {
"name": "APITube News MCP-Server",
"version": "1.0.0"
},
"capabilities": {
"tools": {"listChanged": true},
"prompts": {"listChanged": true}
}
}
}API Key Issues
If you see authentication errors:
- Verify your API key is correct on apitube.io
- Check the configuration file syntax
- Ensure
NEWS_API_KEYis set in theenvsection - Restart your AI assistant
- Try testing with curl to verify the API key works
Connection Problems
If you can't connect to https://mcp.apitube.io/:
- Check your internet connection
- Verify firewall settings
- Try accessing the URL in a browser
Testing with a Real Query
Test with actual news search:
curl -X POST https://mcp.apitube.io/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "everything_news",
"arguments": {
"title": "Bitcoin",
"per_page": 5
}
},
"id": 1
}'Alternative: Direct HTTP Access
You can also use the MCP server as a regular HTTP API without an AI assistant:
curl -X POST https://mcp.apitube.io/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "everything_news",
"arguments": {
"title": "AI technology",
"language": {"code": "en"},
"is_breaking": 1
}
},
"id": 1
}'TIP
The server at https://mcp.apitube.io/ is available 24/7 and requires no setup or maintenance.
Next Steps
- Check out common workflows for query examples
- Learn about available parameters
- Explore authentication options
Support
If you encounter issues:
- Check the Technical FAQ
- Verify your API key on apitube.io
- Check server logs for errors
- Contact support through the APITube website