You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add a local stdio MCP server backed by Kept's authenticated HTTP API
expose seven focused tools for note search/read/create/update/archive/trash and label listing
support session-token authentication or dedicated non-2FA username/password login with one safe 401 reauthentication
include MCP safety annotations, bounded Zod inputs, secret-handling guidance, Docker packaging, and focused protocol/API tests
Motivation / Bug
Kept already has the application API needed by agent clients, but agents currently need bespoke HTTP integrations or unsafe direct SQLite access. This provides a small official adapter without adding a remote listener or another public port.
Permanent deletion, user administration, backup restoration, arbitrary action-plan execution, and direct database access are intentionally excluded.
real stdio client/server handshake through StdioClientTransport
git diff --check
added runtime dependencies are MIT licensed
npm audit --omit=dev still reports existing Kept application dependency advisories. Compatible MCP-tree Hono, body-parser, fast-uri, and ip-address versions were updated so this change does not leave the avoidable advisories initially surfaced in that new dependency path.
Risks / Rollback
Kept's application API is not independently versioned; MCP route mappings are covered by focused contract tests and documented accordingly.
Session tokens expire according to KEPT_SESSION_TTL_DAYS; 2FA users must provide an interactively obtained KEPT_TOKEN.
Rollback is removal of mcp/, the two runtime dependencies/scripts, Docker copy line, and documentation links. The normal Kept server runtime and database schema are unchanged.
CLA
I have read CONTRIBUTING.md and agree that my contribution is submitted under the Kept Contributor License Agreement.
Exact-head fallback at 0818ec7bcd40062c4db977db1415ef2bf9f3d42d: the Codex connector did not return a review after the initial request, one five-minute nudge, and a second five-minute window. I fetched origin/master (branch already current) and reran the full relevant gate: 11 MCP tests passed including stdio handshake, existing sync smoke passed, and the Node 24 production build plus PurgeCSS passed. Leaving the PR draft and unmerged for maintainer review.
The MCP adapter is now live-tested against a tailnet-only Kept instance using a real account session: tool discovery passed, and a temporary note was created, read, and moved to recoverable trash. The branch remains current with master and is ready for maintainer review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11.
Summary
Motivation / Bug
Kept already has the application API needed by agent clients, but agents currently need bespoke HTTP integrations or unsafe direct SQLite access. This provides a small official adapter without adding a remote listener or another public port.
Permanent deletion, user administration, backup restoration, arbitrary action-plan execution, and direct database access are intentionally excluded.
Test Evidence
npx --yes --package=node@24 node --test mcp/*.test.mjs— 11 passednpx --yes --package=node@24 node server/sync-smoke.test.jsStdioClientTransportgit diff --checknpm audit --omit=devstill reports existing Kept application dependency advisories. Compatible MCP-tree Hono, body-parser, fast-uri, and ip-address versions were updated so this change does not leave the avoidable advisories initially surfaced in that new dependency path.Risks / Rollback
KEPT_SESSION_TTL_DAYS; 2FA users must provide an interactively obtainedKEPT_TOKEN.mcp/, the two runtime dependencies/scripts, Docker copy line, and documentation links. The normal Kept server runtime and database schema are unchanged.CLA
I have read
CONTRIBUTING.mdand agree that my contribution is submitted under the Kept Contributor License Agreement.