honcho/mcp
doria cc3483bfaa
refactor: MCP server improvements (#379)
* refactor: MCP server improvements

* feat: add missing tools and polish descriptions. Add inspect_workspace, list_workspaces, inspect_session, get_session_message, and get_session_summaries tools. Fix CORS preflight handling and default route path. Extract shared formatting helpers for messages and summaries. Trim redundant tool descriptions.

* chore: cr updates

* chore: cr

* fix: adding pagnation

* fix: use nanoid to match Honcho's server-side ID format

* fix: simplified tool list. 10 removed, in favor of more unified tools

* docs: clarifying language

* docs: updating agentic dev & MCP.mdx docs

* docs: minor fix

* fix: adding codex

* chore: updating with latest SDK

* docs: update

* fix: adding assistantName config

* chore: clarifying language

---------

Co-authored-by: ajspig <dragon@monstercode.com>
2026-03-31 17:34:36 -04:00
..
src refactor: MCP server improvements (#379) 2026-03-31 17:34:36 -04:00
.gitignore Ben/search rrf (#179) 2025-08-06 17:43:03 -04:00
README.md refactor: MCP server improvements (#379) 2026-03-31 17:34:36 -04:00
bun.lock refactor: MCP server improvements (#379) 2026-03-31 17:34:36 -04:00
instructions.md refactor: MCP server improvements (#379) 2026-03-31 17:34:36 -04:00
package.json refactor: MCP server improvements (#379) 2026-03-31 17:34:36 -04:00
tsconfig.json refactor: MCP server improvements (#379) 2026-03-31 17:34:36 -04:00
wrangler.toml refactor: MCP server improvements (#379) 2026-03-31 17:34:36 -04:00

README.md

Honcho MCP Server

A Cloudflare Worker that implements the Model Context Protocol (MCP) for Honcho, providing AI memory and personalization tools to LLM clients like Claude Desktop.

Quickstart: Use the Hosted Server

  1. Get an API key at https://app.honcho.dev
  2. Add Honcho to your Claude Desktop config:
{
  "mcpServers": {
    "honcho": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "https://mcp.honcho.dev",
        "--header",
        "Authorization:${AUTH_HEADER}",
        "--header",
        "X-Honcho-User-Name:${USER_NAME}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer <your-honcho-key>",
        "USER_NAME": "<your-name>"
      }
    }
  }
}

Optional Headers

Header Default Description
X-Honcho-Workspace-ID "default" Workspace to operate in

Available Tools

Workspace: inspect_workspace (aggregates metadata, configuration, and peer/session IDs), list_workspaces (enumerates accessible workspaces), search (semantic search scoped by optional peer/session params), get_metadata, set_metadata

Peers: create_peer, list_peers, chat, get_peer_card, set_peer_card, get_peer_context, get_representation

Sessions: create_session, list_sessions, delete_session, clone_session, add_peers_to_session, remove_peers_from_session, get_session_peers, inspect_session, add_messages_to_session, get_session_messages, get_session_message, get_session_context

Conclusions: list_conclusions, query_conclusions, create_conclusions, delete_conclusion

System: schedule_dream, get_queue_status

Architecture

src/
  index.ts              # Worker entry point — parse config, delegate to MCP handler
  server.ts             # createServer() — registers all tools on an McpServer
  config.ts             # HonchoConfig, parseConfig(), createClient()
  types.ts              # ToolContext, result helpers
  tools/
    workspace.ts        # inspect, list, search, metadata
    peers.ts            # CRUD, chat, card, context, representation
    sessions.ts         # CRUD, peers, messages, inspect, context, clone
    conclusions.ts      # list, query, create, delete
    system.ts           # dream, queue status

Built on:

Development

Setup

bun install

Local dev

bun dev

Type-check

bun run tsc --noEmit

Test locally

bunx mcp-remote http://localhost:8787 \
  --header "Authorization:Bearer <key>" \
  --header "X-Honcho-User-Name:test"

Deploy

bun run deploy              # production
bun run deploy:staging      # staging