@opvs-ai/mcp 0.7.4 → 2.6.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/README.md CHANGED
@@ -1,65 +1,185 @@
1
1
  # @opvs-ai/mcp
2
2
 
3
- All-in-one MCP server for the **6 public OPVS skills**: AgentBoard, AgentDocs, AgentMemory, OPVS Protocol, Auth, Integrations. ~199 tools total (combined hand-written + generated).
4
-
5
- For MCP clients with **per-server tool caps** (Antigravity = 100, some Cursor configs), use the scoped [per-skill packages](https://github.com/martinshein/opvsHUB/tree/main/packages/mcp-skills) instead.
3
+ OPVS MCP server for the **on-demand model** — 10 always-on tools that give any MCP host (Claude Desktop, Cursor, Antigravity, Windsurf, Claude Code) the same surface OPVS-hosted agents see. Everything else is reached through `tool_call` indirection so the package fits under the ~100-tool cap every current MCP client enforces.
4
+
5
+ | Tool | Wraps | Purpose |
6
+ |------|-------|---------|
7
+ | `tool_search` | registry `/search` | Semantic search by intent (`absent`/`cold`/`warm`/`hot` telemetry signal) |
8
+ | `tool_help` | registry `/packages/{vendor}/{name}` | Methods + manifest on demand |
9
+ | `tool_read` | registry `/packages/{vendor}/{name}/skill-guide` | Read any published skill's actual SKILL.md + `references/` layers on-demand, **nothing installed** (`path` pulls one layer file) |
10
+ | `tool_call` | `/marketplace/runtime/{install_id}/{skill}/{method}` | Universal proxy — `manifest.skills[].id` routing |
11
+ | `tool_pin` | gateway `skill_pin` *(see "tool_pin status")* | Pin/unpin a skill into an OPVS agent's TOOLS.md |
12
+ | `tool_list_installed` | `/marketplace/installed` | What this brand has |
13
+ | `tool_install` | `/marketplace/packages/{id}/install` | Add a package with explicit consent |
14
+ | `tool_uninstall` | `DELETE /marketplace/installed/{id}` | Remove a package |
15
+ | `whoami` | `/auth/me` | Session probe — brand, agent, workspace |
16
+ | `board_as_markdown` | `/board/boards/{id}/export?format=md` | A whole AgentBoard as a Markdown plan in one call (`detail` summary/standard/full, `columns` filter) |
17
+
18
+ All tool names match `^[a-zA-Z0-9_-]+$` (the OpenAI tool-name regex; dots break Lola/Roni/planner on first call).
6
19
 
7
20
  ## Install
8
21
 
22
+ This package is published to **both** public npm and OPVS's Verdaccio registry (npm.opvs.ai). A plain `npm install -g @opvs-ai/mcp` works from npmjs.com. Inside a repo whose `.npmrc` pins the `@opvs-ai` scope to Verdaccio, that pin wins over any `--registry` flag — including on reads, so verify with the scope override:
23
+
9
24
  ```bash
25
+ echo "@opvs-ai:registry=https://npm.opvs.ai/" >> ~/.npmrc
10
26
  npm install -g @opvs-ai/mcp
11
27
  ```
12
28
 
13
29
  Provides the `opvs-mcp` binary.
14
30
 
31
+ ```bash
32
+ npm view @opvs-ai/mcp version --@opvs-ai:registry=https://registry.npmjs.org
33
+ ```
34
+
35
+ > **Corrected 2026-08-18.** This section used to say the npmjs publish was
36
+ > deferred and that the package was Verdaccio-only. That stopped being true when
37
+ > the 2.x line reached npmjs; the note outlived the condition it described. Read
38
+ > the registry, not this file.
39
+
15
40
  ## Auth
16
41
 
17
- Reads `~/.opvs/config.json`, shared with `@opvs-ai/cli`. If you've run `opvs auth request` already, this MCP works immediately.
42
+ Reads `~/.opvs/config.json` (shared with `@opvs-ai/cli`). If you've already run `opvs auth request`, this MCP works immediately. The brand is pinned server-side from the PAT — `tool_call` will refuse if the PAT isn't brand-scoped.
43
+
44
+ ```bash
45
+ npm install -g @opvs-ai/cli @opvs-ai/mcp
46
+ opvs auth request -w <workspace-slug> -e <admin-email>
47
+ # (approve the email link)
48
+ opvs whoami # confirm brand pinned
49
+ ```
18
50
 
19
51
  ## MCP client config
20
52
 
21
- ### Claude Code
53
+ ### Claude Desktop
54
+
55
+ `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
22
56
 
23
57
  ```json
24
58
  {
25
59
  "mcpServers": {
26
60
  "opvs": {
27
- "command": "opvs-mcp"
61
+ "command": "opvs-mcp",
62
+ "env": { "NODE_NO_WARNINGS": "1" }
28
63
  }
29
64
  }
30
65
  }
31
66
  ```
32
67
 
33
- ### Claude Desktop / Cursor / Windsurf
68
+ Restart Claude Desktop. `tool_search`, `tool_help`, `tool_call`, etc. appear in the tools menu.
69
+
70
+ ### Cursor
34
71
 
35
- Same shape. Restart the client after adding.
72
+ `~/.cursor/mcp.json` or via Settings → Cursor Settings → Features → MCP:
73
+
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "opvs": {
78
+ "command": "opvs-mcp",
79
+ "env": { "NODE_NO_WARNINGS": "1" }
80
+ }
81
+ }
82
+ }
83
+ ```
36
84
 
37
85
  ### Antigravity
38
86
 
39
- Don't use this package — it exceeds the 100-tool cap. Use scoped per-skill MCPs instead:
87
+ Settings → MCP → Add server. `NODE_NO_WARNINGS=1` is required — Antigravity rejects any stderr text before the JSON-RPC handshake (see [antigravity-debrief memory](../../docs/planning/) for the 2026-04-26 incident).
88
+
89
+ ```json
90
+ {
91
+ "mcpServers": {
92
+ "opvs": {
93
+ "command": "opvs-mcp",
94
+ "env": { "NODE_NO_WARNINGS": "1" }
95
+ }
96
+ }
97
+ }
98
+ ```
99
+
100
+ ### Windsurf
101
+
102
+ `~/.codeium/windsurf/mcp_config.json`:
40
103
 
41
104
  ```json
42
105
  {
43
106
  "mcpServers": {
44
- "opvs-agentboard": { "command": "opvs-mcp-agentboard" },
45
- "opvs-agentdocs": { "command": "opvs-mcp-agentdocs" }
107
+ "opvs": {
108
+ "command": "opvs-mcp",
109
+ "env": { "NODE_NO_WARNINGS": "1" }
110
+ }
46
111
  }
47
112
  }
48
113
  ```
49
114
 
50
- ## When to use this vs scoped
115
+ ### Claude Code
116
+
117
+ ```bash
118
+ claude mcp add opvs -- opvs-mcp
119
+ ```
120
+
121
+ ## Worked example
122
+
123
+ ```text
124
+ You: Find restaurants near Aarhus and save the top 5 to a board.
125
+
126
+ Agent → tool_search({ intent: "find restaurants in Aarhus" })
127
+ ← { items: [{ vendor: "@spideriq", name: "lead-gen-skills", ... }],
128
+ telemetry_signal: "warm",
129
+ _guidance: "#audit.ok ranked=1 best=@spideriq/lead-gen-skills #next:tool_call" }
130
+
131
+ Agent → tool_help({ name: "@spideriq/lead-gen-skills", section: "methods" })
132
+ ← { methods: { search_maps: { ... }, submit_job: { ... } } }
133
+
134
+ Agent → tool_call({
135
+ skill: "@spideriq/lead-gen-skills",
136
+ method: "submit_job",
137
+ params: { type: "spiderMaps", payload: { query: "restaurants", location: "Aarhus" } }
138
+ })
139
+ ← { job_id: "...", _guidance: "#audit.ok #next:poll getJobStatus every 5s" }
140
+ ```
141
+
142
+ The agent never had to know all of SpiderIQ's 40+ methods upfront — discovery → describe → invoke flowed through 3 always-on tools (discover → describe → invoke).
143
+
144
+ ## Response contract
145
+
146
+ Every tool returns a single text-content block whose payload is JSON with:
147
+
148
+ - **Flat sibling `_guidance: string`** — never a wrapper, never an array.
149
+ - **Optional flat sibling `_findings: [...]`** — only when the server emits one (e.g. `audit_level=all`).
150
+ - **`telemetry_signal`** in search results — closed enum: `absent | cold | warm | hot`.
151
+
152
+ The contract was locked with SpiderIQ on 2026-05-15 PM. See [`docs/planning/Marketplace/architecture/skills-system-reference.md`](../../docs/planning/Marketplace/architecture/skills-system-reference.md#skills-meta) for the gateway-side semantics this MCP mirrors.
153
+
154
+ ## tool_pin status
155
+
156
+ `tool_pin` is a **stub** in 1.0.0. The W2.1 TOOLS.md persistence layer is live in the gateway's `skills-meta` plugin (`PUT /api/v1/agents/{id}/tools-md` via Management API + X-API-Key), but that surface isn't reachable from a PAT-authenticated MCP client. Calling `tool_pin` returns:
157
+
158
+ ```json
159
+ {
160
+ "action": "pin",
161
+ "skill": "@opvs-ai/agentboard",
162
+ "agent_id": "lola_001",
163
+ "changed": false,
164
+ "_guidance": "#audit.warn:not-supported-via-mcp — ..."
165
+ }
166
+ ```
167
+
168
+ Until W2.MCP.PIN ships the PAT-gated passthrough, manage pins via the OPVS dashboard agent profile editor at `/admin/agents/personas`.
169
+
170
+ ## What was deprecated
171
+
172
+ This package was previously a 209-tool monolithic MCP exposing every public skill's full surface. That model didn't survive contact with MCP clients — every real client (Antigravity, Cursor, Claude Desktop, Windsurf) enforces a ~100-tool cap and the monolithic build was unusable in practice.
173
+
174
+ The on-demand model (10 always-on + `tool_call` indirection) reaches the same skills without paying the tool-budget cost.
51
175
 
52
- | Setup | Pick |
53
- |-------|------|
54
- | Claude Code / unlimited-tool client | `@opvs-ai/mcp` (this package) — one install, every public skill |
55
- | Antigravity / 100-tool cap | Scoped `@opvs-ai/mcp-<skill>` packages |
56
- | Embedded in a custom agent framework | `@opvs-ai/skills-sdk` directly |
176
+ Versions ≤ 0.7.4 are end-of-life. There is no `@opvs-ai/mcp@0.x → 1.0` migration code path — replace the old install with a fresh one.
57
177
 
58
178
  ## Related packages
59
179
 
60
- - [@opvs-ai/cli](https://github.com/martinshein/opvsHUB/tree/main/packages/cli) — terminal access (no MCP layer)
61
- - [@opvs-ai/skills-sdk](https://github.com/martinshein/opvsHUB/tree/main/packages/skills-sdk) — embeddable tool definitions for any Node-based agent
62
- - [@opvs-ai/mcp-agentboard](https://github.com/martinshein/opvsHUB/tree/main/packages/mcp-skills/agentboard), [mcp-agentdocs, mcp-agentmemory, mcp-opvs-protocol, mcp-auth, mcp-integrations](https://github.com/martinshein/opvsHUB/tree/main/packages/mcp-skills) — scoped per-skill MCPs
180
+ - [`@opvs-ai/cli`](../cli) — terminal access (no MCP layer)
181
+ - [`@opvs-ai/skills`](../opvs-skills) — vendor CLI (publish/install/doctor)
182
+ - Gateway plugin `skills-meta` ([source](../../apps/spideragent/packages/shared/src/plugins/skills-meta/index.ts)) — the in-platform counterpart of this package
63
183
 
64
184
  ## License
65
185
 
package/dist/index.d.ts CHANGED
@@ -1,17 +1,27 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * @opvs-ai/mcp — MCP Server for AgentBoard + AgentDocs
3
+ * @opvs-ai/mcp — MCP server for the OPVS on-demand model
4
4
  *
5
- * Gives Claude Code, Cursor, and Claude Desktop native tool access
6
- * to OPVS AgentBoard task management and AgentDocs documentation.
5
+ * Exposes 11 tools — the 8 that mirror the gateway's `skills-meta` plugin (so
6
+ * external MCP hosts like Claude Desktop, Cursor, Antigravity and Windsurf get
7
+ * the same surface OPVS-hosted agents see), plus `board_as_markdown` (Topic 1 /
8
+ * S1.4 — a whole AgentBoard as a Markdown plan in one call; it has no
9
+ * `tool_call` route because the agentboard skill ships no schema.yaml), plus
10
+ * `tool_read` (DLRT 3.2 — read any published skill's actual SKILL.md + its
11
+ * `references/` layers on-demand from the catalog bundle, with nothing
12
+ * installed), plus `sandbox_chat` (vendor test mode — drive your marketplace
13
+ * sandbox test agent through the real gateway, per Vendor-Upstream-and-Testing
14
+ * decision 4: a MODE of this package, not a new one). Every other capability is
15
+ * reached through `tool_call` indirection so the package fits under the
16
+ * ~100-tool cap that all current MCP clients enforce.
7
17
  *
8
- * Transport: stdio (JSON-RPC over stdin/stdout)
9
- * Auth: reads token from ~/.opvs/config.json (shared with @opvs-ai/cli)
18
+ * Tool names match OpenAI's `^[a-zA-Z0-9_-]+$` (see
19
+ * `feedback-openai-tool-name-regex` memory). Dots, `@`, and `/` are rejected.
10
20
  *
11
- * Multi-workspace: every tool accepts an optional `workspace` parameter.
12
- * If omitted, uses OPVS_WORKSPACE env var or the current workspace from config.
21
+ * Transport: stdio (JSON-RPC). Never write to stdout outside the SDK.
22
+ * Debug logs go to stderr via console.error().
13
23
  *
14
- * IMPORTANT: Never use console.log() — it corrupts the stdio transport.
15
- * Use console.error() for debug logging.
24
+ * Auth: PAT from `~/.opvs/config.json` (shared with `@opvs-ai/cli`). Brand is
25
+ * pinned server-side from the PAT — never trust LLM-supplied brand_id.
16
26
  */
17
27
  export {};