diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a16410..eb9f19d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to DevMap are documented in this file. ## [Unreleased] +### Planned + +- Go, Java, C# and PHP (PSR-4) import resolution, after JS/TS is mature +- Public benchmark results +- Feedback-driven fixes from the `0.2.0` beta + +## [0.9.0] - 2026-10-30 + ### Added - `devmap mcp`: run DevMap as an MCP server over stdio so AI agents can query the project map @@ -29,12 +37,7 @@ All notable changes to DevMap are documented in this file. - `runMap`, `runFlow`, `runAnalyze` and `runExplain` are exported; `map` and `flow` accept `write` and `loaded`, `flow` accepts `narrate`, and `analyze` accepts `offline`. CLI behavior is unchanged - The CI and publish workflows run `test/mcp-smoke.mjs` against the build before publishing - -### Planned - -- Go, Java, C# and PHP (PSR-4) import resolution, after JS/TS is mature -- Public benchmark results -- Feedback-driven fixes from the `0.2.0` beta +- Website: MCP section on the landing page and an MCP section in the docs ## [0.8.4] - 2026-10-29 diff --git a/docs/releasing.md b/docs/releasing.md index 7e75f65..6c28775 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -94,3 +94,31 @@ this repository and add a release workflow. The workflow should: 4. Publish only `packages/cli`. 5. Use a protected GitHub Environment with manual approval. 6. Use short-lived OIDC credentials instead of a long-lived npm token. + +## MCP Registry + +`packages/cli/server.json` describes the MCP server for the +[MCP Registry](https://modelcontextprotocol.io/registry/quickstart). The registry +only stores metadata, so publish to npm first. + +Rules: + +- `name` in `server.json` must equal `mcpName` in `packages/cli/package.json` + (`io.github.itsflaid/devmap`). The registry checks the published npm package + for it. +- `version` and `packages[0].version` in `server.json` must equal the version + just published to npm. Update both in the release PR, next to `package.json`. +- The server starts with `devmap mcp`, which is the `mcp` positional entry in + `packageArguments`. + +After the `v*.*.*` tag has published the package: + +```bash +npm view @flaid/devmap version # must show the new version +cd packages/cli +mcp-publisher login github +mcp-publisher publish +curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.itsflaid/devmap" +``` + +`mcp-publisher publish` is manual and separate from `publish.yml`. diff --git a/packages/cli/README.md b/packages/cli/README.md index 7d3cda0..d878b45 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -119,6 +119,7 @@ devmap onboarding --write devmap onboarding --write --language id devmap doctor devmap config model auto +devmap mcp # run as an MCP server ``` Groq and OpenRouter use the model selected during init. Change either @@ -129,6 +130,41 @@ devmap config model devmap config model auto ``` +## MCP Server + +`devmap mcp` runs DevMap as a [Model Context Protocol](https://modelcontextprotocol.io) +server over stdio. An AI agent asks the project map questions with tool calls and +gets structured JSON back, instead of reading a whole context file up front. + +```bash +devmap analyze +claude mcp add devmap -- npx -y @flaid/devmap mcp +``` + +Other clients launch the same command (`npx -y @flaid/devmap mcp`) as a stdio server: + +```json +{ + "mcpServers": { + "devmap": { + "command": "npx", + "args": ["-y", "@flaid/devmap", "mcp"] + } + } +} +``` + +Tools: `devmap_overview`, `devmap_map`, `devmap_flow`, `devmap_routes`, +`devmap_impact`, `devmap_find`, `devmap_analyze` and, only with `--allow-ai`, +`devmap_explain`. + +The server is read-only and static by default: no AI provider is contacted unless +you start it with `--allow-ai`, and it only writes inside `.devmap/` when the agent +calls `devmap_analyze` or you start it with `--auto-refresh`. Every answer reports +whether the snapshot is stale. See the +[MCP guide](https://github.com/itsflaid/devmap/blob/main/docs/mcp.md) for client +setup and tool inputs. + ## Generated Context DevMap generates: diff --git a/packages/cli/package.json b/packages/cli/package.json index 715a1bc..11d2922 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@flaid/devmap", "mcpName": "io.github.itsflaid/devmap", - "version": "0.8.4", + "version": "0.9.0", "description": "CLI that maps your codebase into a reusable context layer for developers and AI agents: entry points, critical files, features and routes for JS/TS projects.", "bin": { "devmap": "./dist/index.js" @@ -38,6 +38,8 @@ "reverse-engineering", "context", "claude-code", + "mcp", + "model-context-protocol", "typescript", "nextjs", "route-detection", diff --git a/packages/cli/server.json b/packages/cli/server.json new file mode 100644 index 0000000..01f6698 --- /dev/null +++ b/packages/cli/server.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", + "name": "io.github.itsflaid/devmap", + "description": "Query a codebase map (routes, features, flows, impact) built by static analysis.", + "repository": { + "url": "https://github.com/itsflaid/devmap", + "source": "github", + "subfolder": "packages/cli" + }, + "version": "0.9.0", + "packages": [ + { + "registryType": "npm", + "identifier": "@flaid/devmap", + "version": "0.9.0", + "runtimeHint": "npx", + "transport": { + "type": "stdio" + }, + "packageArguments": [ + { + "type": "positional", + "value": "mcp" + } + ] + } + ] +}