hookli-mcp 0.0.0-stage → 0.1.0
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/README.md +94 -2
- package/dist/chunk-LJKHLUTD.mjs +4653 -0
- package/dist/chunk-LJKHLUTD.mjs.map +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +4662 -0
- package/dist/cli.js.map +1 -0
- package/dist/cli.mjs +18 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index.d.mts +52 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +4690 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +25 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +38 -4
package/README.md
CHANGED
|
@@ -1,3 +1,95 @@
|
|
|
1
|
-
#
|
|
1
|
+
# hookli-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> The official **Model Context Protocol (MCP)** server for [hookli](https://hookli.vercel.app) — giving AI assistants direct access to all 66 typed, SSR-safe, zero-dependency React hooks.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What It Enables
|
|
8
|
+
|
|
9
|
+
With `hookli-mcp` connected, AI assistants (Cursor, Claude Desktop, Antigravity, Copilot, etc.) can:
|
|
10
|
+
- **Discover hooks:** Query the complete catalog by category (`state`, `effects`, `dom`, `data`).
|
|
11
|
+
- **Inspect exact APIs:** Fetch typed signatures, parameter tables, return shapes, and TypeScript type aliases.
|
|
12
|
+
- **Search by intent:** Natural language search (e.g. *"how to debounce an input"*, *"click outside listener"*).
|
|
13
|
+
- **Read source code:** View the exact implementation to see SSR guards and zero-dependency patterns.
|
|
14
|
+
- **Architect compositions:** Ask the MCP server how to compose multiple hooks for a given UI feature.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
### Run Directly via Node
|
|
21
|
+
```bash
|
|
22
|
+
node packages/hookli-mcp/dist/cli.js
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Run via npx (Once Published)
|
|
26
|
+
```bash
|
|
27
|
+
npx hookli-mcp
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Configuration for AI Clients
|
|
33
|
+
|
|
34
|
+
### 1. Cursor (`.cursor/mcp.json`)
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"mcpServers": {
|
|
38
|
+
"hookli": {
|
|
39
|
+
"command": "node",
|
|
40
|
+
"args": ["/absolute/path/to/hookli/packages/hookli-mcp/dist/cli.js"]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 2. Claude Desktop (`claude_desktop_config.json`)
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"hookli": {
|
|
51
|
+
"command": "node",
|
|
52
|
+
"args": ["/absolute/path/to/hookli/packages/hookli-mcp/dist/cli.js"]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 3. Antigravity MCP Config (`mcp.json`)
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"mcpServers": {
|
|
62
|
+
"hookli": {
|
|
63
|
+
"command": "node",
|
|
64
|
+
"args": ["${workspaceRoot}/packages/hookli-mcp/dist/cli.js"]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Available Tools
|
|
73
|
+
|
|
74
|
+
| Tool | Description | Inputs |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| `list_hooks` | List all 66 hooks with signatures and descriptions | `category?` (`state`, `effects`, `dom`, `data`), `query?` |
|
|
77
|
+
| `get_hook` | Get complete documentation, parameters, returns, and usage | `name` (e.g. `useDebounce`, `useLocalStorage`) |
|
|
78
|
+
| `search_hooks` | Natural language and use-case search with relevance ranking | `query` (e.g. *"detect outside clicks"*), `category?`, `limit?` |
|
|
79
|
+
| `get_hook_source` | Inspect the pure TypeScript implementation | `name` |
|
|
80
|
+
| `suggest_hooks_for_task` | Recommends how to compose hooks for a feature | `taskDescription` |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Available Resources
|
|
85
|
+
|
|
86
|
+
- `hookli://catalog`: Complete catalog of 66 hooks with all metadata as JSON.
|
|
87
|
+
- `hookli://manifest`: Lightweight library summary.
|
|
88
|
+
- `hookli://hooks/{slug}`: Dynamic Markdown documentation for any hook.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Available Prompts
|
|
93
|
+
|
|
94
|
+
- `implement-hook`: Scaffold a typed, SSR-safe component using a specific hookli hook.
|
|
95
|
+
- `migrate-to-hookli`: Migrate an existing component from `react-use` or `usehooks-ts` to `hookli`.
|