Skip to main content

MCP Transports

Prism supports two transport modes for MCP communication. Choose based on how your AI client connects.

Stdio Transport

The stdio transport reads JSON-RPC messages from stdin and writes responses to stdout. This is the standard for CLI-based MCP servers that AI clients launch as subprocesses.
Stdio Server

Claude Desktop Configuration

Add your server to Claude Desktop’s config file:
claude_desktop_config.json
Build your server as a release binary with swift build -c release, then point Claude Desktop to the binary in .build/release/.

HTTP Transport

The HTTP transport integrates with your Prism web server, handling MCP requests over HTTP POST and server notifications over SSE:
HTTP Transport

Endpoints

Testing with curl

Initialize
List Tools
Call a Tool

Choosing a Transport

Use Stdio When...

Building CLI tools, local development servers, or Claude Desktop integrations. The AI client launches your binary as a subprocess.

Use HTTP When...

Running a web service, hosting MCP alongside a REST/GraphQL API, or serving remote AI clients over the network.

What’s Next

Tools

Build powerful tools for AI assistants

Resources

Expose data as readable resources