honcho/mcp
Vineeth Voruganti 911aa6029f
v3.0.0 Release Candidate (#346)
* fix: (docs) update changelog and examples

* chore: (docs) Add note on Vector Stores

* fix: (mcp) WIP to sync with 3.0.0 conventions

* fix: (mcp) Sync MCP with final API changes for 3.0.0

* chore: (docs) sync changelog and openapi spec

* fix: fixing .mdx files to match openapi.json spec

* chore: Add script to estimate event creation

---------

Co-authored-by: ajspig <dragon@monstercode.com>
2026-01-26 15:06:02 -05:00
..
.gitignore Ben/search rrf (#179) 2025-08-06 17:43:03 -04:00
README.md Ben/search rrf (#179) 2025-08-06 17:43:03 -04:00
bun.lock Update MCP Worker (#311) 2026-01-02 13:52:58 -05:00
instructions.md Adding crewAI integration guide (#279) 2025-12-01 14:46:14 -05:00
package.json v3.0.0 Release Candidate (#346) 2026-01-26 15:06:02 -05:00
tsconfig.json Ben/search rrf (#179) 2025-08-06 17:43:03 -04:00
worker.ts v3.0.0 Release Candidate (#346) 2026-01-26 15:06:02 -05:00
wrangler.toml Ben/search rrf (#179) 2025-08-06 17:43:03 -04:00

README.md

Honcho MCP Server

Quickstart: Use the Hosted MCP Server

Go to https://app.honcho.dev and get an API key. Then go to Claude Desktop and navigate to custom MCP servers.

If you don't have node/bun installed you will need to do that. You can also use npm if you already have that installed. If not, Claude Desktop or Claude Code can help!

Add Honcho to your Claude desktop config. You must provide a username for Honcho to refer to you as -- preferably what you want Claude to actually call you.

{
  "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>"
      }
    }
  }
}

You may customize your assistant name and/or workspace ID. Both are optional.

{
  "mcpServers": {
    "honcho": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "https://mcp.honcho.dev",
        "--header",
        "Authorization:${AUTH_HEADER}",
        "--header",
        "X-Honcho-User-Name:${USER_NAME}",
        "--header",
        "X-Honcho-Assistant-Name:${ASSISTANT_NAME}",
        "--header",
        "X-Honcho-Workspace-ID:${WORKSPACE_ID}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer <your-honcho-key>",
        "USER_NAME": "<your-name>",
        "ASSISTANT_NAME": "<your-assistant-name>",
        "WORKSPACE_ID": "<your-custom-workspace-id>"
      }
    }
  }
}

Available Tools

start_conversation

Start a new conversation session with Honcho. This initializes a session for tracking conversation history and context.

Returns: A session ID that you must store and use for all subsequent interactions in this conversation.

add_turn

Add a conversation turn (user and assistant messages) to the current session. This stores the conversation in Honcho for context tracking.

Parameters:

  • session_id: The ID of the session to add the turn to
  • messages: Array of message objects with role ("user" or "assistant") and content

Example usage:

{
  "session_id": "session-uuid",
  "messages": [
    {
      "role": "user",
      "content": "Hello, how are you?"
    },
    {
      "role": "assistant",
      "content": "I'm doing well, thank you!"
    }
  ]
}

get_personalization_insights

Get personalization insights from Honcho based on conversation history. This queries the user's conversation context to provide personalized responses.

Parameters:

  • session_id: The ID of the session for context
  • query: The question about the user's preferences, habits, etc.

Example queries:

  • "What does this message reveal about the user's communication preferences?"
  • "How formal or casual should I be with the user based on our history?"
  • "What emotional state might the user be in right now?"

search_workspace

Search for messages across the entire workspace.

Parameters:

  • query: The search query to use

get_workspace_metadata

Get metadata for the current workspace.

Parameters: None

set_workspace_metadata

Set metadata for the current workspace.

Parameters:

  • metadata: A dictionary of metadata to associate with the workspace

create_peer

Create or get a peer with the specified ID and optional configuration.

Parameters:

  • peer_id: Unique identifier for the peer
  • config: Optional configuration dictionary for the peer

get_peer_metadata

Get metadata for a specific peer.

Parameters:

  • peer_id: The ID of the peer to get metadata for

set_peer_metadata

Set metadata for a specific peer.

Parameters:

  • peer_id: The ID of the peer to set metadata for
  • metadata: A dictionary of metadata to associate with the peer

search_peer_messages

Search for messages sent by a peer.

Parameters:

  • peer_id: The ID of the peer to search messages for
  • query: The search query to use

chat

Query a peer's representation with natural language questions.

Parameters:

  • peer_id: The ID of the peer to query
  • query: The natural language question to ask
  • target_peer_id: Optional target peer ID for local representation queries
  • session_id: Optional session ID to scope the query to a specific session

list_peers

Get all peers in the current workspace.

Parameters: None

create_session

Create or get a session with the specified ID and optional configuration.

Parameters:

  • session_id: Unique identifier for the session
  • config: Optional configuration dictionary for the session

get_session_metadata

Get metadata for a specific session.

Parameters:

  • session_id: The ID of the session to get metadata for

set_session_metadata

Set metadata for a specific session.

Parameters:

  • session_id: The ID of the session to set metadata for
  • metadata: A dictionary of metadata to associate with the session

add_peers_to_session

Add peers to a session.

Parameters:

  • session_id: The ID of the session to add peers to
  • peer_ids: List of peer IDs to add to the session

remove_peers_from_session

Remove peers from a session.

Parameters:

  • session_id: The ID of the session to remove peers from
  • peer_ids: List of peer IDs to remove from the session

get_session_peers

Get all peer IDs in a session.

Parameters:

  • session_id: The ID of the session to get peers from

add_messages_to_session

Add messages to a session.

Parameters:

  • session_id: The ID of the session to add messages to
  • messages: List of message dictionaries with peer_id, content, and optional metadata

get_session_messages

Get messages from a session with optional filtering.

Parameters:

  • session_id: The ID of the session to get messages from
  • filters: Optional dictionary of filter criteria

get_session_context

Get optimized context for a session within a token limit.

Parameters:

  • session_id: The ID of the session to get context for
  • summary: Whether to include summary information (default: true)
  • tokens: Maximum number of tokens to include in the context

search_session_messages

Search for messages in a specific session.

Parameters:

  • session_id: The ID of the session to search messages in
  • query: The search query to use

get_working_representation

Get the current working representation of a peer in a session.

Parameters:

  • session_id: The ID of the session
  • peer_id: The ID of the peer to get the working representation of
  • target_peer_id: Optional target peer ID to get the representation of what peer_id knows about target_peer_id

list_sessions

Get all sessions in the current workspace.

Parameters: None

Contributing or Self Hosting

A Cloudflare Worker that implements the Model Context Protocol (MCP) to provide Honcho functionality as tools for AI assistants like Claude Desktop.

Deploy MCP Worker

  1. Install dependencies:

    bun i
    
  2. Login to Cloudflare (if not already done):

    bun wrangler login
    
  3. Configure your worker name in wrangler.toml:

    • Update the name field to your desired worker name
    • Update the worker names in the [env.production] and [env.staging] sections
  4. Test locally:

    bun dev
    
  5. Deploy to production:

    bun run deploy
    

Configuration Options

You can customize the behavior using HTTP headers:

Available Configuration:

  • apiKey: Your Honcho API key
  • baseUrl: Custom Honcho API base URL (default: https://api.honcho.dev)
  • workspaceId: Workspace ID (default: "default")
  • userName: User identifier (default: "User")
  • assistantName: Assistant identifier (default: "Assistant")

Using HTTP Headers

Pass configuration to mcp-remote via custom headers:

bunx mcp-remote https://YOUR_WORKER_NAME.YOUR_SUBDOMAIN.workers.dev \
  --header "Authorization:Bearer YOUR_HONCHO_API_KEY" \
  --header "X-Honcho-Workspace-ID:my-workspace" \
  --header "X-Honcho-User-Name:john" \
  --header "X-Honcho-Assistant-Name:Claude" \
  --header "X-Honcho-Base-URL:https://custom.honcho.dev"

Supported Custom Headers:

  • Authorization: Bearer YOUR_API_KEY - Your Honcho API key
  • X-Honcho-Base-URL - Custom Honcho API base URL
  • X-Honcho-Workspace-ID - Workspace identifier
  • X-Honcho-User-Name - User identifier
  • X-Honcho-Assistant-Name - Assistant identifier

Authentication

The MCP server requires a valid Honcho API key provided via the Authorization header.

Testing

You can test the MCP server using mcp-remote with the local URL:

bunx mcp-remote http://localhost:8787 --header "Authorization:Bearer your-api-key"

Error Handling

The server provides proper JSON-RPC 2.0 error responses:

  • -32700: Parse error
  • -32600: Invalid Request
  • -32601: Method not found
  • -32602: Invalid params
  • -32603: Internal error

Common issues:

  • Missing API key: Ensure you provide a valid Honcho API key via header or URL parameter
  • Invalid tool parameters: Check that required parameters are provided and properly formatted
  • Network errors: Verify the worker is deployed and accessible