MCP Server

Kleisli.IO's documentation site exposes a Model Context Protocol (MCP) server so AI agents can search and fetch documentation programmatically. This page describes the server, its tools and resources, and how to connect.

What is MCP?

The Model Context Protocol is a JSON-RPC 2.0 based protocol for exposing tools and resources to LLM clients. The Kleisli docs MCP server speaks the Streamable HTTP transport — POST for client-to-server requests, GET for server-initiated SSE, DELETE for session termination.

Connection

To initialize a session, POST a standard MCP initialize request:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-03-26",
    "capabilities": {},
    "clientInfo": {"name": "your-client", "version": "1.0.0"}
  }
}

The server responds with an Mcp-Session-Id header that subsequent requests must echo back.

Tools

3 read-only tools. Each links to a detail page with input schema, example JSON-RPC envelope, and applicable error codes.

get_page

Get a documentation page as raw Markdown content.

list_projects

List all documentation projects with their descriptions.

search_docs

Search documentation across all projects. Returns matching pages with titles and relevance scores.

Resources

Documentation pages are also exposed as MCP resources under the docs://kleisli/ URI scheme:

Use resources/list to enumerate; resources/read to fetch.

Client configuration

Claude Code

Add to ~/.claude/mcp.json (or your project's .mcp.json):

json
{
  "mcpServers": {
    "kleisli-docs": {
      "type": "http",
      "url": "https://docs.kleisli.io/mcp/transport"
    }
  }
}

Cursor

Add to mcp-server-config.json:

json
{
  "mcpServers": {
    "kleisli-docs": {
      "url": "https://docs.kleisli.io/mcp/transport"
    }
  }
}

Generic / curl

bash
curl -X POST https://docs.kleisli.io/mcp/transport \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Discovery surface

The MCP server is one of several AI-discovery affordances on docs.kleisli.io: