Skip to content

Quickstart: MCP

WarmHub exposes an MCP (Model Context Protocol) server so AI agents can read and write structured knowledge using standard tooling. This guide covers how to connect, configure, and start using it.

The Model Context Protocol is an open standard for AI agent tool use. Instead of building custom integrations, any MCP-compatible client (Claude Desktop, Cursor, custom agents) can discover and call WarmHub tools automatically. The agent sees typed tool definitions, calls them with JSON arguments, and receives structured responses.

WarmHub provides two MCP endpoint modes, both served over HTTP POST:

ModeEndpointWhen to use
GlobalPOST /mcpAgent works across multiple repos; passes orgName/repoName as tool arguments
Repo-scopedPOST /mcp/:org/:repoAgent targets a single repo; org/repo is baked into the URL

Repo-scoped mode is simpler for most use cases — the agent never needs to specify which repo it’s talking to, and the tool set is trimmed to only repo-relevant operations.

Point your MCP client at the WarmHub MCP endpoint. Claude handles authentication automatically — it discovers the OAuth flow, opens a browser for login, and attaches tokens to all subsequent requests.

Add an entry to the mcpServers section in your client’s settings file.

For repo-scoped mode (recommended):

{
"mcpServers": {
"warmhub": {
"transport": "http",
"url": "https://api.warmhub.ai/mcp/myorg/myrepo"
}
}
}

For global mode:

{
"mcpServers": {
"warmhub": {
"transport": "http",
"url": "https://api.warmhub.ai/mcp"
}
}
}

In repo-scoped mode, replace myorg/myrepo with your organization and repository names. This works in Claude Desktop (claude_desktop_config.json), Claude Code (.mcp.json), and other MCP-compatible clients.

Once connected, an agent can interact with WarmHub using these tools. Here is the recommended sequence for bootstrapping:

Start by calling warmhub_repo_describe to get a complete picture of the repository:

{
"name": "warmhub_repo_describe"
}

This returns:

  • Shapes defined in the repo, including field types, optional shape-level descriptions, and per-field inline descriptions extracted from typed field objects (fields with descriptions appear as { "type": "number", "description": "Horizontal position" })
  • Summary countsshapeCount, subscriptionCount, totalCount, plus breakdowns by kind and by shape
  • Sample wrefs — example references the agent can use immediately
  • Write examples — ready-to-use warmhub_commit_apply operations tailored to the repo’s actual shapes

The write examples are generated from the repo’s current shape definitions, so the agent gets correct field names and types without guessing.

2. Read current state with warmhub_thing_head

Section titled “2. Read current state with warmhub_thing_head”

Get a snapshot of all active things:

{
"name": "warmhub_thing_head"
}

Filter by shape or kind for targeted results:

{
"name": "warmhub_thing_head",
"arguments": {
"shape": "Location",
"limit": 10
}
}

Create or update things and assertions through atomic commits:

{
"name": "warmhub_commit_apply",
"arguments": {
"author": "claude",
"message": "Add initial game locations",
"operations": [
{
"operation": "add",
"kind": "thing",
"name": "Location/cave",
"data": { "x": 3, "y": 7, "label": "Dark Cave" }
},
{
"operation": "add",
"kind": "assertion",
"name": "Belief/cave-safe",
"about": "Location/cave",
"data": { "safe": true, "confidence": 0.8 }
}
]
}
}

A single commit can contain multiple operations that succeed or fail atomically. Operations support add and revise variants for shapes, things, assertions, and collections.

For targeted retrieval by shape, kind, or about-reference:

{
"name": "warmhub_thing_query",
"arguments": {
"shape": "Belief",
"about": "Location/cave"
}
}

This returns all active Belief assertions about Location/cave.

The describe tool is your bootstrap. warmhub_repo_describe returns everything an agent needs to start working — schema definitions, sample data references, wref syntax rules, and commit contract documentation with write examples. Call it first.

All changes go through commits. Every call to warmhub_commit_apply produces an atomic, attributed commit with full version history.

Wrefs address everything. Things are referenced by Shape/name (local) or wh:org/repo/Shape/name (canonical). Assertions use about to reference their subject.

Prefer warmhub_thing_query for targeted reads. Use warmhub_thing_head for broad orientation and warmhub_thing_query when you know what shape or subject you need.

WarmHub exposes MCP tools covering organizations, repositories, shapes, things, assertions, commits, workspaces, subscriptions, and actions. See the MCP Tools Reference for the complete list with argument schemas and descriptions.

  • Core Concepts — if you haven’t already, review the data model behind things, assertions, and commits
  • CLI Quickstart — explore WarmHub from the terminal with the wh CLI
  • MCP Server — detailed MCP server configuration and deployment
  • MCP Tools Reference — full reference for all MCP tools