agentsclimarketplace

Hosted mcp tool

Skill kjuhwa/skills-hub/skills/mcp-integration/hosted-mcp-tool

Let OpenAI's Responses API call a remote MCP server on your behalf using HostedMCPTool.From its SKILL.md

Install
npx -y skills add kjuhwa/skills-hub --skill hosted-mcp-tool

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.2 KB, 393 tokens by cl100k_base, as published. Nobody here has run it

hosted-mcp-tool

Use HostedMCPTool when you want OpenAI's infrastructure to handle MCP tool calls to a publicly reachable server, without round-trips to your Python process. Works only with OpenAI Responses API models.

When to apply

When the MCP server is publicly accessible and you want to avoid the latency of local tool execution. The model lists and calls tools server-side.

Core snippet

import asyncio
from agents import Agent, HostedMCPTool, Runner

async def main():
    agent = Agent(
        name="MCP Assistant",
        instructions="Use the available tools to answer questions.",
        tools=[
            HostedMCPTool(
                tool_config={
                    "type": "mcp",
                    "server_label": "my_server",
                    "server_url": "https://my-mcp-server.example.com/mcp",
                    "require_approval": "never",
                }
            )
        ],
    )
    result = await Runner.run(agent, "What tools are available?")
    print(result.final_output)

asyncio.run(main())

With approval required

HostedMCPTool(
    tool_config={
        "type": "mcp",
        "server_label": "dangerous_server",
        "server_url": "https://example.com/mcp",
        "require_approval": "always",  # Pause for human approval
    }
)

Key notes

  • Server must be publicly reachable from OpenAI's infrastructure
  • require_approval: "never" auto-approves; "always" triggers result.interruptions
  • Does not support local/private MCP servers (use MCPServerStdio or MCPServerSse instead)
  • Only works with OpenAIResponsesModel-backed agents
  • Tool listing and invocation happen server-side; no Python callback for individual tool calls

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,764. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.