@baseline-ui/mcp
v0.55.0
Published
MCP server for Baseline UI design system documentation
Readme
Baseline UI MCP Server
Internal documentation for developing and maintaining the MCP server.
For public API documentation, see MCP.mdx (used in Storybook)
Overview
This package provides a Model Context Protocol (MCP) server that exposes Baseline UI's component documentation, icons, and design tokens to AI assistants like Claude and Cursor.
Architecture
The server uses a build-time process to extract metadata from components, icons, and design tokens. The server implementation uses @modelcontextprotocol/sdk with stdio transport and lazy-loads documentation on demand.
Development
Setup
pnpm install
pnpm buildRunning Locally
# Run the server
pnpm start
# Development with source maps
pnpm dev
# Run tests
pnpm test:unit --run packages/mcp
# Type checking
pnpm test:staticTesting
- Unit Tests - Data file structure validation
- Integration Tests - Tool invocation and end-to-end MCP protocol testing
Publishing
The package is published to npm as @baseline-ui/mcp. See package.json for published files and scripts.
Performance Considerations
- Pre-built Data - All metadata generated at build time
- Lazy Loading - Documentation read on-demand
- Efficient Search - Simple string matching for icons
- Caching - React Aria Components data cached after first load
Troubleshooting
Build Failures
Check that:
packages/coreis builtpackages/tokensis built- TypeDoc has generated
docs/index.json
Test Failures
Rebuild before testing: pnpm build
