{
  "markdown": "# devstack-mcp\n\nA remote **MCP (Model Context Protocol)** connector for [DevStack API](https://devstack-api.vercel.app) — the libraries.io successor: one keyless, normalized view of the whole developer registry across **npm, PyPI, Docker Hub, and the VS Code Marketplace** (search, package details, versions, download/pull stats), plus **resolved dependency graphs** (deps.dev), **per-version vulnerabilities** (OSV.dev), **OSSF Scorecard insights** (deps.dev), and **cross-registry lookups over 50+ ecosystems** (ecosyste.ms).\n\n**Target deploy:** `https://devstack-mcp.vercel.app/mcp` — 10 tools. Since the upstream DevStack deployment is metered (RapidAPI/Apify) and gates `/v1/*` behind a RapidAPI proxy-secret guard, this connector authenticates its own outbound calls with that same proxy secret (`DEVSTACK_MCP_PROXY_SECRET`, sent as the `X-RapidAPI-Proxy-Secret` header) and applies a soft per-IP rate limit (`DEVSTACK_MCP_RATE_LIMIT`, default 30 tool-calls/hour, in-memory) so the free MCP tier stays a discovery channel rather than an unmetered bypass of the paid listing — see `lib/ratelimit.js`.\n\n## What this is, and why it's a separate connector\n\nDevStack API is a plain REST API. Any HTTP client can already call it directly. This repo exists because **MCP clients (Claude, ChatGPT, and other MCP-aware agents) don't consume arbitrary REST APIs — they consume MCP tools.** `devstack-mcp` is a thin adapter layer that:\n\n- Exposes each DevStack endpoint as a discoverable, typed MCP **tool** (name, description, zod input schema, annotations) that an LLM can reason about and call directly, instead of having to be taught the REST surface out-of-band.\n- Speaks the MCP **streamable-HTTP** transport at a single `/mcp` endpoint, so it can be registered as a connector in Claude, ChatGPT, or any other MCP client with one URL.\n- Does nothing else. It has no business logic of its own — every tool call is a pass-through `fetch` to DevStack, and the JSON response DevStack returns is handed back verbatim as the tool result.\n\n## Authentication: None on the MCP side (deliberate)\n\nDevStack's data has **no per-user dimension at all** — it's public developer-registry metadata (package listings, versions, download counts, dependency graphs, published CVEs). There is nothing to gate per-caller, so this connector intentionally ships with:\n\n- No OAuth, no login, no per-user bearer tokens\n- No Supabase / database\n- No demo-vs-real account split — every caller gets the same real, live data\n\nThe one server-side secret it carries (`DEVSTACK_MCP_PROXY_SECRET`) is **not** per-caller auth — it's how this connector, as a single consumer, gets past the upstream's RapidAPI proxy-secret guard to reach real data. Combined with the soft per-IP rate limit, that keeps this a free discovery tier over the metered DevStack product rather than an unmetered bypass of the paid RapidAPI/Apify listing.\n\n## Tool list\n\nOne tool per DevStack `/v1` endpoint (from `devstack-api/openapi.yaml`):\n\n| Tool | DevStack endpoint | Description |\n|---|---|---|\n| `get_package` | `GET /v1/package` | Normalized package details by registry + name (`registry=all` fans out). |\n| `search_packages` | `GET /v1/search` | Search npm/Docker/VS Code (or `all`); PyPI has no search API. |\n| `get_versions` | `GET /v1/versions` | Published versions / image tags / extension versions. |\n| `get_downloads` | `GET /v1/downloads` | Download / pull statistics (npm + PyPI only). |\n| `get_dependency_graph` | `GET /v1/deps` | Fully resolved dependency graph for one exact version (deps.dev). |\n| `get_vulnerabilities` | `GET /v1/vulns` | Known CVEs/GHSAs per package/version (OSV.dev). |\n| `scan_vulnerabilities_batch` | `POST /v1/vulns` | Batch/lockfile vulnerability scan — up to 100 queries in one call (OSV.dev). |\n| `get_insights` | `GET /v1/insights` | OSSF Scorecard + repo signal + licenses/advisories (deps.dev). |\n| `search_ecosystems` | `GET /v1/ecosystems/search` | Cross-registry exact-name lookup across 50+ ecosystems (ecosyste.ms). |\n| `get_ecosystems_package` | `GET /v1/ecosystems/package` | One package on one registry, with reverse-dependency counts (ecosyste.ms). |\n\nAll 10 tools are read-only and annotated `{ readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }`. `scan_vulnerabilities_batch` is an HTTP `POST` but is a read-only *query* (it mutates nothing), so it carries the same read-only annotations.\n\n## How it wraps devstack-api\n\nEach tool handler does a plain `fetch(\\`${DEVSTACK_MCP_API_BASE_URL}${path}\\`, ...)` against the real DevStack REST API and returns the parsed JSON as MCP tool-result content:\n\n```js\n{ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }\n```\n\nUpstream HTTP errors (4xx/5xx) are caught and surfaced as a typed MCP error result via an `asError` helper rather than crashing the request.\n\n### Environment variables\n\n| Env var | Purpose | Default |\n|---|---|---|\n| `DEVSTACK_MCP_API_BASE_URL` | Upstream DevStack base URL. | `https://devstack-api.vercel.app` |\n| `DEVSTACK_MCP_PROXY_SECRET` | RapidAPI proxy secret, sent as `X-RapidAPI-Proxy-Secret` to pass the upstream `/v1/*` guard. | `\"\"` (omitted) |\n| `DEVSTACK_MCP_RATE_LIMIT` | Soft per-IP tool-calls/hour cap for this free tier. | `30` |\n\n## Project layout\n\n```\napi/mcp.js       MCP endpoint (StreamableHTTPServerTransport, stateless, no per-caller auth)\napi/health.js    GET /api/health\nlib/tools.js     All 10 tool definitions (zod schemas + fetch-and-forward handlers)\nlib/ratelimit.js Soft per-IP tools/call cap (free discovery tier)\nlocal-server.js  Plain-Node http server for local dev / smoke testing (not deployed)\ntest/smoke.mjs   Real end-to-end smoke test (initialize, tools/list, tools/call)\nvercel.json      Routes /mcp -> api/mcp.js, /health -> api/health.js\nserver.json      MCP registry publish manifest\n```\n\n## Local development\n\n```bash\nnpm install\nnpm run dev          # starts local-server.js on http://localhost:3900\n```\n\nEndpoints locally: `POST http://localhost:3900/mcp`, `GET http://localhost:3900/health`.\n\nTo point at a self-hosted / open DevStack instance instead of production (useful for a fully keyless end-to-end run, since production's `/v1/*` is behind the RapidAPI proxy-secret guard):\n\n```bash\n# In devstack-api (guard is inert when RAPIDAPI_PROXY_SECRET is unset):\nnode server.js                                   # listens on :8080\n\n# In devstack-mcp:\nDEVSTACK_MCP_API_BASE_URL=http://localhost:8080 npm run dev\n```\n\n## Smoke test\n\n```bash\nnpm run dev &                 # terminal 1\nnpm run smoke                 # terminal 2\n```\n\n`test/smoke.mjs` drives the running server over real HTTP/JSON-RPC and verifies:\n\n1. `GET /health` returns `{ ok: true, ... }`\n2. `initialize` succeeds and reports `serverInfo.name === \"devstack\"`\n3. `tools/list` returns all 10 tools with their zod-derived JSON schemas\n4. `tools/call` for `get_package` with `{ registry: \"npm\", name: \"react\" }` returns real package data fetched live (not mocked)\n\nAgainst production, step 4 needs `DEVSTACK_MCP_PROXY_SECRET` set (the RapidAPI proxy guard); against a locally self-hosted `devstack-api` with no `RAPIDAPI_PROXY_SECRET`, the guard is inert and real data flows keyless.\n\n## Deploy\n\nNot deployed by this build. Once ready:\n\n```bash\ncd /Users/isaiahdupree/Software/devstack-mcp\nnpx vercel --yes --prod\n```\n\nAfter deploy, set `DEVSTACK_MCP_PROXY_SECRET` in the Vercel project so the connector can reach the guarded production `/v1/*`, then register the MCP connector URL in Claude/ChatGPT/any MCP client:\n\n```\nhttps://<deployment-domain>/mcp\n```\n",
  "bytes": 7589,
  "sha": "a8f0a16e6e58740b7707787f414bcfa10e5bee5e766e2c3c2850402762f73506",
  "repo_slug": "isaiahdupree/devstack-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_isaiahdupree_devstack_mcp_14677e6b/readme"
}