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
- Transport endpoint:
https://docs.kleisli.io/mcp/transport - Protocol: Streamable HTTP per spec 2025-03-26
- Authentication: none (public read-only surface)
To initialize a session, POST a standard MCP initialize request:
{
"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
Three tools, all read-only.
search_docs(query: string)
Search documentation across all projects. Returns matching pages with titles and relevance scores.
get_page(project: string, section: string, page: string)
Fetch a single documentation page as raw Markdown — the same content the HTML renderer consumes, no scraping required.
list_projects()
List all documentation projects with their descriptions.
Resources
Documentation pages are also exposed as MCP resources under the
docs://kleisli/ URI scheme:
docs://kleisli/{project}/{section}/{page}— individual doc pagesdocs://kleisli/llms.txt— global discovery indexdocs://kleisli/llms-full.txt— full documentation contentdocs://kleisli/{project}/llms.txt— per-project discovery indexdocs://kleisli/{project}/llms-full.txt— per-project full content
Use resources/list to enumerate; resources/read to fetch.
Client configuration
Claude Code
Add to ~/.claude/mcp.json (or your project's .mcp.json):
{
"mcpServers": {
"kleisli-docs": {
"type": "http",
"url": "https://docs.kleisli.io/mcp/transport"
}
}
}
Cursor
Add to mcp-server-config.json:
{
"mcpServers": {
"kleisli-docs": {
"url": "https://docs.kleisli.io/mcp/transport"
}
}
}
Generic / curl
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:
/llms.txt— curated Markdown index of all documentation/llms-full.txt— full content concatenated for token-efficient ingestion<link rel="alternate" type="text/markdown">and<meta name="ai-content-discovery">on every pageLink: </llms.txt>; rel="llms-txt"andX-Llms-Txt: /llms.txtHTTP headers on every response