Skip to content

Commit ee8b1e2

Browse files
committed
[Documentation] Add MCP README
1 parent e7d0277 commit ee8b1e2

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

mcp/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# ruby_ui-mcp
2+
3+
Model Context Protocol (MCP) server for [Ruby UI](https://rubyui.com). Lets AI coding agents discover, inspect, and install Ruby UI components.
4+
5+
Hosted endpoint: **https://rubyui.com/mcp**
6+
7+
## Tools
8+
9+
| Tool | Purpose |
10+
|------|---------|
11+
| `get_project_registries` | List available registries (always returns `ruby_ui`). |
12+
| `list_items_in_registries` | All components with descriptions. |
13+
| `search_items_in_registries` | Fuzzy search by name, description, or docs. |
14+
| `view_items_in_registries` | Full source + dependencies for given components. |
15+
| `get_item_examples_from_registries` | Code examples per component. |
16+
| `get_add_command_for_items` | Validated `rails g ruby_ui:component …` command. |
17+
| `get_audit_checklist` | Post-install verification checklist. |
18+
19+
## Architecture
20+
21+
- Rails engine gem, sibling of `gem/` and `docs/` in the monorepo.
22+
- Static `data/registry.json` built from `../gem/` by `exe/ruby-ui-mcp-build`, committed to the repo.
23+
- Mounted inside the `docs/` Rails app at `/mcp` via `RubyUI::MCP::Engine`.
24+
- HTTP transport via `mcp` ruby-sdk (`StreamableHTTPTransport`).
25+
- Read-only; component installs happen client-side via the Ruby UI generator.
26+
27+
## Development
28+
29+
```bash
30+
cd mcp
31+
bundle install
32+
bundle exec rake test
33+
```
34+
35+
Rebuild the registry from the sibling gem:
36+
37+
```bash
38+
bundle exec exe/ruby-ui-mcp-build
39+
```
40+
41+
CI verifies the committed `data/registry.json` matches a fresh build (`mcp-registry-check` job).
42+
43+
## Client setup
44+
45+
See https://rubyui.com/docs/mcp for per-client install snippets (Claude Code, Cursor, Claude Desktop, Windsurf, VS Code, Zed).

0 commit comments

Comments
 (0)