AI agents

Install and configure MCP

Connect a local MCP client to PrivateNote in a few steps.

Documented against privatenote-mcp 0.4.0.

Install Node.js 18 or later and make sure node and npx are available to your desktop application. PrivateNote’s MCP package is privatenote-mcp.

Cursor

Add the following server to ~/.cursor/mcp.json. Merge it with your existing mcpServers object if other servers are already configured.

~/.cursor/mcp.json
{
  "mcpServers": {
    "privatenote": {
      "command": "npx",
      "args": [
        "-y",
        "privatenote-mcp"
      ]
    }
  }
}

Restart or reload the MCP connection in Cursor. Check that create_private_note and confirm_private_note appear among the available tools.

Codex

Register the local server from your terminal:

Register the MCP server
codex mcp add privatenote -- npx -y privatenote-mcp

Alternatively, add the server to your Codex configuration:

~/.codex/config.toml
[mcp_servers.privatenote]
command = "npx"
args = ["-y", "privatenote-mcp"]

Restart the MCP connection and verify that the tool list is available.

Other local MCP clients

Use the JSON configuration above in a client that accepts mcpServers entries, or enter command npx with arguments -y and privatenote-mcp in its MCP settings. Configuration file locations vary by client.

Set allowed file roots

If the client’s working directory is not your project, configure explicit folders. Use colon-separated roots on macOS/Linux and semicolon-separated roots on Windows.

Explicit workspace access
{
  "mcpServers": {
    "privatenote": {
      "command": "npx",
      "args": [
        "-y",
        "privatenote-mcp"
      ],
      "env": {
        "PRIVATENOTE_MCP_ALLOWED_ROOTS": "/absolute/path/to/project"
      }
    }
  }
}

Use an absolute local path. Restart the server after changing its environment. Credential directories stay blocked.

Environment variables

PRIVATENOTE_API_BASE_URL
API origin. Defaults to https://privatenote.ai.
PRIVATENOTE_WEB_ORIGIN
Origin used in generated links. Defaults to the API origin.
PRIVATENOTE_MCP_ALLOWED_ROOTS
Additional allowed local directories. Set explicitly when the client starts outside your project.
PRIVATENOTE_MCP_ALLOW_ONE_SHOT
Leave unset for interactive agents. Enabling it at server startup skips the preview; do not combine with a host that has delivery tools.

Verify the connection

  1. Ask the agent to call whoami. Signed out is a valid connection result.
  2. Create a dummy UTF-8 file inside an allowed directory.
  3. Ask for a short-lived note using only its path. Inspect and approve the preview.
  4. Open and reveal the returned link in a separate browser profile. Verify that it burns after reveal.
Something unclear?Help us improve these docs

Search setup guides, tools, and troubleshooting.