@getpalmos/mcp 0.1.0 → 0.2.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,23 +1,32 @@
1
1
  # @getpalmos/mcp
2
2
 
3
- Model Context Protocol (MCP) server for PalmOS. It gives Claude Code, Codex, and
4
- any other MCP-capable agent a set of **governed payment tools** — the agent can
5
- discover paid services, check policy, and request payments, while PalmOS enforces
6
- budget, allowlist, approval, settlement, and audit rules server-side. The agent
7
- never holds a wallet key.
3
+ Model Context Protocol (MCP) server for PalmOS. It gives Claude Code, Codex, and any other
4
+ MCP-capable agent PalmOS's **governed agent-wallet tools** — Byreal swaps, concentrated (CLMM)
5
+ liquidity, pool and position discovery, wallet context, and policy checks while PalmOS enforces
6
+ policy, custody, settlement, and an on-chain audit trail server-side. The agent never holds a key.
7
+
8
+ The bridge is generic: it exposes whatever governed tools your PalmOS backend offers (read live from
9
+ `/api/sdk/v1/tools`), so new skills appear automatically without upgrading this package.
8
10
 
9
11
  ## Tools
10
12
 
13
+ Exact tools depend on your backend (the server lists them on connect). A typical Byreal-enabled
14
+ PalmOS backend exposes:
15
+
11
16
  | Tool | Purpose |
12
17
  | --- | --- |
13
- | `palmos_list_services` | List the paid services this agent is allowed to call. |
14
- | `palmos_check_policy` | Preview whether a payment would be allowed / approval-gated / denied (no spend). |
15
- | `palmos_get_agent_status` | Report the agent's PalmOS identity, trust tier, and settlement mode. |
16
- | `palmos_pay` | Execute a governed paid-service call. |
17
-
18
- `palmos_pay` is the only tool that can move money, and every call is still
19
- gated by PalmOS policy: small allowed payments execute, higher-value ones become
20
- approval-pending for an operator, and disallowed services are blocked.
18
+ | `get_wallet_context` | The agent's balances, portfolio, and the policy controls it must act within. |
19
+ | `list_byreal_pools` | Discover Byreal CLMM pools ids, token mints, live price, and which are policy-allowed. |
20
+ | `get_byreal_quote` | A live Byreal swap quote (read-only). |
21
+ | `request_asset_swap` | A governed Byreal swap (policy-checked, vault-signed, settled). |
22
+ | `list_byreal_positions` | The agent's CLMM liquidity positions. |
23
+ | `request_liquidity_action` | Governed CLMM liquidity: open / increase / decrease / close. Pass `rangePercent` for an automatic ± range. |
24
+ | `check_policy` | Preview whether an action is allowed / approval-gated / denied (no spend). |
25
+ | `get_agent_status` | The agent's PalmOS identity, trust tier, and settlement mode. |
26
+
27
+ Every governed action is gated by PalmOS policy: within the auto-approve threshold it settles, a
28
+ larger-but-allowed action becomes approval-pending for an operator, and an off-policy action is
29
+ blocked. The agent reads the governed outcome and reasons about it.
21
30
 
22
31
  ## Prerequisites
23
32
 
@@ -89,12 +98,12 @@ Build it first with `npm run build` (from `packages/mcp`) or
89
98
 
90
99
  Once configured, ask the agent naturally, e.g.:
91
100
 
92
- > "List my PalmOS services, check the policy for `local.pusd.spot_price`, then
93
- > pay for a BTC/USD spot price."
101
+ > "Show me the SOL/USDC Byreal pools I'm allowed to use, then open a 0.05 USDC liquidity
102
+ > position with a ±12% range."
94
103
 
95
- The agent will call `palmos_list_services` → `palmos_check_policy` `palmos_pay`.
96
- PalmOS records every outcome (executed, approval-pending, blocked) with an audit
97
- trail in the dashboard.
104
+ The agent calls `list_byreal_pools` → `request_liquidity_action`. PalmOS checks the policy, the OWS
105
+ vault signs, the position settles on Byreal, and the decision is logged on-chain every outcome
106
+ (executed, approval-pending, blocked) shows up in the dashboard with an audit trail.
98
107
 
99
108
  ## Token storage
100
109
 
