How to Use the New Relic MCP in OpenAI Agents SDK
Connect your OpenAI Agent to this New Relic MCP Server for production-grade observability and incident response.
Works with every AI agent you already use
…and any MCP-compatible client
Connect New Relic MCP to OpenAI Agents SDK
Create your Vinkius account to connect New Relic 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.
Automate Incident Triage
Your agent can monitor New Relic for problems on its own. It starts by calling `list_alerts` to see what's currently broken. If it finds a critical issue, this MCP Server lets it dig deeper for context using `get_entity_details` on the affected services or hosts. This isn't just about reading data. You can build specialized agents that hand off tasks. One agent detects the problem, another uses `run_nrql` to query for root causes, and a third summarizes the findings. OpenAI's guardrails ensure each agent only performs its approved actions.
Query Your Entire Stack with the OpenAI Agents SDK
Give your agent direct access to New Relic's Query Language. The `run_nrql` tool is a direct line to your data, letting your agent ask specific questions about performance, errors, or custom business metrics you've instrumented. You can ask it things like "What's the 95th percentile response time for the checkout service in the last hour?" or "Show me the error rate grouped by container name." The agent constructs the query, `run_nrql` executes it, and you get structured data back for analysis or reporting.
Keep a Constant Pulse on Performance
This MCP Server lets your agent track application health without manual checks. Your agent can call `get_apm_summary` for a quick overview of throughput, error rates, and response times for any monitored application. It's a fast way to spot anomalies. For a more focused view, use `list_service_levels` to check SLO compliance. Your agent can periodically check these indicators and trigger a workflow if a service level starts to degrade, all before it breaches the objective. It's proactive monitoring, run by your code.
Set up New Relic MCP in OpenAI Agents SDK
Prerequisites
- Python 3.10+ installed
-
openai-agentspackage (pip install openai-agents) - Active Vinkius subscription with a valid endpoint token
- 1
Install the SDK
Run
pip install openai-agentsto install the OpenAI Agents SDK. The MCP integration is built-in — no extra dependencies needed. - 2
Connect via SSE transport
Use
MCPServerSsewith your Vinkius endpoint URL. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. The SDK auto-discovers all New Relic tools at runtime. - 3
Create your Agent
Pass the MCP to
Agent(mcp_servers=[server]). The agent receives New Relic tools as native definitions — JSON schemas resolve automatically. - 4
Run the agent
Call
Runner.run(agent, prompt)to execute. The agent invokes the appropriate New Relic tools and returns structured results. Copy the full example on the right to get started.
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="New Relic Agent",
instructions="You have access to New Relic 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 New Relic. 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 New Relic MCP in OpenAI Agents SDK
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the New Relic MCP today
We host it, we monitor it, we maintain it. You just paste one token.