Repository navigation
feat: MCP tokens section in user settings - #371
Merged
Merged
Conversation
Let users create personal MCP tokens for AI assistants (Claude, Cursor) and manage them from the settings page. Works with the /user/mcp-tokens routes and the /mcp endpoint in notes.api. - Create a token with a label and an optional "Allow editing" switch (read-only by default). - Show the new token once with copy buttons and setup snippets for Claude Code, Cursor and Claude custom connectors. - List tokens with permission, preview, last usage and request count, and revoke them with confirmation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5 of 6 tasks
There was a problem hiding this comment.
🟡 Changes recommended
Initial loading can overwrite newly created tokens, and load failures hide token management without visible recovery.
2 open issues
What changed in this PR
Adds MCP token management to user settings, connecting AI assistants to notes through the existing application, domain, and repository layers.
Changes:
- Adds token creation with read-only defaults and copyable setup instructions.
- Lists token permissions and usage, with confirmed revocation.
- Adds API integration and English UI text.
| File | Description |
|---|---|
| src/presentation/pages/Settings.vue | Includes the MCP section. |
| src/presentation/components/mcp/McpTokens.vue | Adds token management and setup UI. |
| src/infrastructure/mcpToken.repository.ts | Implements token API requests. |
| src/infrastructure/index.ts | Registers the token repository. |
| src/domain/mcpToken.service.ts | Adds token service operations. |
| src/domain/mcpToken.repository.interface.ts | Defines the repository contract. |
| src/domain/index.ts | Exports the token service. |
| src/domain/entities/McpToken.ts | Defines token data types. |
| src/application/services/useMcpTokens.ts | Manages token loading and mutations. |
| src/application/i18n/messages/en.json | Adds MCP interface text. |
Review effort: Balanced
neSpecc
commented
Oct 21, 2026
- Disable "Create token" until the initial token list is loaded, so a late list response can't replace a just-created token. - Show "Could not load tokens" with a retry button when loading fails, instead of looking the same as having no tokens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Rename McpTokenService and McpTokenRepository to UserSettingsService and UserSettingsRepository with getMcpTokens, createMcpToken and revokeMcpToken methods. - Rename the useMcpTokens composable to useUserMcpSettings. - Use the text-monospaced class from the codex-ui typescale for setup snippets instead of custom font styles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
Adds an "MCP" section to the user settings page, so users can connect AI assistants (Claude, Cursor) to their notes through the new MCP endpoint in notes.api.
Depends on codex-team/notes.api#309, which adds the
/user/mcp-tokensroutes and the/mcpendpoint.${VITE_API_URL}/mcp+Authorization: Bearer …).ntx_…preview, permission, last usage, request count; revoke with confirmation.Layers follow the existing structure:
McpTokenentity, repository interface,McpTokenService,McpTokenRepositoryonNotesApiTransport,useMcpTokenscomposable, and theMcpTokens.vuecomponent rendered fromSettings.vue. Texts are added toen.json(the only locale).Test plan
vue-tsc --noEmit/mcp), no horizontal scroll at 375px width