@baseline-ui/mcp 0.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +74 -0
- package/dist/data/component-docs.json +69 -0
- package/dist/data/component-source.json +75 -0
- package/dist/data/component-types.json +75 -0
- package/dist/data/components.json +586 -0
- package/dist/data/docs.json +1 -0
- package/dist/data/getting-started.json +3 -0
- package/dist/data/icons.json +638 -0
- package/dist/data/react-aria-components.json +44 -0
- package/dist/data/tokens-metadata.json +54 -0
- package/dist/data/usage-examples.json +42 -0
- package/dist/index.js +395 -0
- package/package.json +45 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# @baseline-ui/mcp
|
|
2
|
+
|
|
3
|
+
## 0.46.1
|
|
4
|
+
|
|
5
|
+
## 0.1.0
|
|
6
|
+
|
|
7
|
+
### Initial Release
|
|
8
|
+
|
|
9
|
+
- 🎉 Initial release of the Baseline UI MCP server
|
|
10
|
+
- 📚 Support for listing and browsing all components
|
|
11
|
+
- 📖 Get component documentation from MDX files
|
|
12
|
+
- 🔍 Search through the complete icon library
|
|
13
|
+
- 📝 Access component TypeScript type definitions
|
|
14
|
+
- 💻 View component source code
|
|
15
|
+
- 🎯 Query specific documentation sections
|
|
16
|
+
- 🛠️ Tools included:
|
|
17
|
+
- `list_baseline_components`: List all available components
|
|
18
|
+
- `get_baseline_component_info`: Get component info and sections
|
|
19
|
+
- `get_baseline_component_docs`: Get full or partial documentation
|
|
20
|
+
- `get_baseline_component_types`: Get TypeScript type definitions
|
|
21
|
+
- `get_baseline_component_source`: Get component source code
|
|
22
|
+
- `search_baseline_icons`: Search icons by name
|
|
23
|
+
- 📦 Compatible with Cursor, VS Code, Claude Desktop, and other MCP clients
|
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Baseline UI MCP Server
|
|
2
|
+
|
|
3
|
+
Internal documentation for developing and maintaining the MCP server.
|
|
4
|
+
|
|
5
|
+
> **For public API documentation, see [MCP.mdx](./MCP.mdx) (used in Storybook)**
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
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.
|
|
10
|
+
|
|
11
|
+
## Architecture
|
|
12
|
+
|
|
13
|
+
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.
|
|
14
|
+
|
|
15
|
+
## Development
|
|
16
|
+
|
|
17
|
+
### Setup
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm install
|
|
21
|
+
pnpm build
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Running Locally
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Run the server
|
|
28
|
+
pnpm start
|
|
29
|
+
|
|
30
|
+
# Development with source maps
|
|
31
|
+
pnpm dev
|
|
32
|
+
|
|
33
|
+
# Run tests
|
|
34
|
+
pnpm test:unit --run packages/mcp
|
|
35
|
+
|
|
36
|
+
# Type checking
|
|
37
|
+
pnpm test:static
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Testing
|
|
41
|
+
|
|
42
|
+
- **Unit Tests** - Data file structure validation
|
|
43
|
+
- **Integration Tests** - Tool invocation and end-to-end MCP protocol testing
|
|
44
|
+
|
|
45
|
+
## Publishing
|
|
46
|
+
|
|
47
|
+
The package is published to npm as `@baseline-ui/mcp`. See `package.json` for published files and scripts.
|
|
48
|
+
|
|
49
|
+
## Performance Considerations
|
|
50
|
+
|
|
51
|
+
- **Pre-built Data** - All metadata generated at build time
|
|
52
|
+
- **Lazy Loading** - Documentation read on-demand
|
|
53
|
+
- **Efficient Search** - Simple string matching for icons
|
|
54
|
+
- **Caching** - React Aria Components data cached after first load
|
|
55
|
+
|
|
56
|
+
## Troubleshooting
|
|
57
|
+
|
|
58
|
+
### Build Failures
|
|
59
|
+
|
|
60
|
+
Check that:
|
|
61
|
+
|
|
62
|
+
- `packages/core` is built
|
|
63
|
+
- `packages/tokens` is built
|
|
64
|
+
- TypeDoc has generated `docs/index.json`
|
|
65
|
+
|
|
66
|
+
### Test Failures
|
|
67
|
+
|
|
68
|
+
Rebuild before testing: `pnpm build`
|
|
69
|
+
|
|
70
|
+
## Resources
|
|
71
|
+
|
|
72
|
+
- [MCP SDK Documentation](https://github.com/modelcontextprotocol/sdk)
|
|
73
|
+
- [MCP Specification](https://spec.modelcontextprotocol.io)
|
|
74
|
+
- [Baseline UI Repository](https://github.com/ritz078/baseline-ui)
|