Skip to content

[Feature] MCP endpoint in the self-host server #965

Open

Description

@lawtj

User Story

As a self-host user, I want the ZenNotes server to expose an MCP endpoint over the network, so that agents on any machine can use my vault without installing and configuring zn on each one.

Problem

zn mcp (shipped via #345) only speaks stdio, so every client that wants MCP access needs its own zn install, zn connect, and saved token. I use my self-hosted vault as shared agent memory across several machines, and keeping each one set up is the part I'd like to avoid.

As @wedgen noted in #345, a client-side process also ties agent work to that client staying awake: if a laptop sleeps mid-task, the work fails. The server is the one machine that is always on and already holds the vault.

#948 asks for the same thing for ZenNotes Cloud; this is the self-host version, as suggested in #345.

Solution

Serve MCP from the self-host server itself over Streamable HTTP (e.g. at /mcp), reusing the existing MCP tools and the server's existing token auth:

claude mcp add --transport http zennotes https://my-server/mcp --header "Authorization: Bearer <token>"

Acceptance Criteria

  • The self-host server exposes an MCP endpoint over Streamable HTTP
  • The endpoint authenticates with the same token the server already uses for zn connect
  • It offers the same tools as zn mcp
  • Multiple clients can connect at the same time
  • The endpoint can be turned off in server config

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions