Skip to main content
When you expose a Vibes agent as an MCP server, any MCP-compatible client can discover and invoke your agent as a tool. This enables Claude Desktop, Cursor, Zed, or any other AI application that speaks MCP to call your agent directly.
Vibes does not yet include a built-in MCP server class. This page shows how to use @modelcontextprotocol/sdk directly to wrap a Vibes agent and serve it over stdio or HTTP.

How it works

The MCP SDK handles all protocol details: capability negotiation, JSON-RPC framing, tool schema advertisement. You register your agent as one or more tools, and the SDK routes incoming tools/call requests to your handler.

Installation

The package is already a dependency in the default deno.json when using Vibes in a Deno project.

Stdio transport

Stdio transport is the standard choice for Claude Desktop and other desktop AI apps. The client launches your server as a subprocess and communicates over stdin/stdout.

Claude Desktop configuration

Add the server to ~/Library/Application Support/Claude/claude_desktop_config.json:
After restarting Claude Desktop, your agent appears as an available tool.

HTTP/SSE transport

Use StreamableHTTPServerTransport for remote access over HTTP. This lets any HTTP client - including other Vibes agents using MCPHttpClient - call your server.
A Vibes agent can connect to this server using MCPHttpClient:

Registering agent capabilities as tools

You can expose multiple tools, each mapping to a different agent behavior:

With dependencies

If your agent requires dependencies (database access, authenticated clients, etc.), create them at server startup and close them on shutdown:

Further reading