mcp-newsapi

v1.0.2
io.github.nubiia-dev/mcp-newsapi Checked 3 days ago Published 1 month ago

NewsAPI.ai (Event Registry): 10 read-only MCP tools for news articles, events, autosuggest, trends

Values you need

VariableWhat it is
NEWSAPI_AI_API_KEYrequired secret Your NewsAPI.ai API key (newsapi.ai → Dashboard).
NEWSAPI_AI_MAX_TOKENS_PER_SESSIONoptional Max NewsAPI.ai tokens this server may spend per session (process lifetime). Defaults to 200. Default: 200

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add mcp-newsapi -e 'NEWSAPI_AI_API_KEY=<NEWSAPI_AI_API_KEY>' -- npx -y @nubiia/mcp-newsapi@1.0.2
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-newsapi": {
      "args": [
        "-y",
        "@nubiia/mcp-newsapi@1.0.2"
      ],
      "command": "npx",
      "env": {
        "NEWSAPI_AI_API_KEY": "<NEWSAPI_AI_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-newsapi": {
      "args": [
        "-y",
        "@nubiia/mcp-newsapi@1.0.2"
      ],
      "command": "npx",
      "env": {
        "NEWSAPI_AI_API_KEY": "<NEWSAPI_AI_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "NEWSAPI_AI_API_KEY",
      "id": "newsapi-ai-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp-newsapi": {
      "args": [
        "-y",
        "@nubiia/mcp-newsapi@1.0.2"
      ],
      "command": "npx",
      "env": {
        "NEWSAPI_AI_API_KEY": "${input:newsapi-ai-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-newsapi]
command = "npx"
args = ["-y", "@nubiia/mcp-newsapi@1.0.2"]
env = { "NEWSAPI_AI_API_KEY" = "<NEWSAPI_AI_API_KEY>" }

For AI agents

  1. Ask the user for: NEWSAPI_AI_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: search_articles, get_article, search_events, get_event, suggest_concepts, suggest_categories, suggest_sources, suggest_locations, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json