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 incomingtools/call requests to your handler.
Installation
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:
HTTP/SSE transport
UseStreamableHTTPServerTransport for remote access over HTTP. This lets any HTTP client - including other Vibes agents using MCPHttpClient - call your server.
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
- MCP SDK documentation - full reference for
McpServer, tool schemas, transports, and capabilities - MCP Client - how to consume MCP servers from a Vibes agent
- Model Context Protocol specification - protocol details and capability negotiation