Fast • Modern • MCP-ready • v1.0.1

Turn your Robyn APIs into beautiful, production-ready MCP servers.

robyn-mcp helps developers expose tools, resources, and prompts from Robyn apps with minimal code. Ship OpenAPI autogeneration, observability, prompt endpoints, resource discovery, and a polished browser playground — without building the protocol layer yourself.

from robyn import Robyn
from robyn_mcp import RobynMCP, RobynMCPConfig

app = Robyn(__file__)

@app.get("/health")
async def health():
    return {"status": "ok"}

mcp = RobynMCP(
    app,
    config=RobynMCPConfig(
        auto_expose_openapi=True,
        enable_resources=True,
        enable_prompts=True,
        enable_playground=True,
        enable_tool_tracing=True,
    ),
)

mcp.mount_http()
app.start(port=8080)
5 minto turn an existing Robyn API into an MCP endpoint.
1 pageto expose tools, resources, prompts, and observability in one surface.
0 protocol painyou focus on routes and business logic, not JSON-RPC plumbing.
Built-in UXplayground, CLI utilities, discovery metadata, and smooth local validation.

Why developers download robyn-mcp

Everything users expect from a modern integration layer: automatic discovery, strongly structured tool schemas, browsable resources, reusable prompts, and instant live inspection.

⚙️

OpenAPI tool autogeneration

Convert Robyn routes into MCP tools automatically. Safe GETs become read tools, POSTs become action tools, and input schemas are inferred from your API contracts.

🧭

Resources and prompts

Expose structured context through MCP resources and reusable prompt templates so clients can discover more than just callable actions.

📈

Tracing and metrics

Track calls, errors, average latency, and recent events to understand real usage and debug issues faster during local and production testing.

🗂️

Response cache with tag invalidation

Cache frequent read tools to reduce backend load, then invalidate by cache tags from mutation tools so clients always see fresh data after updates.

🧪

CLI and validation flow

Inspect, validate, benchmark, and audit your endpoint with built-in tooling designed to make release checks much easier.

🌐

Beautiful playground

Ship a modern browser-based playground that lets developers initialize sessions, list tools, read resources, resolve prompts, and call methods instantly.

🔐

Production-minded defaults

Header forwarding, session management, JSON-RPC handling, transport metadata, and configurable feature flags give you a clean v1 deployment path.

How it works

Keep your Robyn app exactly where it is. Add robyn-mcp, mount the endpoint, and let clients discover capabilities over a clean MCP surface.

1
Wrap your Robyn app

Create a RobynMCP instance around your existing Robyn application.

2
Enable only the features you need

Turn on OpenAPI autogen, prompts, resources, playground, and tracing through config flags.

3
Mount the MCP endpoint

Use mcp.mount_http() and immediately expose discovery, tool calls, resource access, and prompt retrieval.

curl -s http://localhost:8080/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'

curl -s http://localhost:8080/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json' \
  -H 'mcp-session-id: ...' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'

Real-world use cases

robyn-mcp is useful anywhere developers want existing APIs to feel discoverable and assistant-ready without rewriting their app stack.

01

Commerce and retail

A Nike-style product backend can expose inventory lookup as tools, store context as resources, and sales playbooks as prompts for internal assistants.

02

Internal developer platforms

Turn health checks, deployment status, environment metadata, and release-note prompts into one MCP surface for faster team workflows.

03

SaaS admin surfaces

Expose billing actions, tenant context, diagnostics, and support prompts while keeping the original Robyn API intact under the hood.

Download v1.0.1

Install robyn-mcp and launch in minutes

Perfect for developers who already have a Robyn application and want MCP support, discovery, observability, and a polished playground with minimal setup.

python -m pip install --upgrade pip
pip install robyn robyn-mcp
robyn-mcp install-note
Quickstart

Minimal setup

from robyn import Robyn
from robyn_mcp import RobynMCP

app = Robyn(__file__)

@app.get("/health")
async def health():
    return {"status": "ok"}

mcp = RobynMCP(app)
mcp.mount_http()
app.start(port=8080)

Frequently asked questions

The essentials developers usually want to know before adopting the library.

Do I need to rewrite my Robyn routes?

No. robyn-mcp wraps your existing app. You keep your routes and add MCP capabilities around them.

Can I expose more than tools?

Yes. You can expose MCP resources and prompts, not just callable tools.

Does it support automatic tool generation?

Yes. With OpenAPI autogeneration enabled, supported routes can be surfaced as MCP tools automatically.

Can I inspect it in the browser?

Yes. The built-in playground provides a modern UI for metadata, tool calls, resources, prompts, and trace inspection.