4,500+ servers built on MCP Fusion
Vinkius
NewsAPI logo
Vinkius
OpenAI Agents SDK logo

How to Use the NewsAPI MCP in OpenAI Agents SDK

Build production news agents with the OpenAI Agents SDK that query real-time data from over 150,000 sources.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

NewsAPI MCP on Cursor AI Code Editor MCP Client NewsAPI MCP on Claude Desktop App MCP Integration NewsAPI MCP on OpenAI Agents SDK MCP Compatible NewsAPI MCP on Visual Studio Code MCP Extension Client NewsAPI MCP on GitHub Copilot AI Agent MCP Integration NewsAPI MCP on Google Gemini AI MCP Integration NewsAPI MCP on Lovable AI Development MCP Client NewsAPI MCP on Mistral AI Agents MCP Compatible NewsAPI MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
OpenAI Agents SDK

Connect NewsAPI MCP to OpenAI Agents SDK

Create your Vinkius account to connect NewsAPI to OpenAI Agents SDK and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.

GDPR Free for Subscribers

Monitor news and trigger agent workflows

Give your agent the ability to watch the news. It can use `get_headlines_by_category` to monitor for breaking stories in a specific vertical, like tech or finance. When a relevant headline appears, it can trigger another specialized agent to dig deeper. That second agent can then use `search_articles` to find related coverage and build a full report. With the OpenAI dashboard, you get a full trace of this handoff, so you always know exactly what your agents are doing and why. It's a clear, auditable trail for production systems.

Run safe, validated news queries

Your agent gets access to powerful search tools, but you stay in control. Before your agent executes a call to `get_articles_from_domains` or `search_headlines`, OpenAI's built-in guardrails can validate the action. This prevents your agent from running nonsensical or unintended queries. You define the rules. The framework enforces them. This means you can confidently deploy agents that interact with real-world news data without worrying about them going off the rails. It’s a safety net for autonomous operations.

Auto-discover tools from this MCP Server

You don't need to manually define each NewsAPI function for your agent. Just point the OpenAI Agents SDK to the Vinkius endpoint for this MCP Server. It automatically discovers all 10 tools, from `list_sources` to `get_popular_articles`. Your agent immediately understands what it can do—search, list, and get headlines. Setting `cacheToolsList=True` makes this process even faster on subsequent runs. You write less boilerplate code and get to the real work faster.

Setup guide

Set up NewsAPI MCP in OpenAI Agents SDK

Prerequisites

  • Python 3.10+ installed
  • openai-agents package (pip install openai-agents)
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install the SDK

    Run pip install openai-agents to install the OpenAI Agents SDK. The MCP integration is built-in — no extra dependencies needed.

  2. 2

    Connect via SSE transport

    Use MCPServerSse with your Vinkius endpoint URL. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com. The SDK auto-discovers all NewsAPI tools at runtime.

  3. 3

    Create your Agent

    Pass the MCP to Agent(mcp_servers=[server]). The agent receives NewsAPI tools as native definitions — JSON schemas resolve automatically.

  4. 4

    Run the agent

    Call Runner.run(agent, prompt) to execute. The agent invokes the appropriate NewsAPI tools and returns structured results. Copy the full example on the right to get started.

agent.py
import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerSse

async def main():
    async with MCPServerSse(
        url="https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
    ) as server:
        agent = Agent(
            name="NewsAPI Agent",
            instructions="You have access to NewsAPI tools.",
            mcp_servers=[server],
        )
        result = await Runner.run(agent, "List recent transactions")
        print(result.final_output)

asyncio.run(main())

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by NewsAPI. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.

Why Choose Vinkius

Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.

Real-time monitoring

Live

visibility into every interaction

Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.

Built-in savings

60%

lower AI costs

Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.

Single dashboard

One

place for every integration

Every tool your AI connects to, managed from a single screen. One account, complete control.

Common questions about NewsAPI MCP in OpenAI Agents SDK

Your agent can periodically call `get_headlines_by_category` with the 'business' category. When it finds a new headline, it can use the `search_articles` tool to gather more context from different sources.
Yes. The agent can use the `get_headlines_by_country` tool with a country code like 'us' or 'gb'. To filter by language, it would use the `get_articles_by_language` tool with a code like 'en' or 'es'.
The `search_articles` tool is built for this. Your agent can call it with specific keywords, date ranges, and domains to pull a precise set of historical articles from the NewsAPI database for analysis.
Every tool call your agent makes—like `get_recent_articles`—is logged as a step in the agent's run. You'll see the exact inputs and outputs from the NewsAPI server in your trace, which is great for debugging.
The server processes article metadata like headlines, source names, author, and URLs. Your data is handled within a Vinkius zero-trust environment. Each server runs in an ephemeral, single-use sandbox, and all auth is managed by a single endpoint token.

Start using the NewsAPI MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 10 tools

We've already built the connector for NewsAPI. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 10 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.