Collect UI MCP
by azreal2049
README.md
<<<<<<< HEAD
# COLLECT-UI-MCP-SERVER
=======
<div align="center">
# π¨ Collect UI MCP
### *Your AI assistant's personal UI component library*
**Collect Β· Search Β· Recall β every snippet, right inside your editor.**
<br/>
[](https://www.npmjs.com/package/collect-ui-mcp)
[](https://modelcontextprotocol.io)
[](LICENSE)
[](https://nodejs.org)
[](CONTRIBUTING.md)
<br/>
[**Quick Start**](#-quick-start) Β· [**Features**](#-features) Β· [**Tools**](#-available-tools) Β· [**Examples**](#-example-usage) Β· [**Contributing**](#-contributing)
</div>
---
<div align="center">
### π§ *Stop scrolling bookmarks. Start asking.*
> **You:** *"Save this button as `neon-button`, tag it `tailwind` and `dark`."*
>
> **Assistant:** *β
Collected β 24 lines saved to your library.*
</div>
---
## β¨ Why Collect UI MCP?
<table>
<tr>
<td width="50%" valign="top">
### π© The old way
- π 47 bookmarks named *"cool button"*
- π A folder called `snippets-final-v2-USE-THIS`
- π§ You *know* you saved that card somewhereβ¦
- π Copy-pasting from chat β files β chat β files
</td>
<td width="50%" valign="top">
### β¨ The new way
- π£οΈ Ask your AI to **save**, **find**, or **fetch** components
- π·οΈ Tag by framework, mood, or use-case
- π Full-text search across your whole library
- πΎ Everything stays **local** and **git-friendly**
</td>
</tr>
</table>
---
## π― Features
<div align="center">
| | Feature | Description |
|:-:|:--------|:------------|
| ποΈ | **Collect** | Save any UI snippet with a name, tags & description |
| π | **Search** | Find components by keyword, tag, or framework |
| π·οΈ | **Organize** | Tag by stack β React, Vue, Tailwind, CSSβ¦ |
| π§Ύ | **Retrieve** | Pull full source code straight into chat |
| βοΈ | **Update** | Modify existing entries without leaving your editor |
| ποΈ | **Delete** | Clean up entries in seconds |
| πΎ | **Local-first** | Nothing leaves your machine. Ever. |
| π§© | **Framework-agnostic** | Works with any UI stack you throw at it |
| β‘ | **Zero-config** | Point at a folder. Done. |
</div>
---
## π Quick Start
<div align="center">
### **3 steps to a smarter UI library**
`Install` β `Configure` β `Ask`
</div>
<br/>
### 1οΈβ£ Install
```bash
# Global install
npm install -g collect-ui-mcp
# Or use on the fly
npx collect-ui-mcp
```
### 2οΈβ£ Configure your MCP client
<details open>
<summary><b>π£ Claude Desktop</b></summary>
<br/>
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"collect-ui": {
"command": "npx",
"args": ["-y", "collect-ui-mcp"],
"env": {
"COLLECT_UI_DIR": "/absolute/path/to/your/ui-library"
}
}
}
}
```
</details>
<details>
<summary><b>π±οΈ Cursor</b></summary>
<br/>
Add to `~/.cursor/mcp.json`:
```json
{
"mcpServers": {
"collect-ui": {
"command": "npx",
"args": ["-y", "collect-ui-mcp"],
"env": { "COLLECT_UI_DIR": "/absolute/path/to/your/ui-library" }
}
}
}
```
</details>
<details>
<summary><b>π» VS Code (Continue / Cline)</b></summary>
<br/>
```json
{
"mcpServers": {
"collect-ui": {
"command": "npx",
"args": ["-y", "collect-ui-mcp"],
"env": { "COLLECT_UI_DIR": "${workspaceFolder}/.ui-library" }
}
}
}
```
</details>
### 3οΈβ£ Restart your client
> π **Done.** Your AI assistant now has the `collect-ui` toolset.
---
## π οΈ Available Tools
<div align="center">
| | Tool | Description |
|:------:|:-----|:------------|
| π₯ | `collect_component` | Save a UI snippet with name, code, tags & description |
| π | `list_components` | List all components β filterable by tag |
| π | `search_components` | Full-text search across names, tags, descriptions |
| π€ | `get_component` | Fetch the full source + metadata of a component |
| βοΈ | `update_component` | Modify an existing entry |
| ποΈ | `delete_component` | Remove a component from your library |
| π·οΈ | `list_tags` | See every tag currently in use |
</div>
### π Resources
| URI | Description |
|:----|:------------|
| `collect-ui://library` | Your entire catalog as JSON |
| `collect-ui://component/{name}` | A single component by name |
### π¬ Prompts
- **`find-ui-component`** β Ask the AI for the best match to a design need
- **`summarize-library`** β Get a quick overview of what you've collected
---
## π‘ Example Usage
<details open>
<summary><b>πΎ Saving a component</b></summary>
```
You β Save this Hero section as "gradient-hero",
tagged react, tailwind, marketing.
AI β β
Collected "gradient-hero" (React Β· Tailwind)
Saved 42 lines to your library.
```
</details>
<details>
<summary><b>π Searching your library</b></summary>
```
You β What button variants do I have collected?
AI β You have 3:
β’ neon-button β Tailwind Β· dark mode glow
β’ ghost-button β CSS Β· minimal outline
β’ pill-button β React Β· styled-components
```
</details>
<details>
<summary><b>π€ Retrieving a component</b></summary>
```
You β Show me the source of "neon-button".
AI β [renders full code from your library]
```
</details>
---
## ποΈ How Data is Stored
Everything lives in a **single folder you control**:
```text
my-ui-library/
βββ neon-button/
β βββ component.tsx
β βββ meta.json β name, tags, description, timestamps
βββ gradient-hero/
β βββ component.tsx
β βββ meta.json
βββ .collect-ui-index.json
```
<div align="center">
| β
Human-readable | β
Git-friendly | β
No database | β
Yours forever |
|:---:|:---:|:---:|:---:|
</div>
---
## βοΈ Configuration
| Env var | Default | Description |
|:--------|:--------|:------------|
| `COLLECT_UI_DIR` | `./.ui-library` | Where components are stored |
| `COLLECT_UI_INDEX` | `.collect-ui-index.json` | Index filename |
| `COLLECT_UI_LOG` | `info` | Log level β `debug` Β· `info` Β· `warn` Β· `error` |
---
## π§ͺ Development
```bash
# Clone
git clone https://github.com/<your-username>/collect-ui-mcp.git
cd collect-ui-mcp
# Install & build
npm install
npm run build
# Watch mode
npm run dev
# Test
npm test
```
### π¬ Debug with the MCP Inspector
```bash
npx @modelcontextprotocol/inspector node dist/index.js
```
---
## πΊοΈ Roadmap
- [ ] βοΈ Cloud sync β S3 / WebDAV
- [ ] πΌοΈ Image & screenshot attachments
- [ ] π§ Framework-aware imports
- [ ] π¨ Figma plugin bridge
- [ ] π Web dashboard
> π‘ Have an idea? [Open an issue](https://github.com/<your-username>/collect-ui-mcp/issues) β PRs are welcome!
---
## π€ Contributing
<div align="center">
**Every contribution counts β bugs, docs, ideas, code.**
</div>
```bash
# 1. Fork the repo, then:
git checkout -b feat/my-feature
git commit -m "feat: add my feature"
git push origin feat/my-feature
# 2. Open a Pull Request π
```
Please read [`CONTRIBUTING.md`](CONTRIBUTING.md) and [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) before getting started.
---
## π Acknowledgements
- 𧬠**[Model Context Protocol](https://modelcontextprotocol.io)** β the spec that makes this possible
- π’ **[Anthropic](https://anthropic.com)** β for building and open-sourcing MCP
- π«‘ Everyone who has a folder called `snippets-final-v3-USE-THIS-ONE`
---
## π License
<div align="center">
**[MIT](LICENSE)** Β© `<Your Name>`
<br/>
β **If this saved you a bookmark, star the repo!**
<sub>Made with β€οΈ and a mild obsession with clean components.</sub>
</div>
>>>>>>> 6995874 (Initial commit)
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues