Repository navigation
feat(core): once-ui-mcp, a local MCP server over the ai/ harness - #371
Merged
Merged
Conversation
A stdio MCP server that ships in @once-ui-system/core as the once-ui-mcp bin and answers from the installed version's ai/ files. It has six tools: search_components, get_component, get_type, get_task, get_rules and validate_code (the once-ui-validate-ai-code checks). It speaks newline-delimited JSON-RPC directly, so it adds no dependency. The AI coding docs page and the .well-known MCP server card now point at it instead of Context7. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
Member
Author
|
Docs build fails here on Generated by Claude Code |
…feat/mcp-server # Conflicts: # CHANGELOG.md
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.
Before: Once UI had no MCP server of its own. The docs and the
.well-known/mcpserver card sent agents to Context7, which indexes the docs but knows nothing about props, types or the validator.After:
@once-ui-system/coreshipsonce-ui-mcp. One config line gives an agent six tools that answer from the installed version'sai/files:{ "mcpServers": { "once-ui": { "command": "npx", "args": ["-y", "-p", "@once-ui-system/core@next", "once-ui-mcp"] } } }search_componentsLineChart (@once-ui-system/core/data))get_componentget_typeTShirtSizes,IconName,SpacingPropsand the like, one alias deepget_taskget_rulesrules.compact.md, orrules.mdwithfullvalidate_codeonce-ui-validate-ai-codechecks on a source stringHow:
packages/core/scripts/mcp.cjsspeaks MCP's stdio transport (newline-delimited JSON-RPC 2.0) directly. That adds no dependency to core. It handlesinitialize(with protocol version negotiation),ping,tools/list,tools/call, batches and notifications. It reusesvalidate-ai-code.cjs's exports. It is registered inbinandfiles, so the existing package test covers it shipping as a.cjsbin.The docs changes:
buildMcpServerCarddescribesonce-ui-mcpat the core version the docs are built against.Checked:
mcp-server.test.ts(9 tests) runs the server as a child process through initialize, tools/list and a call, and covers each tool. Biome is clean on the new files. The realtools/listand calls were also exercised by hand.Generated by Claude Code