feat: mcp - #33
Merged
Merged
Conversation
Consumers previously saw all files nested under dist/ (e.g. @webiny/stdlib/dist/node/features/...). Adding publishConfig.directory tells changesets to publish from dist/, where ArtifactCopier already places a package.json with rewritten exports pointing to root-relative paths. ArtifactCopier now also strips publishConfig from the dist copy so the published package.json stays clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace hand-rolled PackageJson/PackageJsonExports interfaces with type-fest's PackageJson type. Handles the full Exports union (null, string, array, ExportConditions) instead of only string | object. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add tsconfig.mcp.json / tsconfig.check.mcp.json, wire the mcp slice into the root tsconfig references and the BuildPackages build script, and add package.json exports/bin/deps for the upcoming mcp server. BuildOrchestrator gains copyReadmes (mirrors src/**/README.md into dist/) and ensureShebang (prepends #!/usr/bin/env node to dist/mcp/cli.js once it exists) so packaging works ahead of the actual MCP implementation. src/mcp/index.ts is an empty placeholder barrel so tsgo has something to compile for the new slice. Note: @modelcontextprotocol/sdk@1.30.0 was published within the repo's 3-day npmMinimalAgeGate window, so yarn install currently fails to resolve it until the gate clears or it is added to npmPreapprovedPackages in .yarnrc.yml (a security-policy file this agent is not permitted to edit).
Scans directories for README.md and SKILL.md files with YAML front-matter via @11ty/gray-matter. Extracts name, description, context, and body. First-match-wins on name collision. Skips missing directories and invalid front-matter with warnings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Registers list_stdlib_skills and get_stdlib_skill MCP tools. Skills discovered via SkillDiscovery and cached at startup. Catalog grouped by context, sorted alphabetically.
Interactive CLI for configuring Claude, Cursor, Cline, Copilot, Windsurf, Kiro, and OpenCode. Writes MCP config and hint files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dispatches stdlib-mcp serve (starts MCP server) and stdlib-mcp configure (interactive agent setup). Resolves default scan paths from package root with src/dist fallback.
…ng skills All 24 feature READMEs now have YAML front-matter for MCP discovery. Three cross-cutting skill files added: di-patterns, adding-a-feature, testing-patterns.
Both are process-level interactive code (stdio transport, readline prompts) that cannot be meaningfully unit tested. Excluding them keeps coverage thresholds passing without hollow tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- actions/checkout v4 → v7 - actions/setup-node v4 → v7 - actions/dependency-review-action v4.9.0 → v5.0.0 - amannn/action-semantic-pull-request v5 → v6 Resolves Node 20 deprecation warnings from action runtimes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Adds an MCP server to
@webiny/stdlibthat helps AI agents discover available tools and features.src/mcp/slice withlist_stdlib_skillsandget_stdlib_skillMCP toolsstdlib-mcp servestarts the server on stdio;stdlib-mcp configuresets up agent config files@webiny/stdlib/mcp, binarystdlib-mcpHow it works
Agents call
list_stdlib_skillsto get a grouped catalog (common/node/browser/guides), thenget_stdlib_skillwith a skill name to load full documentation. Skills are sourced from featureREADME.mdfiles with YAML front-matter and standaloneSKILL.mdfiles inskills/.Setup in a consuming project
Also included
publishConfig.directory: "dist"— published package now has flat structure (nodist/nesting)ArtifactCopierusestype-festPackageJsontype instead of hand-rolled interfacesREADME.mdfiles intodist/for npm consumersTest plan
yarn test:coverage— 493 tests pass, coverage thresholds metyarn build && head -1 dist/mcp/cli.js— shebang presentecho '{"jsonrpc":"2.0","id":1,"method":"initialize",...}' | npx stdlib-mcp serve— server respondsnpx stdlib-mcp configure— select Claude, verify.mcp.jsonandCLAUDE.mdwrittenfind dist -name "README.md" | wc -l— 25 READMEs in dist🤖 Generated with Claude Code