How to Use the Harness MCP in OpenAI Agents SDK
Trigger and monitor Harness pipelines safely using the OpenAI Agents SDK with built-in guardrails.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Harness MCP to OpenAI Agents SDK
Create your Vinkius account to connect Harness 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.
Run Harness pipelines with OpenAI Agents SDK safety gates
The `execute_pipeline` tool exposed by this MCP server lets your OpenAI agent trigger Harness deployments, but production systems need strict runtime boundaries. The OpenAI Agents SDK applies built-in guardrails to evaluate the agent's intent before it calls the Harness API. This prevents accidental Harness rollouts by validating OpenAI agent inputs against your predefined safety policies. Once the run begins, the OpenAI agent uses `get_execution_status` to monitor the Harness deployment step-by-step. If a step fails, the OpenAI Agents SDK handles agent handoffs, passing Harness error logs to a specialized troubleshooting agent. You trace the entire Harness deployment interaction directly in your OpenAI dashboard.
Map environments and services for agent decisions
Active deployment targets become visible to your OpenAI agent through the `list_environments` tool over the MCP connection. Instead of hardcoding target IDs, the OpenAI agent queries active Harness environments to select the correct deployment target. This dynamic discovery prevents misconfigured Harness deployments to production environments. Your OpenAI agent coordinates these targets with microservices retrieved via `list_services`. By combining these tools, the OpenAI agent maps Harness dependencies on the fly. It verifies that the correct Harness service version goes to the designated environment without manual mapping.
Audit security configurations before deployment
Security checks are simple with `list_secrets` because it exposes Harness credential metadata to your OpenAI agent without leaking actual values. This keeps your credentials secure while letting the OpenAI agent verify that necessary Harness environment variables exist. It ensures Harness deployments don't fail due to missing keys. Before any execution, the OpenAI agent queries `list_connectors` to verify Harness Git and Kubernetes access. If a Harness connector is missing, the OpenAI agent halts the process. This pre-flight check saves Harness execution credits and prevents broken OpenAI deployment loops.
Set up Harness 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 Harness tools at runtime. - 3
Create your Agent
Pass the MCP to
Agent(mcp_servers=[server]). The agent receives Harness tools as native definitions — JSON schemas resolve automatically. - 4
Run the agent
Call
Runner.run(agent, prompt)to execute. The agent invokes the appropriate Harness 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="Harness Agent",
instructions="You have access to Harness 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 Harness. 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 Harness 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 Harness MCP today
We host it, we monitor it, we maintain it. You just paste one token.