Repository navigation
Register the MCP server on init and point agents at its tools - #107
Merged
Merged
Conversation
`urlcode init` writes `.mcp.json` ({"mcpServers":{"urlcode":{"command":"urlcode","args":["mcp","--project","."]}}}), the shape Claude Code and Codex read; `init --with` writes it at the site root beside host.mjs with `--project app`. Existing files are never overwritten (exclusive create), and the file carries no `--allow-authoring`: that stays an operator opt-in.
The starter carries the same file, kept identical to `renderMcpConfig` by test. The generated AGENTS.md and the packaged skill tell agents to prefer `get_context`, `get_capability`, `get_schema`, `search_recipes`, `explain` and `get_manifest` when the server is registered, with the CLI commands as the fallback. docs/TOOLING.md gains "Registering the server" for Claude Code, Codex and a generic stdio client; AI-AUTHORING and STARTERS link to it. Package smoke checks the starter ships `.mcp.json` and that init writes it.
Closes #103
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AQ3ZGqNtWviSYfUMsxU54E
Regenerate llms-full.txt after the 0.4.0-alpha.1 release merge. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01AQ3ZGqNtWviSYfUMsxU54E
Regenerate llms-full.txt after the npm-alphas docs merge. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01AQ3ZGqNtWviSYfUMsxU54E
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
urlcode initwrites.mcp.jsonat the project root:{"mcpServers":{"urlcode":{"command":"urlcode","args":["mcp","--project","."]}}}(the shape Claude Code and Codex read).init --withwrites it once at the site root besidehost.mjswith--project app(theapp/copy is lifted out, like the README). Both use exclusive create, so an existing file is never overwritten, and neither carries--allow-authoring: that stays an operator opt-in.renderMcpConfiginsrc/agents-guide.tsrejects absolute paths and...starters/default/.mcp.jsonships the same bytes; a test keeps starter and generator identical, as forAGENTS.md.AGENTS.md(still under 80 lines) andskills/urlcode/SKILL.mdtell agents to preferget_context,get_capability,get_schema,search_recipes,explainandget_manifestwhen the server is registered, withurlcode context / capabilities NAME / schema PATH / recipes search / explain / manifestas the fallback, and never to add--allow-authoringthemselves.docs/TOOLING.mdgains "Registering the server" (Claude Code via.mcp.json, Codex via.mcp.jsonorconfig.toml, generic stdio client); one line each indocs/AI-AUTHORING.mdanddocs/STARTERS.md;llms-full.txtregenerated.Validation
.mcp.jsonwith--project .;init --withwrites it at the site root with--project appand removes theapp/copy; starter file equalsrenderMcpConfig('.'); AGENTS.md names every MCP tool..mcp.jsonand the installed CLI'sinitwrites it.npm run verifygreen (lint, typecheck, check incl. llms-full, build, 503 tests: 466 pass, 37 skipped, 0 fail).npm run test:packagegreen.Closes #103
🤖 Generated with Claude Code
https://claude.ai/code/session_01AQ3ZGqNtWviSYfUMsxU54E
Generated by Claude Code