feat: display MCP servers in profile Statistics panel - #675
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
2 issues found across 13 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
53eb543 to
bed57c8
Compare
- Add mcp module to tokscale-core that discovers MCP server names from Claude, Cursor, Kiro, and OpenCode configs - Include mcp_servers field in the CLI submit payload - Add mcp_servers JSONB column to submissions table (migration 0013) - Parse and store MCP servers on submit with null safety guard - Return mcpServers in the user profile API response - Display MCPs as badges via shared BadgeList component in Statistics panel
Validation * Validation tier: Tier 2R - post-review test-only correction for submit MCP payload coverage; no runtime files changed by this commit. * git diff --check: PASS. * git diff --cached --check: PASS. * bun install --frozen-lockfile: PASS. * bun --cwd packages/frontend test __tests__/api/submitAuth.test.ts: PASS, 12 tests. * bun --cwd packages/frontend test: PASS, 48 test files and 392 tests. * bun run lint __tests__/api/submitAuth.test.ts (cwd packages/frontend): PASS. * cargo fmt --all -- --check: PASS. * cargo test -p tokscale-core mcp: PASS, 8 tests. * cargo test -p tokscale-core: PASS, 850 passed, 1 ignored; codebuff/hermes integration tests and doc-tests passed. * cargo test -p tokscale-cli: PASS, unit tests 589 passed/1 ignored and cli_tests 115 passed. * cargo test --workspace --all-features: PASS. * /opt/homebrew/Cellar/rust/1.94.0/bin/cargo-clippy clippy --locked --workspace --all-features -- -D warnings: PASS. * bash scripts/test-calculate-release-version.sh && bash scripts/test-check-version-coherence.sh && bash scripts/test-npm-release-state.sh && bash scripts/test-prepare-release-provenance.sh: PASS. * bash scripts/check-version-coherence.sh: PASS, Version coherence OK: 3.0.0. * Ledger: not applicable - not required for selected validation tier/change family. * Version: PASS, bash scripts/check-version-coherence.sh; no version bump required for this test-only correction. * Not run: local Frontend Migration Replay - DATABASE_URL is not set locally; mandatory GitHub Frontend Migration Replay will run on the final PR SHA. Rollback * git revert HEAD
bed57c8 to
875d8f8
Compare
|
Thanks so much for putting this together, @leecoder. This is a useful addition because it gives profile pages more context about the local workflow behind the usage data, not just the client/model totals. I took a careful pass over the branch, updated it against the latest Since this is not only a fix but also introduces new profile metadata and a small schema addition, I’d still prefer to give @junhoyeo a chance to weigh in on the product direction. From my side, I don’t see a technical reason not to merge. Thanks again for the thoughtful contribution! |
junhoyeo
left a comment
There was a problem hiding this comment.
LGTM. The new crates/tokscale-core/src/mcp.rs module collects MCP server NAMES only (no secrets, no paths, no args), BTreeSet-deduplicated, with 8 unit tests including a full integration test. Migration 0013 is sequential and clean. The submitAuth.test.ts case filtering invalid entries (["github", "", "slack", 123, null] → ["github", "slack"]) covers the validation path nicely.
Summary
Collect MCP server names from local config during CLI submit and display them as badges in the Statistics panel on user profile pages, below the existing Clients section.
Changes
CLI (Rust)
mcpmodule totokscale-corethat discovers MCP server names from Claude, Cursor, and OpenCode configsmcp_serversfield in the submit payloadBackend (Next.js API)
mcp_serversJSONB column to submissions table (migration 0013)mcpServersin the user profile API responseFrontend
mcpServersprop through ProfileActivity → GraphContainer → StatsPanelMisc
Summary by cubic
Show MCP servers on profile pages by collecting server names during CLI submit and storing them on the backend. Users see MCP badges under Clients in the Statistics panel.
New Features
mcpmodule in@tokscale-core; sendmcp_serversin submit payload using@tokscale-cli.mcp_serversJSONB column onsubmissions; persist on submit with null-safe extraction and array sanitization; returnmcpServersin profile API.mcpServersthrough ProfileActivity → GraphContainer → StatsPanel and render MCP badges below Clients via shared BadgeList. Also fixes leaderboard hydration and sets profile “Last Updated” to UTC.Migration
mcp_serverscolumn.@tokscale-cli; existing profiles will show MCPs after the next submit.Written for commit 875d8f8. Summary will update on new commits.