@capxul/mcp 1.0.0-alpha.2 → 1.0.0-alpha.20

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,78 +1,47 @@
1
- # @capxul/mcp
1
+ # Capxul MCP (`@capxul/mcp`)
2
2
 
3
- The **Capxul MCP server** — a runnable [Model Context Protocol](https://modelcontextprotocol.io)
4
- server that exposes Capxul's agent-facing financial-ops tools to MCP clients
5
- (Claude, Cursor, and other agents) over **Streamable HTTP**.
3
+ The published Capxul Model Context Protocol server. It exposes agent-facing
4
+ auth, account, financial operations, payments, Organizations, payment requests,
5
+ SDK restart, faucet, and workbench tool families through one registry.
6
6
 
7
- This package ships a CLI, not a library: the published artifact is the
8
- `capxul-mcp` executable.
7
+ The artifact is a CLI, not an importable library.
9
8
 
10
- ## Install & run
9
+ ## Run
11
10
 
12
11
  ```bash
13
- # one-off, via npx
14
12
  npx @capxul/mcp serve --mode live
15
13
 
16
- # or install globally
17
- npm i -g @capxul/mcp
18
- capxul-mcp serve --mode live
14
+ # Trusted local MCP-client spawn:
15
+ capxul-mcp serve --mode live --stdio
19
16
  ```
20
17
 
21
- ```
22
- Usage:
23
- capxul-mcp serve [--mode live|dev] [--port <port>] [--approval-url <url>]
18
+ HTTP mode uses Streamable HTTP at `POST /mcp` and defaults to port `8788`.
19
+ Stdio mode reserves stdout for JSON-RPC and sends diagnostics to stderr.
24
20
 
25
- Options:
26
- --mode live|dev Launch mode. Defaults to live. There is no env-var mode selector.
27
- --port <port> Bind port. Defaults to CAPXUL_MCP_PORT or 8788.
28
- --approval-url <url> Approval app base URL. Defaults to CAPXUL_MCP_APPROVAL_URL or http://localhost:5998.
29
- --help Show this help.
21
+ ```text
22
+ capxul-mcp serve [--mode live|dev] [--port <port>]
23
+ [--approval-url <url>] [--stdio]
30
24
  ```
31
25
 
32
- The server speaks MCP over Streamable HTTP at `POST /mcp`. The startup banner
33
- prints the bound URL and the enabled tool set.
34
-
35
- ## What it exposes
36
-
37
- Agent-facing financial-ops tools, composed in `src/registry.ts`:
38
-
39
- - **`system.ping`** — liveness probe (no auth, no secrets).
40
- - **`auth.*`** — request/verify an email OTP, exchanging it for an opaque
41
- session token bound to the MCP session.
42
- - **`account.*`** — account readiness and on-chain Money balances.
43
- - **`faucet.fundTestnet`** — testnet faucet (env-gated).
44
- - **`payments.send`** — send a sponsored stablecoin payment.
45
-
46
- ## Auth & transport
26
+ `--mode live` uses the production signer path. `--mode dev` requires a
27
+ deterministic development signer seed and is not production custody evidence.
28
+ Runtime environment is read lazily so `system.ping` can run without platform
29
+ secrets; missing authenticated configuration returns a structured error.
47
30
 
48
- - **Streamable HTTP** transport — a fresh, stateless `McpServer` per `POST /mcp`.
49
- - **OAuth bearer auth** — an in-memory PKCE OAuth provider gates tool access
50
- when `CAPXUL_MCP_OAUTH_REQUIRED=1`; a proof-issuer secret can mint bearer
51
- tokens for automated probes.
52
- - **Dev-mode custody gate** — `--mode dev` runs against a deterministic dev
53
- signer seed (`CAPXUL_MCP_DEV_SIGNER_SEED`) so journeys can be exercised
54
- without live custody; `--mode live` uses the production signer path.
31
+ ## Verify in the repository
55
32
 
56
- ## Runtime configuration
57
-
58
- Environment is read lazily on the first authenticated tool call, so liveness
59
- (`system.ping`) needs no secrets. A missing slot surfaces as a structured
60
- `ENV_MISSING` tool error naming the exact variable. Notable variables:
61
-
62
- | Variable | Purpose |
63
- | --- | --- |
64
- | `CAPXUL_MCP_PORT` | Bind port (default `8788`; `0` = ephemeral). |
65
- | `CAPXUL_MCP_DEV_SIGNER_SEED` | Deterministic dev signer seed (`--mode dev`). |
66
- | `CAPXUL_MCP_OAUTH_REQUIRED` | `1` to require an OAuth bearer token. |
67
- | `CAPXUL_MCP_OAUTH_PROOF_ISSUER_SECRET` | Secret to mint proof bearer tokens. |
68
- | `CAPXUL_MCP_APPROVAL_URL` | Base URL of the Approval app for deploy approvals. |
33
+ ```bash
34
+ vp run --filter @capxul/mcp check-types
35
+ vp test run apps/mcp
36
+ vp run --filter @capxul/mcp build
37
+ vp run --filter @capxul/mcp proofs:live -- --phase <phase>
38
+ ```
69
39
 
70
- ## Distribution
40
+ Unit tests and dev-mode fixtures prove handler/transport contracts, not live
41
+ Convex, chain, OAuth issuance, or settlement. Only the explicitly selected
42
+ `proofs:live` phase supplies live evidence for that phase. The published CLI
43
+ still lacks an isolated packed-install/bin smoke; [#922](https://github.com/Xelmar-tech/infrastructure/issues/922)
44
+ owns that gap.
71
45
 
72
- `@capxul/mcp` is published from the `Xelmar-tech/infrastructure` repo on the
73
- `alpha` dist-tag. The tarball is **self-contained**: every internal
74
- `@capxul/*` workspace package the server reaches (`@capxul/sdk`,
75
- `@capxul/backend`, `@capxul/config`, `@capxul/types`) is bundled into
76
- `dist/main.mjs` at pack time, while real npm dependencies (`effect`, `convex`,
77
- `viem`, `zod`, `@modelcontextprotocol/sdk`, …) stay external and are resolved
78
- from the consumer's lockfile.
46
+ Read [CONTEXT.md](./CONTEXT.md) before adding a tool or changing auth, approval,
47
+ wire, or proof behavior.