@opvs-ai/mcp 0.7.4 → 2.6.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 CHANGED
@@ -1,65 +1,178 @@
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 OPVS's Verdaccio registry only (npm.opvs.ai). Configure your client to pull `@opvs-ai` packages from there:
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
+ > Public npmjs.com publish is deferred until npmjs credentials recover (Martin lost them 2026-05-14). The package functions identically — only the install path differs.
32
+
15
33
  ## Auth
16
34
 
17
- Reads `~/.opvs/config.json`, shared with `@opvs-ai/cli`. If you've run `opvs auth request` already, this MCP works immediately.
35
+ 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.
36
+
37
+ ```bash
38
+ npm install -g @opvs-ai/cli @opvs-ai/mcp
39
+ opvs auth request -w <workspace-slug> -e <admin-email>
40
+ # (approve the email link)
41
+ opvs whoami # confirm brand pinned
42
+ ```
18
43
 
19
44
  ## MCP client config
20
45
 
21
- ### Claude Code
46
+ ### Claude Desktop
47
+
48
+ `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
22
49
 
23
50
  ```json
24
51
  {
25
52
  "mcpServers": {
26
53
  "opvs": {
27
- "command": "opvs-mcp"
54
+ "command": "opvs-mcp",
55
+ "env": { "NODE_NO_WARNINGS": "1" }
28
56
  }
29
57
  }
30
58
  }
31
59
  ```
32
60
 
33
- ### Claude Desktop / Cursor / Windsurf
61
+ Restart Claude Desktop. `tool_search`, `tool_help`, `tool_call`, etc. appear in the tools menu.
34
62
 
35
- Same shape. Restart the client after adding.
63
+ ### Cursor
64
+
65
+ `~/.cursor/mcp.json` or via Settings → Cursor Settings → Features → MCP:
66
+
67
+ ```json
68
+ {
69
+ "mcpServers": {
70
+ "opvs": {
71
+ "command": "opvs-mcp",
72
+ "env": { "NODE_NO_WARNINGS": "1" }
73
+ }
74
+ }
75
+ }
76
+ ```
36
77
 
37
78
  ### Antigravity
38
79
 
39
- Don't use this package — it exceeds the 100-tool cap. Use scoped per-skill MCPs instead:
80
+ 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).
40
81
 
41
82
  ```json
42
83
  {
43
84
  "mcpServers": {
44
- "opvs-agentboard": { "command": "opvs-mcp-agentboard" },
45
- "opvs-agentdocs": { "command": "opvs-mcp-agentdocs" }
85
+ "opvs": {
86
+ "command": "opvs-mcp",
87
+ "env": { "NODE_NO_WARNINGS": "1" }
88
+ }
46
89
  }
47
90
  }
48
91
  ```
49
92
 
50
- ## When to use this vs scoped
93
+ ### Windsurf
94
+
95
+ `~/.codeium/windsurf/mcp_config.json`:
96
+
97
+ ```json
98
+ {
99
+ "mcpServers": {
100
+ "opvs": {
101
+ "command": "opvs-mcp",
102
+ "env": { "NODE_NO_WARNINGS": "1" }
103
+ }
104
+ }
105
+ }
106
+ ```
107
+
108
+ ### Claude Code
109
+
110
+ ```bash
111
+ claude mcp add opvs -- opvs-mcp
112
+ ```
113
+
114
+ ## Worked example
115
+
116
+ ```text
117
+ You: Find restaurants near Aarhus and save the top 5 to a board.
118
+
119
+ Agent → tool_search({ intent: "find restaurants in Aarhus" })
120
+ ← { items: [{ vendor: "@spideriq", name: "lead-gen-skills", ... }],
121
+ telemetry_signal: "warm",
122
+ _guidance: "#audit.ok ranked=1 best=@spideriq/lead-gen-skills #next:tool_call" }
123
+
124
+ Agent → tool_help({ name: "@spideriq/lead-gen-skills", section: "methods" })
125
+ ← { methods: { search_maps: { ... }, submit_job: { ... } } }
126
+
127
+ Agent → tool_call({
128
+ skill: "@spideriq/lead-gen-skills",
129
+ method: "submit_job",
130
+ params: { type: "spiderMaps", payload: { query: "restaurants", location: "Aarhus" } }
131
+ })
132
+ ← { job_id: "...", _guidance: "#audit.ok #next:poll getJobStatus every 5s" }
133
+ ```
134
+
135
+ 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).
136
+
137
+ ## Response contract
138
+
139
+ Every tool returns a single text-content block whose payload is JSON with:
140
+
141
+ - **Flat sibling `_guidance: string`** — never a wrapper, never an array.
142
+ - **Optional flat sibling `_findings: [...]`** — only when the server emits one (e.g. `audit_level=all`).
143
+ - **`telemetry_signal`** in search results — closed enum: `absent | cold | warm | hot`.
144
+
145
+ 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.
146
+
147
+ ## tool_pin status
148
+
149
+ `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:
150
+
151
+ ```json
152
+ {
153
+ "action": "pin",
154
+ "skill": "@opvs-ai/agentboard",
155
+ "agent_id": "lola_001",
156
+ "changed": false,
157
+ "_guidance": "#audit.warn:not-supported-via-mcp — ..."
158
+ }
159
+ ```
160
+
161
+ Until W2.MCP.PIN ships the PAT-gated passthrough, manage pins via the OPVS dashboard agent profile editor at `/admin/agents/personas`.
162
+
163
+ ## What was deprecated
164
+
165
+ 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.
166
+
167
+ The on-demand model (10 always-on + `tool_call` indirection) reaches the same skills without paying the tool-budget cost.
51
168
 
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 |
169
+ 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
170
 
58
171
  ## Related packages
59
172
 
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
173
+ - [`@opvs-ai/cli`](../cli) — terminal access (no MCP layer)
174
+ - [`@opvs-ai/skills`](../opvs-skills) — vendor CLI (publish/install/doctor)
175
+ - Gateway plugin `skills-meta` ([source](../../apps/spideragent/packages/shared/src/plugins/skills-meta/index.ts)) — the in-platform counterpart of this package
63
176
 
64
177
  ## License
65
178
 
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 {};