MCP: working /mcp endpoint (P1) + discovery consistency (P2/P4)#1
Open
LimaDevBTC wants to merge 1 commit into
Open
MCP: working /mcp endpoint (P1) + discovery consistency (P2/P4)#1LimaDevBTC wants to merge 1 commit into
LimaDevBTC wants to merge 1 commit into
Conversation
…se unpublished npm package P4 — counts were inconsistent across the discovery layer: /api said 40 endpoints, /api/status said 35, the OpenAPI contract documents 54; MCP tool count was variously 15 (/api), 16 (capabilities + llms.txt) while the live /mcp endpoint exposes 17. - Add lib/api-metadata.ts: API_ENDPOINT_COUNT derived from openapi.json paths (54), plus MCP_TOOL_COUNT (17) / RESOURCE (8) / PROMPT (4) constants. - Consume in /api, /api/status, /api/agent/capabilities — no more hardcoded drift. P2 — the discovery layer advertised `npx @dogdata/mcp-server`, which is unpublished on npm (404) and, being disk-backed, would not work for end users anyway. Per the audit's golden rule (never advertise what returns an error), point everything at the now-working remote endpoint + the published `mcp-remote` bridge for stdio clients: - llms.txt, robots.txt, ai-agent.json, /api, capabilities, docs page now advertise https://www.dogdata.xyz/mcp and `npx mcp-remote https://www.dogdata.xyz/mcp`. - Fix mcp-server/server.ts tool-count comment (16 -> 17). Note: P1 (the /mcp Next.js route itself — app/mcp/route.ts + lib/mcp/*) already landed on main via the hourly auto-update commit 94afbde. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Addresses the MCP audit (
mcpupdate.md, 2026-06-10). P1 is fully resolved; this PR carries the P2/P4 follow-ups (P1 itself already landed onmainvia the hourly auto-update commit94afbde66).P1 —
/mcp404 → working (already onmain)Root cause: the MCP server existed only as a standalone Express app (
mcp-server/, port 3002) that never deploys on Vercel serverless, sowww.dogdata.xyz/mcp404'd.Fix (files
app/mcp/route.ts+lib/mcp/*, already inmain):mcp-handler+@modelcontextprotocol/sdk@1.26.0,basePath:"/"→ exact/mcpmatch, Node runtime, CORS (Authorization / Content-Type / Mcp-Session-Id).POST /mcpinitialize→200,GET /mcp→405 (not 404),tools/list→17, resources→8, prompts→4, real-data execution, CORS preflight→204;next buildexit 0 (ƒ /mcp).get_metrics_historyupgraded from placeholder to real Supabase series.P4 — count inconsistencies (this PR)
Endpoints said 40 (
/api) vs 35 (/api/status); the OpenAPI contract documents 54. MCP tool count was 15 (/api) / 16 (capabilities + llms.txt) while the live endpoint exposes 17.lib/api-metadata.ts:API_ENDPOINT_COUNTderived fromopenapi.jsonpaths;MCP_TOOL_COUNT/RESOURCE/PROMPTconstants./api,/api/status,/api/agent/capabilities— drift-proof.P2 — unpublished npm package de-advertised (this PR)
npx @dogdata/mcp-serveris unpublished (npm 404) and, being disk-backed, wouldn't work for end users. Per the audit's golden rule (never advertise what errors), discovery now points at the working endpoint + the publishedmcp-remotebridge:llms.txt,robots.txt,ai-agent.json,/api,capabilities, docs page →https://www.dogdata.xyz/mcpandnpx mcp-remote https://www.dogdata.xyz/mcp.Not in scope
🤖 Generated with Claude Code