Repository navigation
✨ feat: the fragiola CLI and its MCP server (Epic #5) - #6
Merged
Merged
Conversation
The fragiola package with its bin (dist/cli.mjs), the side-effect-free "." export and the "./mcp" export, pinned toolchain (TypeScript 7, tsdown, Vitest, Biome), AGENTS.md with the repository rules, and CI. Closes #1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ient docs/agent-index.md (v1) and its zod schemas, a cached fetcher with typed errors (FRAGIOLA_URL overrides the base URL), and the catalog queries the MCP tools use: projects by kind, entries, pages, name resolution across the two kinds, and fuzzy search. Tested against a local fixture site. Closes #2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and tools createServer (also the fragiola/mcp export) on @modelcontextprotocol/server v2 with initialize instructions that explain the two kinds of components, and eight tools: get_fragiola_overview, list_projects, list_components, search_fragiola, get_component, get_docs, get_api and get_install_command. fragiola mcp serves it over stdio. Tested in process for every tool and end to end over stdio with both protocol negotiations. Closes #3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Code and Codex Writes or merges each client's project config (npx fragiola@latest mcp) without losing other servers, refuses invalid JSON, prints the TOML block for Codex, and asks for the client only in a terminal. The README covers setup, manual configuration, example prompts and troubleshooting. Closes #4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- mcp init replaces an older fragiola entry instead of merging into it - a failure while reading a response body is a ContentError, and every ContentError carries a suggestion; a failed request no longer evicts a newer cache entry - a page is found by its last segment only when it is unique (AMBIGUOUS otherwise), never from a wrong path; API lookups prefer API pages - get_install_command names the other kind of a shared name, get_component keeps the other names' results when one fails and says when docs could not be read, search says when the offset is past the end, unscoped package names resolve - the stdout test drives a real session with a failing tool Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 15, 2026
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
This implements Epic #5. It adds the
fragiolapackage: a CLI whosefragiola mcpcommand is an MCP server (stdio) for AI agents. It also exports the server asfragiola/mcp. The server reads fragiola.com's agent index and keeps Fragiola's two kinds of components apart in everything it says:npx shadcn@latest add @fragiola/<name>.@fragiola/<x>plus@fragiola/<x>-react.Closes #1
Closes #2
Closes #3
Closes #4
What changed
binisdist/cli.mjs. The"."export has no side effects, and"./mcp"exportscreateServer.AGENTS.mdwith the repository rules, and CI (check, typecheck, test, pack).mainwas created with the first commit (LICENSEandREADME), because the repo was empty.docs/agent-index.md(v1) is the contractfragiola/wwwwill emit (Epic: An agent-readable fragiola.com and the MCP server page www#26).src/content/schema.tsholds its zod schemas.ContentErrors carry a code and a suggestion.FRAGIOLA_URLoverrides the base URL.fragiola mcp, instructions and tools #3 MCP server (@modelcontextprotocol/server2.4.0, the v2 line)instructionsexplain the two kinds.get_fragiola_overview,list_projects,list_components,search_fragiola,get_component(withinclude_code),get_docs,get_api,get_install_command.[ui · source code]or[library · <package>], with the next tool or command.fragiola mcp initfor AI clients, and the setup docs #4fragiola mcp init --client <claude|cursor|vscode|opencode|codex>fragiolaentry.Verification
pnpm install --frozen-lockfile,pnpm check,pnpm typecheck,pnpm test(91 tests) andpnpm buildpass.tests/fixtures/site/, which is modelled on the realuiregistry and the projects' sidebars.node dist/cli.mjs mcpruns over stdio with both protocol negotiations: legacy2025-11-25, and2026-07-28pinned.pnpm packcontains onlydist,LICENSE,package.jsonandREADME.md.initmerged into a stalefragiolaentry), four Medium and several Low. All are fixed in 9284093, with tests.Notes
initprompts with Nodereadline(no prompt dependency), and merges JSON with a small local helper instead ofdeepmerge.npx fragiola@latest mcp, andfragiolais not added to the project's dependencies.@fragiola/dockablecan equal an npm package name, so a name with both meanings returns both.pnpm mcp:inspectis there for a manual look.https://fragiola.com/agents/index.jsondoes not exist. The tools then answerNOT_FOUNDwith a suggestion. UseFRAGIOLA_URLto point at a local build.Requested by: @maurodesouza
🤖 Generated with Claude Code