Skip to content

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:

  1. Sign up on apitube.io
  2. Get your personal API key
  3. 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:

json
{
    "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):

json
{
    "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 intelligence

Filter by language:

Show me news about Bitcoin in English

Get breaking news:

What are the breaking news stories right now?

Search with sentiment:

Find positive news about Tesla

Advanced Queries

The AI assistant can handle complex queries with multiple filters:

Multiple filters:

Find breaking news about climate change from verified sources published today

Specific requirements:

Show me long-form articles about SpaceX with images, published in the last week

Entity search:

Find news mentioning Elon Musk and Tesla

Available 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

  1. You ask a question in natural language
  2. The AI assistant converts it to an MCP tool call
  3. MCP server translates it to a News API request
  4. Results are returned to the AI assistant
  5. 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:

bash
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:

json
{
  "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:

  1. Verify your API key is correct on apitube.io
  2. Check the configuration file syntax
  3. Ensure NEWS_API_KEY is set in the env section
  4. Restart your AI assistant
  5. 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:

bash
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:

bash
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

Support

If you encounter issues:

  1. Check the Technical FAQ
  2. Verify your API key on apitube.io
  3. Check server logs for errors
  4. Contact support through the APITube website