MCP Integration
Use the Model Context Protocol (MCP) to let AI coding agents query the Fast News Previews API directly as a tool — no HTTP boilerplate needed.
Prerequisites
- A RapidAPI subscription to the Fast News Previews API
- Your API key (see Authentication)
- Node.js installed (the MCP client uses
npx)
Configuration
Add the following JSON to your AI agent's MCP server configuration. Replace YOUR-API-KEY with your RapidAPI key.
{
"mcpServers": {
"RapidAPI Hub - Fast News with Previews": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.rapidapi.com",
"--header",
"x-api-host: fast-news-with-previews.p.rapidapi.com",
"--header",
"x-api-key: YOUR-API-KEY"
]
}
}
}
The mcp-remote package is installed automatically by npx. You don't need to install anything manually.
Setup for Your AI Agent
Follow the instructions for your preferred AI agent and paste the config above into its MCP server settings.
| Agent | Setup Guide |
|---|---|
| Claude Code | code.claude.com/docs/en/mcp |
| Claude Desktop | modelcontextprotocol.io/docs/develop/connect-local-servers |
| Cursor | cursor.com/docs/mcp |
| VS Code Copilot | code.visualstudio.com/docs/copilot/customization/mcp-servers |
| Windsurf | docs.windsurf.com/windsurf/mcp |
| Continue | docs.continue.dev/customize/mcp-tools |
| Cline | docs.cline.bot/mcp/mcp-overview |
| OpenCode | opencode.ai/docs/mcp-servers |
| Codex CLI | developers.openai.com/codex/mcp |
The config above uses the standard mcpServers JSON format accepted by Claude Code, Claude Desktop, Cursor, Windsurf, and Cline. VS Code Copilot, OpenCode, Codex CLI and Continue might use different formats. See each agent's setup guide for the exact format.
Using the API via MCP
Once configured, your AI agent can search for news, fetch trending headlines, and query topics directly in conversation — just ask naturally. The agent handles authentication and request formatting for you.
For example, try prompts like:
- "What are the trending headlines right now?"
- "Search for news about artificial intelligence"
- "Find local news about Tokyo"
- "Show me the latest technology news from the past week"
The agent will use the MCP server to call the appropriate API endpoint and return the results.