@oobe-protocol-labs/sap-mcp-server 0.9.11 → 0.9.15
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/CHANGELOG.md +69 -0
- package/README.md +2 -2
- package/USER_DOCS/00_START_HERE.md +24 -2
- package/USER_DOCS/03_PAYMENTS_X402_PAYSH.md +6 -1
- package/USER_DOCS/04_CLIENT_CONFIGS.md +4 -3
- package/USER_DOCS/05_SKILLS_AND_TOOLS.md +10 -5
- package/USER_DOCS/06_DESKTOP_GUI_WIZARD.md +6 -6
- package/dist/config/mcp-client-injection.d.ts.map +1 -1
- package/dist/config/mcp-client-injection.js +4 -3
- package/dist/config/mcp-client-injection.js.map +1 -1
- package/dist/core/constants.d.ts +9 -1
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +13 -3
- package/dist/core/constants.js.map +1 -1
- package/dist/payments/hosted-tool-eligibility.d.ts.map +1 -1
- package/dist/payments/hosted-tool-eligibility.js +3 -0
- package/dist/payments/hosted-tool-eligibility.js.map +1 -1
- package/dist/payments/index.d.ts +2 -2
- package/dist/payments/index.d.ts.map +1 -1
- package/dist/payments/index.js +1 -1
- package/dist/payments/index.js.map +1 -1
- package/dist/payments/pricing.d.ts +29 -0
- package/dist/payments/pricing.d.ts.map +1 -1
- package/dist/payments/pricing.js +81 -0
- package/dist/payments/pricing.js.map +1 -1
- package/dist/prompts/context/sap-agent-context.prompt.js +2 -0
- package/dist/prompts/context/sap-agent-context.prompt.js.map +1 -1
- package/dist/prompts/context/sap-agent-start.prompt.js +2 -0
- package/dist/prompts/context/sap-agent-start.prompt.js.map +1 -1
- package/dist/prompts/registry/register-sap-agent.prompt.js +18 -18
- package/dist/prompts/registry/register-sap-agent.prompt.js.map +1 -1
- package/dist/remote/public-home/sections.d.ts.map +1 -1
- package/dist/remote/public-home/sections.js +8 -2
- package/dist/remote/public-home/sections.js.map +1 -1
- package/dist/remote/public-home/types.d.ts +2 -0
- package/dist/remote/public-home/types.d.ts.map +1 -1
- package/dist/remote/server.d.ts +2 -0
- package/dist/remote/server.d.ts.map +1 -1
- package/dist/remote/server.js +163 -2
- package/dist/remote/server.js.map +1 -1
- package/dist/security/tool-permissions.d.ts.map +1 -1
- package/dist/security/tool-permissions.js +9 -0
- package/dist/security/tool-permissions.js.map +1 -1
- package/dist/tools/agent-start-tool.d.ts.map +1 -1
- package/dist/tools/agent-start-tool.js +227 -3
- package/dist/tools/agent-start-tool.js.map +1 -1
- package/dist/tools/client-sdk-tools.js +3 -3
- package/dist/tools/client-sdk-tools.js.map +1 -1
- package/dist/tools/magicblock-tools.d.ts.map +1 -1
- package/dist/tools/magicblock-tools.js +43 -26
- package/dist/tools/magicblock-tools.js.map +1 -1
- package/dist/tools/sap-sdk-tools.d.ts +412 -1
- package/dist/tools/sap-sdk-tools.d.ts.map +1 -1
- package/dist/tools/sap-sdk-tools.js +1044 -30
- package/dist/tools/sap-sdk-tools.js.map +1 -1
- package/dist/tools/sap-sns-tools.d.ts.map +1 -1
- package/dist/tools/sap-sns-tools.js +6 -2
- package/dist/tools/sap-sns-tools.js.map +1 -1
- package/dist/tools/skills-tools.d.ts.map +1 -1
- package/dist/tools/skills-tools.js +2 -0
- package/dist/tools/skills-tools.js.map +1 -1
- package/dist/tools/tool-aliases.d.ts.map +1 -1
- package/dist/tools/tool-aliases.js +7 -0
- package/dist/tools/tool-aliases.js.map +1 -1
- package/dist/tools/transaction-tools.d.ts +56 -0
- package/dist/tools/transaction-tools.d.ts.map +1 -1
- package/dist/tools/transaction-tools.js +215 -18
- package/dist/tools/transaction-tools.js.map +1 -1
- package/dist/tools/x402-paid-call-tool.d.ts.map +1 -1
- package/dist/tools/x402-paid-call-tool.js +422 -18
- package/dist/tools/x402-paid-call-tool.js.map +1 -1
- package/docs/03_CONFIGURATION_AND_WIZARD.md +1 -0
- package/docs/06_PAYMENTS_X402_AND_PAYSH.md +45 -3
- package/docs/07_ENDPOINTS_AND_CLIENTS.md +2 -1
- package/docs/14_DESKTOP_WIZARD_RELEASE.md +5 -4
- package/docs/16_SAP_AGENT_IDENTITY_PIPELINE.md +298 -0
- package/docs/README.md +2 -0
- package/docs/magicblock-tools.md +26 -0
- package/package.json +1 -1
- package/server.json +3 -3
- package/skills/sap-agent-registry/SKILL.md +63 -5
- package/skills/sap-escrow-settlement/SKILL.md +22 -4
- package/skills/sap-mcp/SKILL.md +73 -22
- package/skills/sap-mcp/TOOL_REFERENCE.md +22 -1
- package/skills/sap-nft-metaplex/SKILL.md +22 -0
- package/skills/sap-operations/SKILL.md +17 -0
- package/skills/sap-payments-x402/SKILL.md +33 -2
- package/skills/sap-sns/SKILL.md +17 -0
- package/smithery.config.schema.json +7 -0
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "ai.oobeprotocol.sap.mcp/sap-mcp",
|
|
4
4
|
"title": "SAP MCP Server | OOBE Protocol",
|
|
5
5
|
"description": "Solana-native MCP gateway for SAP tools, DeFi, SNS identity, x402/pay.sh, and agent operations.",
|
|
6
|
-
"version": "0.9.
|
|
6
|
+
"version": "0.9.15",
|
|
7
7
|
"websiteUrl": "https://mcp.sap.oobeprotocol.ai/",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/OOBE-PROTOCOL/sap-mcp",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
{
|
|
30
30
|
"registryType": "npm",
|
|
31
31
|
"identifier": "@oobe-protocol-labs/sap-mcp-server",
|
|
32
|
-
"version": "0.9.
|
|
32
|
+
"version": "0.9.15",
|
|
33
33
|
"transport": {
|
|
34
34
|
"type": "stdio"
|
|
35
35
|
},
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"type": "positional",
|
|
48
|
-
"value": "@oobe-protocol-labs/sap-mcp-server@0.9.
|
|
48
|
+
"value": "@oobe-protocol-labs/sap-mcp-server@0.9.15"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"type": "positional",
|
|
@@ -6,15 +6,23 @@ state, global directory listing, and agent profile inspection.
|
|
|
6
6
|
## First Steps
|
|
7
7
|
|
|
8
8
|
1. Call `sap_profile_current`.
|
|
9
|
-
2. Call `
|
|
10
|
-
|
|
9
|
+
2. Call `sap_protocol_invariants` before registry writes when treasury, fee,
|
|
10
|
+
hosted/local routing, or lifecycle-complete rules are unclear.
|
|
11
|
+
3. For registration, profile-image updates, Metaplex identity, SNS linking, or
|
|
12
|
+
full identity setup, call `sap_agent_identity_plan` before any write. It is
|
|
13
|
+
free and returns normalized fields, local-signer routing, metadata contract,
|
|
14
|
+
forbidden actions, and verification checklist.
|
|
15
|
+
4. Call `sap_get_network_overview` for ecosystem counters when needed.
|
|
16
|
+
5. Use `sap_discover_agents` with `query`, `wallet`, `protocol`, or
|
|
11
17
|
`capability` for targeted paid hosted directory reads.
|
|
12
|
-
|
|
18
|
+
6. Use `sap_list_all_agents` for global current agent lists and follow
|
|
13
19
|
`pagination.nextCursor` for additional pages.
|
|
14
20
|
|
|
15
21
|
## Tools
|
|
16
22
|
|
|
17
23
|
- `sap_register_agent`
|
|
24
|
+
- `sap_protocol_invariants`
|
|
25
|
+
- `sap_agent_identity_plan`
|
|
18
26
|
- `sap_update_agent`
|
|
19
27
|
- `sap_deactivate_agent`
|
|
20
28
|
- `sap_reactivate_agent`
|
|
@@ -36,9 +44,29 @@ state, global directory listing, and agent profile inspection.
|
|
|
36
44
|
`hosted_local_signer_required`, no x402 payment was charged. For agent
|
|
37
45
|
registration, call the local `sap_payments.sap_payments_register_agent`
|
|
38
46
|
bridge with the same fields and `confirm: true`; it signs locally with the
|
|
39
|
-
active SAP MCP profile. For
|
|
40
|
-
|
|
47
|
+
active SAP MCP profile. For agent profile, image, metadata, capability,
|
|
48
|
+
protocol, pricing, or x402 endpoint updates, call local
|
|
49
|
+
`sap_payments.sap_payments_update_agent` with the same update fields and
|
|
50
|
+
`confirm: true`. For other registry writes, run the write on the local SAP
|
|
51
|
+
MCP profile or use a production unsigned builder/finalizer flow when
|
|
41
52
|
available.
|
|
53
|
+
- Agent pictures must be public metadata, not desktop file paths. Upload the
|
|
54
|
+
image or metadata JSON to IPFS, Arweave, Kommodo, or HTTPS, then set
|
|
55
|
+
`agentUri`/`metadataUri` with `sap_payments_update_agent`.
|
|
56
|
+
- After `sap_payments_register_agent`, do not stop at a Solscan link. Verify
|
|
57
|
+
`success`, `agentRegistered`, `agentPda`, `confirmationStatus`,
|
|
58
|
+
`protocolComplete`, and `protocolFee.status`. A complete registration should
|
|
59
|
+
show the expected protocol fee credited to treasury
|
|
60
|
+
`J7PyZAGKvprCz4SQ5DKBLAHstJxgVqZcz6kguUoWpP7P`. If `success` is false but
|
|
61
|
+
`agentRegistered` is true, the account may exist but SAP registration is not
|
|
62
|
+
protocol-complete. Report the integrity issue and do not retry automatically.
|
|
63
|
+
- After `sap_payments_update_agent`, fetch the agent profile again and verify
|
|
64
|
+
the changed fields. For image/profile updates, `agentUri` or `metadataUri`
|
|
65
|
+
must resolve to public metadata containing the image URL.
|
|
66
|
+
- For full agent identity setup, follow
|
|
67
|
+
`docs/16_SAP_AGENT_IDENTITY_PIPELINE.md`: SAP registration first, optional
|
|
68
|
+
Metaplex/MPL Core identity, optional SNS domain and records, then a final SAP
|
|
69
|
+
update that points `metadataUri` at the public metadata document.
|
|
42
70
|
- "Find XONA Agent" or "find an agent by name" means `sap_discover_agents` with
|
|
43
71
|
`query`.
|
|
44
72
|
- "Find x402 agents" means `sap_discover_agents` with
|
|
@@ -53,3 +81,33 @@ state, global directory listing, and agent profile inspection.
|
|
|
53
81
|
|
|
54
82
|
Registration and update tools are write operations. Explain the action, read
|
|
55
83
|
policy context, require explicit confirmation, and never inspect keypair files.
|
|
84
|
+
For registrations, distinguish `agent account exists` from `protocol lifecycle
|
|
85
|
+
complete`; the latter requires confirmation plus a non-failing protocol fee
|
|
86
|
+
audit.
|
|
87
|
+
|
|
88
|
+
## Canonical Register Fields
|
|
89
|
+
|
|
90
|
+
Use these exact fields for `sap_payments_register_agent` and local
|
|
91
|
+
`sap_register_agent`:
|
|
92
|
+
|
|
93
|
+
- `name`: public display name.
|
|
94
|
+
- `description`: public purpose, capabilities, and trust boundary.
|
|
95
|
+
- `capabilities`: array of strings or objects. Prefer object form:
|
|
96
|
+
`{ "id": "jupiter:swap", "description": "...", "protocolId": "jupiter", "version": "1.0.0" }`.
|
|
97
|
+
- `pricing`: array of pricing tiers. For x402/pay.sh use
|
|
98
|
+
`{ "pricePerCall": "1000", "tokenType": "usdc", "settlementMode": "x402", "tokenDecimals": 6 }`;
|
|
99
|
+
USDC amounts are micro-USDC.
|
|
100
|
+
- `protocols`: array such as `["sap", "mcp", "jupiter", "pyth", "metaplex"]`.
|
|
101
|
+
- `agentId`: stable lowercase id, for example `solking`.
|
|
102
|
+
- `agentUri` or `metadataUri`: public metadata/profile URL. Never a local path.
|
|
103
|
+
- `x402Endpoint`: optional `https://host/.well-known/x402`.
|
|
104
|
+
- `confirm`: required `true` on the local `sap_payments` bridge.
|
|
105
|
+
- `protocolFee`: returned output audit for registration; verify it before
|
|
106
|
+
announcing completion.
|
|
107
|
+
|
|
108
|
+
## Canonical Update Fields
|
|
109
|
+
|
|
110
|
+
`sap_payments_update_agent` accepts the same profile fields as registration,
|
|
111
|
+
but every field is optional. Omitted fields stay unchanged. Array fields
|
|
112
|
+
replace the full on-chain list, so fetch the current agent first before adding
|
|
113
|
+
only one capability, protocol, or pricing tier.
|
|
@@ -7,6 +7,17 @@ new work.
|
|
|
7
7
|
|
|
8
8
|
## Tools
|
|
9
9
|
|
|
10
|
+
Hosted unsigned builders:
|
|
11
|
+
|
|
12
|
+
- `sap_escrow_build_create_transaction`
|
|
13
|
+
- `sap_escrow_build_deposit_transaction`
|
|
14
|
+
- `sap_escrow_build_settle_transaction`
|
|
15
|
+
- `sap_escrow_build_finalize_transaction`
|
|
16
|
+
- `sap_escrow_build_withdraw_transaction`
|
|
17
|
+
- `sap_escrow_build_close_transaction`
|
|
18
|
+
|
|
19
|
+
Local-signer direct writes:
|
|
20
|
+
|
|
10
21
|
- `sap_create_escrow_v2`
|
|
11
22
|
- `sap_deposit_escrow_v2`
|
|
12
23
|
- `sap_settle_escrow_v2`
|
|
@@ -26,13 +37,20 @@ recommend V1 create, deposit, settle, withdraw, close, or batch-settle flows.
|
|
|
26
37
|
## Flow
|
|
27
38
|
|
|
28
39
|
1. Fetch V2 escrow state before mutating it.
|
|
29
|
-
2.
|
|
30
|
-
|
|
40
|
+
2. In hosted SAP MCP, never call direct escrow write tools after
|
|
41
|
+
`hosted_local_signer_required`. Use the matching
|
|
42
|
+
`sap_escrow_build_*_transaction` tool, then finalize the unsigned
|
|
43
|
+
transaction locally with `sap_payments_finalize_transaction`.
|
|
44
|
+
3. In local SAP MCP stdio mode, direct write tools can sign through the active
|
|
45
|
+
local SAP profile. Do not read keypair JSON or create temporary signing
|
|
46
|
+
scripts.
|
|
47
|
+
4. For V2 settlement, inspect pending settlement and dispute state.
|
|
48
|
+
5. Explain amount, depositor, agent PDA, nonce, settlement index, and dispute
|
|
31
49
|
effect before write tools.
|
|
32
|
-
|
|
50
|
+
6. Treat `settlementSecurity = 2` / DisputeWindow as the safe default.
|
|
33
51
|
Use `settlementSecurity = 1` / CoSigned only when a valid `coSigner` is
|
|
34
52
|
provided. Never default to SelfReport / `0`.
|
|
35
|
-
|
|
53
|
+
7. Amounts are always in the smallest unit of the escrow token: lamports for
|
|
36
54
|
SOL, micro-USDC for USDC.
|
|
37
55
|
|
|
38
56
|
## Safety
|
package/skills/sap-mcp/SKILL.md
CHANGED
|
@@ -8,19 +8,29 @@ safe signing behavior.
|
|
|
8
8
|
|
|
9
9
|
If the user says "Start SAP MCP", "Initialize SAP MCP", "Load SAP", or "SAP
|
|
10
10
|
mode", treat it as the activation command. Call `sap_agent_start` when it is
|
|
11
|
-
available, then call `
|
|
12
|
-
the returned SAP MCP
|
|
11
|
+
available, then call `sap_agent_runtime_status` with the closest intent and
|
|
12
|
+
`sap_skills_bundle` with `includeContents: true`. Load the returned SAP MCP
|
|
13
|
+
skill contents into context before selecting advanced tools.
|
|
13
14
|
|
|
14
15
|
Always inspect runtime context through MCP tools, not by reading config files:
|
|
15
16
|
|
|
16
17
|
1. `sap_agent_start`
|
|
17
|
-
2. `
|
|
18
|
-
3. `
|
|
19
|
-
4. `
|
|
20
|
-
5. `
|
|
21
|
-
6. `
|
|
22
|
-
7. `
|
|
23
|
-
8. `
|
|
18
|
+
2. `sap_agent_runtime_status` with `intent: "connection"`, `"paid-call"`, `"registry-write"`, `"transaction-finalize"`, `"escrow"`, `"identity"`, or `"general"`
|
|
19
|
+
3. `sap_skills_bundle` with `includeContents: true`
|
|
20
|
+
4. `sap_pricing_catalog` before estimating hosted paid call tiers
|
|
21
|
+
5. `sap_skills_upgrade_plan` when local skills are missing or stale
|
|
22
|
+
6. `sap_runtime_repair_plan` when hosted tools are connected but `sap_payments` is missing
|
|
23
|
+
7. `sap_protocol_invariants` before SAP registry writes or when treasury, protocol fee, hosted write routing, or local signer routing is unclear
|
|
24
|
+
8. `sap_agent_identity_plan` before agent registration, profile-image updates, Metaplex identity, SNS linking, or full identity setup
|
|
25
|
+
9. `sap_profile_current`
|
|
26
|
+
10. `sap_profile_list`
|
|
27
|
+
11. `sap_profile_public_key`
|
|
28
|
+
12. `sap_network_stats`
|
|
29
|
+
|
|
30
|
+
For simple "are you connected?" checks, do not dump tool counts or inspect
|
|
31
|
+
local files. Use `sap_agent_runtime_status` first and answer with the hosted
|
|
32
|
+
endpoint, accountless/non-custodial model, local bridge readiness if visible,
|
|
33
|
+
and the next exact action.
|
|
24
34
|
|
|
25
35
|
The server profile is the source of truth. Environment variables from the MCP
|
|
26
36
|
client must not override profile-owned RPC or wallet settings unless
|
|
@@ -70,11 +80,12 @@ Use the bundled routing map for local MCP tool selection:
|
|
|
70
80
|
- `USER_DOCS/05_SKILLS_AND_TOOLS.md`
|
|
71
81
|
|
|
72
82
|
SAP MCP startup and skill bootstrap tools are free context/setup tools. Call
|
|
73
|
-
`sap_agent_start`, `
|
|
74
|
-
`
|
|
75
|
-
`sap_skills_install` directly. Do not
|
|
83
|
+
`sap_agent_start`, `sap_agent_runtime_status`, `sap_pricing_catalog`,
|
|
84
|
+
`sap_skills_list`, `sap_skills_bundle`, `sap_skills_upgrade_plan`,
|
|
85
|
+
`sap_runtime_repair_plan`, and local `sap_skills_install` directly. Do not
|
|
86
|
+
route startup, runtime status, pricing catalog, skill listing, bundling,
|
|
76
87
|
upgrade planning, runtime repair planning, or installation through
|
|
77
|
-
`sap_x402_paid_call`. On hosted remote MCP, use
|
|
88
|
+
`sap_x402_paid_call` or `sap_payments_call_paid_tool`. On hosted remote MCP, use
|
|
78
89
|
`sap_skills_bundle` to download skill contents; the hosted server cannot
|
|
79
90
|
install files onto the caller's local machine. Local installation belongs to the
|
|
80
91
|
wizard, desktop app, addon installer, or a local stdio SAP MCP process.
|
|
@@ -128,12 +139,13 @@ actions. The hosted MCP server is not a wallet custodian.
|
|
|
128
139
|
|
|
129
140
|
For hosted paid tools, use the native x402 flow. If the client runtime cannot
|
|
130
141
|
attach `PAYMENT-SIGNATURE` itself, use the local SAP MCP `sap_payments` bridge.
|
|
131
|
-
Call `
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
hosted
|
|
135
|
-
|
|
136
|
-
payload, retry the hosted tool call,
|
|
142
|
+
Call `sap_agent_runtime_status` first for routing, then
|
|
143
|
+
`sap_payments_readiness` to verify the active profile, signer, SOL/USDC
|
|
144
|
+
balance, policy limits, and bridge status. Then call `sap_payments_call_paid_tool`
|
|
145
|
+
for the hosted paid tool. This is not a separate hosted signing plugin: it is
|
|
146
|
+
the local SAP MCP process using the user's configured SAP profile wallet or
|
|
147
|
+
external signer to sign the x402 payment payload, retry the hosted tool call,
|
|
148
|
+
and return the receipt.
|
|
137
149
|
`sap_x402_paid_call` is a backward-compatible alias only for older runtime
|
|
138
150
|
snippets. Neither helper must be treated as a remote hosted signing service.
|
|
139
151
|
|
|
@@ -180,9 +192,36 @@ charged. The tool requires a local user signature or has no hosted unsigned
|
|
|
180
192
|
builder yet. For `sap_register_agent`, call
|
|
181
193
|
`sap_payments.sap_payments_register_agent` with the same registration fields and
|
|
182
194
|
`confirm: true`; it runs the SAP registry write through the local signer bridge
|
|
183
|
-
without charging a hosted x402 access fee. For
|
|
184
|
-
|
|
185
|
-
|
|
195
|
+
without charging a hosted x402 access fee. For `sap_update_agent`, call
|
|
196
|
+
`sap_payments.sap_payments_update_agent` with the intended replacement fields
|
|
197
|
+
and `confirm: true`; use it for public agent image/profile metadata updates via
|
|
198
|
+
`agentUri` or `metadataUri`. For Escrow V2, call the matching
|
|
199
|
+
`sap_escrow_build_*_transaction` hosted builder and finalize with
|
|
200
|
+
`sap_payments_finalize_transaction`. For other direct writes, do not retry the
|
|
201
|
+
same hosted tool; use the local SAP MCP profile or an unsigned hosted builder
|
|
202
|
+
plus `sap_payments_finalize_transaction` when one exists.
|
|
203
|
+
|
|
204
|
+
For registry lifecycle completion, do not treat a transaction signature alone
|
|
205
|
+
as enough. After `sap_payments_register_agent`, verify `success`,
|
|
206
|
+
`agentRegistered`, `agentPda`, `confirmationStatus`, `protocolComplete`, and
|
|
207
|
+
the returned `protocolFee.status`. `success: true` means both the agent account
|
|
208
|
+
and protocol fee invariant were verified. If `success` is false while
|
|
209
|
+
`agentRegistered` is true, report that the account may exist but the SAP
|
|
210
|
+
protocol registration lifecycle is not complete. After
|
|
211
|
+
`sap_payments_update_agent`, fetch the agent again and confirm the changed
|
|
212
|
+
fields before saying an image, metadata, pricing, or capability update is done.
|
|
213
|
+
|
|
214
|
+
Before any write-like operation, use this routing order:
|
|
215
|
+
|
|
216
|
+
1. Hosted read or paid hosted read: direct hosted tool, or
|
|
217
|
+
`sap_payments_call_paid_tool` when x402 is required.
|
|
218
|
+
2. Hosted unsigned transaction builder: finalize with
|
|
219
|
+
`sap_payments_finalize_transaction` and `submit: true` when the user confirms.
|
|
220
|
+
3. SAP registry registration/update: use `sap_payments_register_agent` or
|
|
221
|
+
`sap_payments_update_agent`; do not retry hosted accountless writes.
|
|
222
|
+
4. External x402 HTTP provider: use `sap_payments_call_external_x402`.
|
|
223
|
+
5. Missing bridge: call `sap_runtime_repair_plan`, then tell the user to run the
|
|
224
|
+
pinned repair command or desktop wizard repair path.
|
|
186
225
|
|
|
187
226
|
When summarizing a hosted connection, use language like:
|
|
188
227
|
"server is non-custodial; user signatures come from the local SAP profile or
|
|
@@ -204,6 +243,18 @@ call `sap_runtime_repair_plan`. Do not ask the user to manually rebuild their
|
|
|
204
243
|
runtime config unless the repair plan has already failed or runtime startup logs
|
|
205
244
|
show a concrete package/runtime error.
|
|
206
245
|
|
|
246
|
+
For agent identity work, load the matching focused skills before acting:
|
|
247
|
+
|
|
248
|
+
- register, update, profile image, capability, pricing, or x402 endpoint:
|
|
249
|
+
`sap-agent-registry`
|
|
250
|
+
- NFT-backed identity, MPL Core, Metaplex metadata, creator/collection flows:
|
|
251
|
+
`sap-nft-metaplex`
|
|
252
|
+
- `.sol` domain ownership, records, or primary identity:
|
|
253
|
+
`sap-sns`
|
|
254
|
+
|
|
255
|
+
The canonical field and pipeline reference is
|
|
256
|
+
`docs/16_SAP_AGENT_IDENTITY_PIPELINE.md`. Follow it before registry writes.
|
|
257
|
+
|
|
207
258
|
## Profile Tools
|
|
208
259
|
|
|
209
260
|
| Tool | Purpose |
|
|
@@ -37,7 +37,7 @@ Profile, config, runtime context, and raw transaction lifecycle:
|
|
|
37
37
|
|
|
38
38
|
SAP registry and discovery:
|
|
39
39
|
|
|
40
|
-
`sap_register_agent`, `sap_update_agent`, `sap_deactivate_agent`,
|
|
40
|
+
`sap_protocol_invariants`, `sap_agent_identity_plan`, `sap_register_agent`, `sap_update_agent`, `sap_deactivate_agent`,
|
|
41
41
|
`sap_reactivate_agent`, `sap_close_agent`, `sap_get_agent`,
|
|
42
42
|
`sap_get_agent_profile`, `sap_get_agent_stats`, `sap_get_global_state`,
|
|
43
43
|
`sap_get_network_overview`, `sap_discover_agents`, `sap_list_agents`,
|
|
@@ -56,6 +56,14 @@ a list of all agents in the SAP ecosystem rn"; start with a small `limit` and
|
|
|
56
56
|
continue with `pagination.nextCursor`. If a capability lookup returns zero,
|
|
57
57
|
retry with `query` or `wallet` before reporting that the agent is absent.
|
|
58
58
|
|
|
59
|
+
Use `sap_protocol_invariants` before registry writes when the program id,
|
|
60
|
+
protocol treasury, source-level 0.1 SOL registration fee invariant, hosted
|
|
61
|
+
write route, or local signer route is unclear. Use `sap_agent_identity_plan`
|
|
62
|
+
before registration,
|
|
63
|
+
profile/image updates, Metaplex identity bridging, SNS linking, or x402
|
|
64
|
+
endpoint publishing. It is a free planner and should run before any local
|
|
65
|
+
signer write.
|
|
66
|
+
|
|
59
67
|
SAP memory and sessions:
|
|
60
68
|
|
|
61
69
|
`sap_init_vault`, `sap_fetch_vault`, `sap_open_vault_session`,
|
|
@@ -75,6 +83,12 @@ SAP payments, x402, subscriptions, Escrow V2, settlement, disputes, staking:
|
|
|
75
83
|
`sap_x402_prepare_payment`, `sap_x402_get_balance`,
|
|
76
84
|
`sap_create_subscription`, `sap_fund_subscription`,
|
|
77
85
|
`sap_cancel_subscription`, `sap_fetch_subscription`,
|
|
86
|
+
`sap_escrow_build_create_transaction`,
|
|
87
|
+
`sap_escrow_build_deposit_transaction`,
|
|
88
|
+
`sap_escrow_build_settle_transaction`,
|
|
89
|
+
`sap_escrow_build_finalize_transaction`,
|
|
90
|
+
`sap_escrow_build_withdraw_transaction`,
|
|
91
|
+
`sap_escrow_build_close_transaction`,
|
|
78
92
|
`sap_create_escrow_v2`, `sap_deposit_escrow_v2`,
|
|
79
93
|
`sap_settle_escrow_v2`, `sap_finalize_settlement_v2`,
|
|
80
94
|
`sap_file_dispute_v2`, `sap_withdraw_escrow_v2`, `sap_close_escrow_v2`,
|
|
@@ -86,6 +100,13 @@ SAP payments, x402, subscriptions, Escrow V2, settlement, disputes, staking:
|
|
|
86
100
|
Use `sap_fetch_escrow` only for legacy read-only inspection. V1 escrow write
|
|
87
101
|
tools are not part of the active SAP MCP surface.
|
|
88
102
|
|
|
103
|
+
In hosted mode, prefer `sap_escrow_build_*_transaction` for Escrow V2 writes
|
|
104
|
+
and finalize the returned unsigned transaction locally with
|
|
105
|
+
`sap_payments_finalize_transaction`. Use direct `sap_create_escrow_v2`,
|
|
106
|
+
`sap_deposit_escrow_v2`, `sap_settle_escrow_v2`,
|
|
107
|
+
`sap_finalize_settlement_v2`, `sap_withdraw_escrow_v2`, and
|
|
108
|
+
`sap_close_escrow_v2` only when running a local SAP MCP profile with a signer.
|
|
109
|
+
|
|
89
110
|
## `sap-sns`
|
|
90
111
|
|
|
91
112
|
SAP SNS and direct SNS domain workflows:
|
|
@@ -32,6 +32,28 @@ flows.
|
|
|
32
32
|
2. Validate collection, creator, metadata URI, royalties, and authority.
|
|
33
33
|
3. Preview transaction-producing outputs before signing.
|
|
34
34
|
|
|
35
|
+
## SAP Bridged Identity
|
|
36
|
+
|
|
37
|
+
When the user wants an SAP agent picture, NFT-backed identity, MPL Core asset,
|
|
38
|
+
or Metaplex-linked profile:
|
|
39
|
+
|
|
40
|
+
1. Publish the image and metadata to a public URI. Desktop file paths are never
|
|
41
|
+
valid on-chain metadata.
|
|
42
|
+
2. If creating a Metaplex NFT/MPL Core identity asset, mint or update that asset
|
|
43
|
+
with the same public metadata and keep the owner/authority clear.
|
|
44
|
+
3. Register or update the SAP agent with `metadataUri`/`agentUri` pointing to
|
|
45
|
+
the public metadata document or profile page.
|
|
46
|
+
4. In the metadata JSON, include a `metaplex` object with the asset or
|
|
47
|
+
collection address when available.
|
|
48
|
+
5. Hosted users must use local `sap_payments_register_agent` or
|
|
49
|
+
`sap_payments_update_agent` for SAP registry writes. Do not call hosted
|
|
50
|
+
`sap_register_agent` or hosted `sap_update_agent` after
|
|
51
|
+
`hosted_local_signer_required`.
|
|
52
|
+
|
|
53
|
+
Load `sap-agent-registry` together with this skill when the user says “register
|
|
54
|
+
my agent”, “add my picture”, “link my NFT identity”, or “bridge SAP with
|
|
55
|
+
Metaplex”.
|
|
56
|
+
|
|
35
57
|
## Safety
|
|
36
58
|
|
|
37
59
|
Minting, listing, buying, authority changes, and metadata updates are high-risk.
|
|
@@ -19,6 +19,8 @@ This skill corresponds to upstream SAP SDK v1.0.x domains such as
|
|
|
19
19
|
|
|
20
20
|
Use:
|
|
21
21
|
|
|
22
|
+
- `sap_protocol_invariants`
|
|
23
|
+
- `sap_agent_identity_plan`
|
|
22
24
|
- `sap_register_agent`
|
|
23
25
|
- `sap_update_agent`
|
|
24
26
|
- `sap_deactivate_agent`
|
|
@@ -35,6 +37,21 @@ Use `sap_discover_agents` for targeted hosted directory reads by `query`,
|
|
|
35
37
|
`hasX402Endpoint`. Use `sap_list_all_agents` for global current ecosystem
|
|
36
38
|
requests, keep pages small, and continue with `pagination.nextCursor`.
|
|
37
39
|
|
|
40
|
+
Before registering or updating an agent profile, call free
|
|
41
|
+
`sap_protocol_invariants` when treasury, registration fee, hosted write route,
|
|
42
|
+
or local signer route is unclear. Then call `sap_agent_identity_plan`. The
|
|
43
|
+
planner tells the agent which fields are missing, whether the action should use
|
|
44
|
+
hosted reads or local signing, whether Metaplex or SNS identity is involved,
|
|
45
|
+
and how to verify the write afterward.
|
|
46
|
+
|
|
47
|
+
Hosted accountless SAP MCP cannot sign wallet-owned registry writes. If hosted
|
|
48
|
+
`sap_register_agent` or `sap_update_agent` returns
|
|
49
|
+
`hosted_local_signer_required`, do not retry the hosted write. Use local
|
|
50
|
+
`sap_payments_register_agent` or `sap_payments_update_agent` with
|
|
51
|
+
`confirm: true`. After registration, verify `success`, `agentPda`,
|
|
52
|
+
`confirmationStatus`, and `protocolFee.status`; after update, fetch the agent
|
|
53
|
+
profile again and compare the changed fields.
|
|
54
|
+
|
|
38
55
|
## Memory
|
|
39
56
|
|
|
40
57
|
Use:
|
|
@@ -11,6 +11,7 @@ workflows, and hosted SAP MCP x402/pay.sh monetization.
|
|
|
11
11
|
- `sap_payments_call_paid_tool`
|
|
12
12
|
- `sap_payments_call_external_x402`
|
|
13
13
|
- `sap_payments_register_agent`
|
|
14
|
+
- `sap_payments_update_agent`
|
|
14
15
|
- `sap_payments_finalize_transaction`
|
|
15
16
|
- `sap_payments_prepare_challenge`
|
|
16
17
|
- `sap_payments_sign_challenge`
|
|
@@ -98,12 +99,42 @@ accountless by design and cannot sign user-owned registry writes. Call local
|
|
|
98
99
|
`sap_payments_register_agent` with the same registration fields and
|
|
99
100
|
`confirm: true`; it uses the active local SAP MCP profile signer, submits the
|
|
100
101
|
SAP registry transaction locally, and does not charge a hosted x402 access fee.
|
|
102
|
+
After it returns, verify `success`, `agentRegistered`, `confirmationStatus`,
|
|
103
|
+
`agentPda`, `protocolComplete`, and `protocolFee.status`. The expected protocol
|
|
104
|
+
fee is `100000000` lamports to treasury
|
|
105
|
+
`J7PyZAGKvprCz4SQ5DKBLAHstJxgVqZcz6kguUoWpP7P`. `success: true` means the agent
|
|
106
|
+
account and protocol fee invariant were both verified. If `success` is false
|
|
107
|
+
while `agentRegistered` is true, the account may exist but registration is not
|
|
108
|
+
SAP protocol-complete; report that state and do not retry automatically.
|
|
109
|
+
|
|
110
|
+
For hosted-user SAP agent profile updates, do not retry hosted
|
|
111
|
+
`sap_update_agent` after `hosted_local_signer_required`. Call local
|
|
112
|
+
`sap_payments_update_agent` with the intended replacement fields and
|
|
113
|
+
`confirm: true`; it signs locally and does not charge a hosted x402 access fee.
|
|
114
|
+
Use this for agent picture/profile metadata by first uploading the image or
|
|
115
|
+
metadata JSON to a public URI such as IPFS, Arweave, Kommodo, or HTTPS, then
|
|
116
|
+
setting `agentUri` or `metadataUri`. Do not use desktop file paths.
|
|
117
|
+
After update, fetch the agent profile again and verify the changed fields.
|
|
101
118
|
|
|
102
119
|
If the hosted paid tool returns `transactionBase64`, `transaction`, or an
|
|
103
120
|
unsigned transaction object, call `sap_payments_finalize_transaction` with
|
|
104
121
|
`confirm: true`. Set `submit: false` for preview/sign only, or `submit: true`
|
|
105
|
-
after the user approves execution.
|
|
106
|
-
|
|
122
|
+
after the user approves execution. With `submit: true`, the bridge submits
|
|
123
|
+
already-signed bytes through `https://mcp.sap.oobeprotocol.ai/tx/submit` by
|
|
124
|
+
default and returns `confirmationStatus` plus `retrySafe`. Treat
|
|
125
|
+
`expired_or_not_landed` as unresolved, not success. Never create temporary
|
|
126
|
+
signing scripts, read keypair JSON, or call hosted `sap_sign_transaction` for
|
|
127
|
+
user-owned signatures.
|
|
128
|
+
|
|
129
|
+
For Escrow V2 hosted workflows, use the unsigned builder family first:
|
|
130
|
+
`sap_escrow_build_create_transaction`,
|
|
131
|
+
`sap_escrow_build_deposit_transaction`,
|
|
132
|
+
`sap_escrow_build_settle_transaction`,
|
|
133
|
+
`sap_escrow_build_finalize_transaction`,
|
|
134
|
+
`sap_escrow_build_withdraw_transaction`, or
|
|
135
|
+
`sap_escrow_build_close_transaction`, then finalize locally with
|
|
136
|
+
`sap_payments_finalize_transaction`. Use direct escrow write tools only when a
|
|
137
|
+
local SAP MCP profile with signer is the selected runtime.
|
|
107
138
|
|
|
108
139
|
Use low-level helpers only for custom clients:
|
|
109
140
|
|
package/skills/sap-sns/SKILL.md
CHANGED
|
@@ -17,6 +17,8 @@ This skill is adapted from upstream `sns-skill` plus SAP MCP's
|
|
|
17
17
|
`sap_payments_finalize_transaction`.
|
|
18
18
|
6. Register domains directly only from a local SAP MCP profile using
|
|
19
19
|
`sap_sns_register_agent_domain` after explicit user confirmation.
|
|
20
|
+
7. After SNS ownership or records are ready, update the SAP agent metadata with
|
|
21
|
+
`sap_payments_update_agent` so `metadataUri` references the `.sol` identity.
|
|
20
22
|
|
|
21
23
|
Hosted accountless SAP MCP cannot register a .sol domain directly because the
|
|
22
24
|
purchase requires the user wallet signature. If a hosted direct registration is
|
|
@@ -48,9 +50,24 @@ to the local profile flow instead of retrying the hosted write.
|
|
|
48
50
|
|
|
49
51
|
- Never assume mainnet/devnet; read the profile RPC first.
|
|
50
52
|
- Never read the local wallet file.
|
|
53
|
+
- `sap_sns_check_ownership` canonical field is `owner`; `wallet` is accepted as
|
|
54
|
+
an alias for agent ergonomics.
|
|
51
55
|
- Prefer build/preview/sign flows over direct register flows when the user
|
|
52
56
|
needs to review transaction details.
|
|
53
57
|
- Do not claim `sap_sns_build_register_domain_transaction` exists unless it is
|
|
54
58
|
returned by `tools/list`.
|
|
55
59
|
- Do not route hosted direct registration through x402; hosted accountless
|
|
56
60
|
servers reject local-signer writes before payment.
|
|
61
|
+
|
|
62
|
+
## SAP Agent Identity Link
|
|
63
|
+
|
|
64
|
+
For “use my .sol as my SAP identity”:
|
|
65
|
+
|
|
66
|
+
1. Resolve or check ownership with `sap_sns_resolve_wallet` and
|
|
67
|
+
`sap_sns_check_ownership`.
|
|
68
|
+
2. If a record must change from hosted mode, build the unsigned record
|
|
69
|
+
transaction and finalize with `sap_payments_finalize_transaction`.
|
|
70
|
+
3. Update the agent metadata JSON to include:
|
|
71
|
+
`{ "sns": { "domain": "name.sol" } }`.
|
|
72
|
+
4. Call local `sap_payments_update_agent` with the public `metadataUri` and
|
|
73
|
+
`confirm: true`.
|
|
@@ -54,6 +54,13 @@
|
|
|
54
54
|
"description": "Copy this command into a local terminal when paid/write tools should work from a non-custodial user profile.",
|
|
55
55
|
"const": "npm exec --yes --package @oobe-protocol-labs/sap-mcp-server -- sap-mcp-config wizard",
|
|
56
56
|
"default": "npm exec --yes --package @oobe-protocol-labs/sap-mcp-server -- sap-mcp-config wizard"
|
|
57
|
+
},
|
|
58
|
+
"submitRelayUrl": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"title": "Signed transaction submit relay",
|
|
61
|
+
"description": "Optional submit-only relay for already-signed Solana transactions returned by local sap_payments_finalize_transaction. The relay never signs and never receives keypair bytes.",
|
|
62
|
+
"const": "https://mcp.sap.oobeprotocol.ai/tx/submit",
|
|
63
|
+
"default": "https://mcp.sap.oobeprotocol.ai/tx/submit"
|
|
57
64
|
}
|
|
58
65
|
}
|
|
59
66
|
}
|