@metabob/mcp 0.2.2
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/LICENSE
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
PROPRIETARY LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Metabob Inc.
|
|
4
|
+
|
|
5
|
+
All rights reserved.
|
|
6
|
+
|
|
7
|
+
This software and associated documentation files (the "Software") are the proprietary
|
|
8
|
+
property of Metabob Inc. Unauthorized copying, distribution, modification, or use of
|
|
9
|
+
this Software, via any medium, is strictly prohibited without the express written
|
|
10
|
+
permission of Metabob Inc.
|
|
11
|
+
|
|
12
|
+
The Software is provided to authorized users under separate written agreement.
|
|
13
|
+
Unauthorized use or distribution of this Software may result in severe civil and
|
|
14
|
+
criminal penalties and will be prosecuted to the maximum extent possible under law.
|
|
15
|
+
|
|
16
|
+
For licensing inquiries, contact: legal@metabob.com
|
package/README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# @metabob/mcp
|
|
2
|
+
|
|
3
|
+
MCP server exposing Metabob code analysis to AI agents (Claude Code, Cursor, Continue, and other MCP clients).
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @metabob/mcp@latest --api-key=mb_your_api_key_here
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Get an API key from [app.metabob.com/settings/api-keys](https://app.metabob.com/settings/api-keys).
|
|
12
|
+
|
|
13
|
+
## Tools
|
|
14
|
+
|
|
15
|
+
| Tool | Tier | Description |
|
|
16
|
+
|------|------|-------------|
|
|
17
|
+
| `init_workspace` | Local + API | Build local CPG index; incrementally sync relevant files to the analysis server |
|
|
18
|
+
| `get_problems` | API | Fetch detected code problems, ranked by severity |
|
|
19
|
+
| `search_codebase` | Local + API | Search components (CPG) and problems by keyword |
|
|
20
|
+
| `predict_cochanges` | **Local** | GCN-based co-change prediction — no API call |
|
|
21
|
+
| `analyze_impact` | **Local** | CPG traversal showing what a change affects |
|
|
22
|
+
| `annotate_component` | API | AI explanation or fix recommendation for a problem |
|
|
23
|
+
| `mark_complete` | API | Endorse a fix or discard a false positive |
|
|
24
|
+
| `get_metrics` | API | Session and project analysis health overview |
|
|
25
|
+
| `assign_git_changes` | Local + API | Map changed files to CPG components + co-change predictions |
|
|
26
|
+
| `get_analysis_context` | Local + API | Current analysis state snapshot for agent decision-making |
|
|
27
|
+
|
|
28
|
+
**Local-tier** tools run entirely in-process via `@metabob/cpg-inference` (Tree-sitter parse → GCN embeddings → vector search). They require `init_workspace` to have run first but make no network calls.
|
|
29
|
+
|
|
30
|
+
**API-tier** tools require `METABOB_API_KEY` and a session against `ide.metabob.com`.
|
|
31
|
+
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
| Variable | Default | Description |
|
|
35
|
+
|----------|---------|-------------|
|
|
36
|
+
| `METABOB_API_KEY` | — | API key — exchanged for a session token on startup |
|
|
37
|
+
| `SESSION_TOKEN` | — | Pre-obtained session token (skips key exchange) |
|
|
38
|
+
| `ANALYSIS_API_URL` | `https://ide.metabob.com` | Analysis API base URL |
|
|
39
|
+
| `WORKSPACE_PATH` | `$PWD` | Default workspace root for `init_workspace` |
|
|
40
|
+
| `SESSION_ID` | `default-session` | Session identifier |
|
|
41
|
+
| `HEALTH_PORT` | `8080` | Vessel HTTP server port |
|
|
42
|
+
| `LOG_LEVEL` | `info` | `debug \| info \| warn \| error` |
|
|
43
|
+
| `MAX_REQUESTS_PER_MINUTE` | `60` | MCP rate limit per session |
|
|
44
|
+
|
|
45
|
+
All variables can also be passed as CLI flags — run `metabob-mcp --help` for the full flag reference.
|
|
46
|
+
|
|
47
|
+
## Integrations
|
|
48
|
+
|
|
49
|
+
### Claude Code
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
claude mcp add metabob -e METABOB_API_KEY=mb_... -- npx @metabob/mcp@latest
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Claude Desktop
|
|
56
|
+
|
|
57
|
+
`~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"mcpServers": {
|
|
62
|
+
"metabob": {
|
|
63
|
+
"command": "npx",
|
|
64
|
+
"args": ["@metabob/mcp@latest"],
|
|
65
|
+
"env": {
|
|
66
|
+
"METABOB_API_KEY": "mb_your_api_key_here"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Cursor
|
|
74
|
+
|
|
75
|
+
`.cursor/mcp.json`:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"mcpServers": {
|
|
80
|
+
"metabob": {
|
|
81
|
+
"command": "npx",
|
|
82
|
+
"args": ["@metabob/mcp@latest", "--api-key=mb_your_api_key_here"]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### VS Code (Continue)
|
|
89
|
+
|
|
90
|
+
`.continue/config.json`:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"mcpServers": [
|
|
95
|
+
{
|
|
96
|
+
"name": "metabob",
|
|
97
|
+
"command": "npx",
|
|
98
|
+
"args": ["@metabob/mcp@latest"],
|
|
99
|
+
"env": {
|
|
100
|
+
"METABOB_API_KEY": "mb_your_api_key_here"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Development
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
bun install
|
|
111
|
+
bun run dev # start with watch mode
|
|
112
|
+
bun run typecheck # tsc --noEmit
|
|
113
|
+
bun test # run all tests
|
|
114
|
+
bash scripts/git-hooks/install.sh # install pre-commit hook
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
To test the MCP server locally via the installed bin (mirrors the npm install flow):
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
bun run build # compile src/ → dist/cli.js
|
|
121
|
+
npm link # register metabob-mcp bin globally
|
|
122
|
+
|
|
123
|
+
# add to Claude Code pointing at the local build
|
|
124
|
+
claude mcp add metabob -e METABOB_API_KEY=mb_... -- metabob-mcp
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
`npm link` makes the local build available as `metabob-mcp` on your PATH without publishing to npm. Re-run `bun run build` after source changes.
|
|
128
|
+
|
|
129
|
+
See [CLAUDE.md](CLAUDE.md) for development guidance and [docs/](docs/) for detailed references.
|