package/dist/index.js CHANGED
@@ -1,123 +1,123 @@
1
1
  #!/usr/bin/env node
2
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ /**
3
+ * @getpalmos/mcp — a Model Context Protocol server that exposes PalmOS's governed agent tools to any
4
+ * MCP client (Claude Code, Codex, …). It reads the live tool catalog from your PalmOS backend
5
+ * (`GET /api/sdk/v1/tools`) and proxies each call to `POST /api/sdk/v1/tools/:toolName` with your
6
+ * agent's bearer token — so every governed skill is available: Byreal swaps, CLMM liquidity
7
+ * (open/increase/decrease/close), pool + position discovery, wallet context, policy checks, and
8
+ * paid-service calls. New backend tools appear automatically; nothing here is hardcoded.
9
+ *
10
+ * The agent reaches PalmOS *only* through this bridge; PalmOS governs every call (policy gate, OWS
11
+ * vault custody, on-chain decision log). The bridge holds no keys and cannot bypass policy — a denied
12
+ * action comes back as an error the agent reads and reasons about.
13
+ *
14
+ * Run:
15
+ * npx @getpalmos/mcp
16
+ *
17
+ * Or wire it into an MCP client (e.g. Claude Code .mcp.json):
18
+ * {
19
+ * "command": "npx",
20
+ * "args": ["-y", "@getpalmos/mcp"],
21
+ * "env": { "PALMOS_AGENT_TOKEN": "palmos_...", "PALMOS_API_URL": "https://api.getpalmos.xyz" }
22
+ * }
23
+ *
24
+ * Env (also auto-loaded from a local .env):
25
+ * PALMOS_AGENT_TOKEN (required) — an issued palmos_... agent credential from the dashboard.
26
+ * PALMOS_API_URL (optional) — your PalmOS backend; default https://api.getpalmos.xyz.
27
+ * PALMOS_MCP_TOOLS (optional) — comma-separated allowlist of tool names to expose.
28
+ *
29
+ * NOTE: stdout is the MCP JSON-RPC channel — all logging goes to stderr.
30
+ */
31
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
32
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
- import { z } from 'zod';
5
- import { PalmosAgentClient, PalmosAgentClientError } from '@getpalmos/agent';
6
- // Lazily build the client so the server can start and advertise its tools even
7
- // when no credential is set yet. Tool *calls* still require PALMOS_AGENT_TOKEN.
8
- let client;
9
- function getClient() {
10
- if (client) {
11
- return client;
12
- }
13
- const token = process.env.PALMOS_AGENT_TOKEN?.trim();
14
- if (!token) {
15
- throw new Error('Set PALMOS_AGENT_TOKEN to an issued palmos_... SDK credential (from the PalmOS dashboard).');
16
- }
17
- client = new PalmosAgentClient({
18
- baseUrl: process.env.PALMOS_API_URL?.trim(),
19
- token,
20
- });
21
- return client;
33
+ import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
34
+ // Pick up a local .env (PALMOS_AGENT_TOKEN, PALMOS_API_URL) when launched by an MCP client.
35
+ try {
36
+ ;
37
+ process.loadEnvFile?.();
22
38
  }
23
- function ok(data) {
24
- return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
39
+ catch {
40
+ // no .env rely on the ambient environment
25
41
  }
26
- function fail(error) {
27
- const message = error instanceof PalmosAgentClientError
28
- ? `PalmOS API error ${error.status}: ${error.message}`
29
- : error instanceof Error
30
- ? error.message
31
- : String(error);
32
- return { isError: true, content: [{ type: 'text', text: message }] };
42
+ const DEFAULT_API = 'https://api.getpalmos.xyz';
43
+ const API = (process.env.PALMOS_API_URL ?? DEFAULT_API).replace(/\/$/, '');
44
+ const TOKEN = process.env.PALMOS_AGENT_TOKEN?.trim();
45
+ const ALLOWLIST = (process.env.PALMOS_MCP_TOOLS ?? '')
46
+ .split(',')
47
+ .map((s) => s.trim())
48
+ .filter(Boolean);
49
+ const log = (...args) => console.error('[palmos-mcp]', ...args);
50
+ if (!TOKEN) {
51
+ log('FATAL: set PALMOS_AGENT_TOKEN to an issued palmos_... agent credential (from the PalmOS dashboard).');
52
+ process.exit(1);
33
53
  }
34
- const server = new McpServer({ name: 'palmos', version: '0.1.0' });
35
- server.registerTool('palmos_list_services', {
36
- title: 'List PalmOS paid services',
37
- description: 'List the paid services this PalmOS agent is allowed to call, with vendor, settlement asset, expected amount, payment rail, and whether each is currently allowed by policy. Call this first to discover valid serviceId values.',
38
- inputSchema: {},
39
- }, async () => {
40
- try {
41
- return ok(await getClient().listServices());
42
- }
43
- catch (error) {
44
- return fail(error);
45
- }
46
- });
47
- server.registerTool('palmos_get_agent_status', {
48
- title: 'Get PalmOS agent status',
49
- description: "Return this agent's PalmOS identity and posture: agent and credential status, trust tier, settlement mode, and wallet state.",
50
- inputSchema: {},
51
- }, async () => {
52
- try {
53
- return ok(await getClient().getAgentStatus());
54
- }
55
- catch (error) {
56
- return fail(error);
57
- }
58
- });
59
- server.registerTool('palmos_check_policy', {
60
- title: 'Check PalmOS payment policy',
61
- description: 'Preview whether a payment for a service (and optional amount) would be allowed, approval-gated, or denied — WITHOUT spending anything. Use this before palmos_pay to avoid surprises.',
62
- inputSchema: {
63
- serviceId: z
64
- .string()
65
- .describe('PalmOS service id, e.g. local.pusd.spot_price'),
66
- amount: z
67
- .string()
68
- .optional()
69
- .describe('Optional amount override as a decimal string, e.g. "0.25".'),
70
- },
71
- }, async ({ serviceId, amount }) => {
54
+ const authHeaders = {
55
+ Authorization: `Bearer ${TOKEN}`,
56
+ 'Content-Type': 'application/json',
57
+ };
58
+ async function fetchTools() {
59
+ const res = await fetch(`${API}/api/sdk/v1/tools`, { headers: authHeaders });
60
+ if (!res.ok)
61
+ throw new Error(`GET /api/sdk/v1/tools → ${res.status}`);
62
+ const body = (await res.json());
63
+ let tools = body.tools ?? [];
64
+ if (ALLOWLIST.length)
65
+ tools = tools.filter((t) => ALLOWLIST.includes(t.name));
66
+ return tools;
67
+ }
68
+ const server = new Server({ name: 'palmos', version: '0.2.0' }, { capabilities: { tools: {} } });
69
+ server.setRequestHandler(ListToolsRequestSchema, async () => {
72
70
  try {
73
- return ok(await getClient().checkPolicy({ serviceId, amount }));
71
+ const tools = await fetchTools();
72
+ log(`exposing ${tools.length} governed tools: ${tools.map((t) => t.name).join(', ')}`);
73
+ return {
74
+ tools: tools.map((t) => ({
75
+ name: t.name,
76
+ description: t.description ?? '',
77
+ inputSchema: t.inputSchema ?? { type: 'object' },
78
+ })),
79
+ };
74
80
  }
75
81
  catch (error) {
76
- return fail(error);
82
+ log('list-tools failed (is PALMOS_API_URL reachable + the token valid?):', error.message);
83
+ return { tools: [] };
77
84
  }
78
85
  });
79
- server.registerTool('palmos_pay', {
80
- title: 'Execute a governed PalmOS payment',
81
- description: 'Request a governed paid-service call. PalmOS enforces policy, session budget, vendor allowlist, and approval gates server-side: small allowed payments execute immediately, higher-value ones become approval-pending for an operator, and disallowed services/vendors are blocked. The agent never holds wallet keys. Returns the execution record; check result.kind (executed | approval_pending | waiting_for_execution | blocked | execution_failed). Pass a stable idempotencyKey derived from a job/run id so retries do not double-pay.',
82
- inputSchema: {
83
- serviceId: z.string().describe('PalmOS service id to pay for.'),
84
- request: z
85
- .record(z.string(), z.unknown())
86
- .optional()
87
- .describe('Service request payload, e.g. { "base": "BTC", "quote": "USD" }.'),
88
- amount: z
89
- .string()
90
- .optional()
91
- .describe('Optional amount override as a decimal string.'),
92
- note: z
93
- .string()
94
- .optional()
95
- .describe('Optional human-readable note stored on the paid-call record.'),
96
- idempotencyKey: z
97
- .string()
98
- .optional()
99
- .describe('Stable key from a job/run id so retries are not double-charged.'),
100
- privacy: z
101
- .enum(['default', 'required'])
102
- .optional()
103
- .describe('Set "required" to force private (Umbra) settlement; fails closed if no private route is configured.'),
104
- },
105
- }, async (input) => {
86
+ server.setRequestHandler(CallToolRequestSchema, async (req) => {
87
+ const name = req.params.name;
88
+ const args = (req.params.arguments ?? {});
106
89
  try {
107
- return ok(await getClient().pay(input));
90
+ const res = await fetch(`${API}/api/sdk/v1/tools/${encodeURIComponent(name)}`, {
91
+ method: 'POST',
92
+ headers: authHeaders,
93
+ body: JSON.stringify(args),
94
+ });
95
+ const raw = await res.text();
96
+ let text = raw;
97
+ try {
98
+ text = JSON.stringify(JSON.parse(raw), null, 2);
99
+ }
100
+ catch {
101
+ // non-JSON body — return as-is
102
+ }
103
+ // A policy denial (HTTP 403) is a legitimate governed outcome: surface it as an error the agent
104
+ // reads and reasons about, rather than a silent success.
105
+ return { content: [{ type: 'text', text }], isError: !res.ok };
108
106
  }
109
107
  catch (error) {
110
- return fail(error);
108
+ return {
109
+ content: [{ type: 'text', text: `PalmOS MCP bridge call failed: ${error.message}` }],
110
+ isError: true,
111
+ };
111
112
  }
112
113
  });
113
114
  async function main() {
114
115
  const transport = new StdioServerTransport();
115
116
  await server.connect(transport);
116
- // stdout is the JSON-RPC channel; log to stderr only.
117
- console.error('[palmos-mcp] PalmOS MCP server ready on stdio.');
117
+ log(`connected proxying governed PalmOS tools from ${API}`);
118
118
  }
119
119
  main().catch((error) => {
120
- console.error('[palmos-mcp] fatal:', error instanceof Error ? error.message : error);
120
+ log('fatal:', error instanceof Error ? error.message : error);
121
121
  process.exit(1);
122
122
  });
123
123
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAE5E,+EAA+E;AAC/E,gFAAgF;AAChF,IAAI,MAAqC,CAAA;AAEzC,SAAS,SAAS;IAChB,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,MAAM,CAAA;IACf,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,EAAE,CAAA;IACpD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,4FAA4F,CAC7F,CAAA;IACH,CAAC;IAED,MAAM,GAAG,IAAI,iBAAiB,CAAC;QAC7B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE;QAC3C,KAAK;KACN,CAAC,CAAA;IACF,OAAO,MAAM,CAAA;AACf,CAAC;AAOD,SAAS,EAAE,CAAC,IAAa;IACvB,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAA;AAC7E,CAAC;AAED,SAAS,IAAI,CAAC,KAAc;IAC1B,MAAM,OAA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,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,GAAG,CAAC,QAAQ,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@getpalmos/mcp",
3
- "version": "0.1.0",
4
- "description": "Model Context Protocol server for PalmOS. Gives Claude Code, Codex, and other MCP agents governed PUSD payment tools.",
3
+ "version": "0.2.0",
4
+ "description": "Model Context Protocol server for PalmOS governed Byreal swaps, CLMM liquidity, and agent-wallet actions for Claude Code, Codex, and other MCP clients.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "PalmOS",
@@ -44,16 +44,16 @@
44
44
  "mcp",
45
45
  "model-context-protocol",
46
46
  "agent",
47
- "pusd",
47
+ "byreal",
48
48
  "solana",
49
- "payments",
49
+ "defi",
50
+ "liquidity",
51
+ "swap",
50
52
  "claude",
51
53
  "codex"
52
54
  ],
53
55
  "dependencies": {
54
- "@getpalmos/agent": "^0.1.0",
55
- "@modelcontextprotocol/sdk": "^1.29.0",
56
- "zod": "3.25.76"
56
+ "@modelcontextprotocol/sdk": "^1.29.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/node": "^25.5.2"