Schema First — server plan

A personal remote MCP server for one owner's approved agents. Endpoint: /mcp. Supports MCP 2026-07-28 (stateless per-request metadata) and 2025-11-25 (legacy initialize). Streamable HTTP returns JSON.

Tools and their schemas

Each tool declares inputSchema and outputSchema. Successful calls return validated structuredContent and matching serialized text. Errors use isError or JSON-RPC errors.

Sign-in and consent

Tools require a bearer access token issued by this server for this exact MCP resource. Missing, invalid or expired tokens receive 401 with protected-resource metadata. OAuth discovery supports Client ID Metadata Documents (CIMD), plus dynamic client registration for older clients. OAuth 2.1 authorization code flow requires PKCE S256, exact registered redirect URIs, and the resource parameter. Access tokens last one hour; refresh tokens last 30 days, rotate on every use, and token-family reuse revokes access.

The owner enters a private local password on the consent page, checks the client and redirect host, and explicitly presses Approve. Registering a client alone grants no access. Only the owner can grant access; this site offers no public account creation. Approved clients share this owner's notebook and can see notes written by other approved clients. Do not approve an unknown client. The /revoke endpoint and local management command revoke access.

Origin header filtering is disabled at the owner's request. This differs from the MCP transport's required Origin validation for DNS-rebinding protection. Bearer authentication, explicit owner approval, CSRF form tokens and PKCE remain required.

Data, retention and safety

SQLite on this machine stores notes, upload metadata, cached transcripts and OAuth records. Uploaded bytes are stored on disk. Notes, uploads and transcript caches remain until the owner deletes them with the local management command. Tokens are stored as hashes, not plaintext; authorization codes expire after five minutes and can be used once. Unapproved consent requests expire after ten minutes. The owner password is verified with scrypt.

Private request/reply audit logs remain on this machine until the owner deletes them; they may contain note and transcript text but redact credentials. The server does not publish source files, logs, private credentials, or its database. HTTPS certificates are renewed by Caddy. Downloads reject private, loopback and link-local destinations, pin validated DNS results, validate every redirect, and enforce time and size limits. Uploads are downloads with attachment headers and cannot run scripts in this site's origin. Requests are rate-limited.

To disconnect: revoke the client's tokens. To remove public files: delete them locally. To take this server offline: stop the schema-first and caddy services.