@oobe-protocol-labs/sap-mcp-server 0.9.15 → 0.9.16

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/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.15",
6
+ "version": "0.9.16",
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.15",
32
+ "version": "0.9.16",
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.15"
48
+ "value": "@oobe-protocol-labs/sap-mcp-server@0.9.16"
49
49
  },
50
50
  {
51
51
  "type": "positional",
package/skills/README.md CHANGED
@@ -55,12 +55,20 @@ or wants to compare this bundled MCP skill pack with the source SDK skills:
55
55
  ## Agent Behavior
56
56
 
57
57
  - Answer in the same natural language as the user's latest request.
58
+ - Use free exact/base SAP reads before paid discovery when possible:
59
+ `sap_agent_context`, `sap_get_agent`, `sap_get_agent_profile`,
60
+ `sap_get_agent_stats`, `sap_is_agent_active`, `sap_get_global_state`, and
61
+ compact `sap_list_agents` pages with `limit <= 20`.
58
62
  - Use `sap_discover_agents` for targeted hosted agent search by query, wallet,
59
63
  PDA, protocol, capability, capability list, or x402 endpoint presence.
60
- - Use `sap_list_all_agents` for current global SAP ecosystem agent lists and
61
- continue with `pagination.nextCursor` when more pages are needed.
64
+ - Use `sap_list_all_agents` for current global SAP ecosystem agent lists only
65
+ when the user needs more than the free compact orientation page, and continue
66
+ with `pagination.nextCursor` when more pages are needed.
62
67
  - Treat `mcp_sap_<tool>` as a client display prefix; the callable MCP tool name
63
68
  inside this server is the suffix, for example `jupiter_getQuote`.
69
+ - Call `sap_agent_next_action` before retrying after `payment_required`,
70
+ `hosted_local_signer_required`, transient Solana RPC errors, a missing local
71
+ bridge, or a submitted signature that has not confirmed.
64
72
  - Use `skills/sap-mcp/TOOL_REFERENCE.md` and `USER_DOCS/05_SKILLS_AND_TOOLS.md`
65
73
  as the bundled routing maps when deciding which SAP MCP tool or skill domain
66
74
  applies to a user request.
@@ -12,10 +12,16 @@ state, global directory listing, and agent profile inspection.
12
12
  full identity setup, call `sap_agent_identity_plan` before any write. It is
13
13
  free and returns normalized fields, local-signer routing, metadata contract,
14
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
17
- `capability` for targeted paid hosted directory reads.
18
- 6. Use `sap_list_all_agents` for global current agent lists and follow
15
+ 4. Use free exact/base reads before paid discovery: `sap_agent_context`,
16
+ `sap_get_agent`,
17
+ `sap_get_agent_profile`, `sap_get_agent_stats`, `sap_is_agent_active`,
18
+ `sap_get_global_state`, and `sap_list_agents` with `limit <= 20`,
19
+ `view: "compact"`, and `includeProtocolIndexes: false`.
20
+ 5. Call `sap_get_network_overview` for ecosystem counters when needed.
21
+ 6. Use `sap_discover_agents` with `query`, `wallet`, `protocol`, or
22
+ `capability` for targeted paid hosted directory reads when free exact/base
23
+ reads are not enough.
24
+ 7. Use `sap_list_all_agents` for global current agent lists and follow
19
25
  `pagination.nextCursor` for additional pages.
20
26
 
21
27
  ## Tools
@@ -23,6 +29,8 @@ state, global directory listing, and agent profile inspection.
23
29
  - `sap_register_agent`
24
30
  - `sap_protocol_invariants`
25
31
  - `sap_agent_identity_plan`
32
+ - `sap_agent_context`
33
+ - `sap_agent_next_action`
26
34
  - `sap_update_agent`
27
35
  - `sap_deactivate_agent`
28
36
  - `sap_reactivate_agent`
@@ -32,6 +40,7 @@ state, global directory listing, and agent profile inspection.
32
40
  - `sap_get_agent_stats`
33
41
  - `sap_get_global_state`
34
42
  - `sap_get_network_overview`
43
+ - `sap_list_agents`
35
44
  - `sap_list_all_agents`
36
45
  - `sap_is_agent_active`
37
46
  - `sap_report_calls`
@@ -50,6 +59,10 @@ state, global directory listing, and agent profile inspection.
50
59
  `confirm: true`. For other registry writes, run the write on the local SAP
51
60
  MCP profile or use a production unsigned builder/finalizer flow when
52
61
  available.
62
+ - Before any retry after `payment_required`, `hosted_local_signer_required`,
63
+ `BlockhashNotFound`, timeout, missing `sap_payments`, or a submitted
64
+ signature that did not confirm, call `sap_agent_next_action`. Follow its
65
+ `safeToRetryNow`, `nextTool`, and `forbiddenActions` fields.
53
66
  - Agent pictures must be public metadata, not desktop file paths. Upload the
54
67
  image or metadata JSON to IPFS, Arweave, Kommodo, or HTTPS, then set
55
68
  `agentUri`/`metadataUri` with `sap_payments_update_agent`.
@@ -71,8 +84,10 @@ state, global directory listing, and agent profile inspection.
71
84
  `query`.
72
85
  - "Find x402 agents" means `sap_discover_agents` with
73
86
  `hasX402Endpoint: true`.
74
- - "List all agents" means `sap_list_all_agents` with a small `limit`, then
75
- `pagination.nextCursor` if the user wants more.
87
+ - "List all agents" means first call free `sap_list_agents` with
88
+ `limit <= 20`, `view: "compact"`, and `includeProtocolIndexes: false`; then
89
+ use paid `sap_list_all_agents` with `pagination.nextCursor` if the user wants
90
+ more, full rows, or ecosystem-scale enumeration.
76
91
  - "Agent by wallet" means `sap_get_agent` or `sap_get_agent_profile`.
77
92
  - "Is this agent live?" means `sap_is_agent_active`.
78
93
  - "Network totals" means `sap_get_network_overview`.
@@ -18,12 +18,21 @@ indexes, and filtered agent discovery.
18
18
 
19
19
  ## Rules
20
20
 
21
+ - Start with free orientation when possible:
22
+ - `sap_agent_context` for a one-shot compact context read and routing hints.
23
+ - `sap_get_agent` or `sap_get_agent_profile` for a known owner wallet.
24
+ - `sap_is_agent_active` for a known owner wallet status check.
25
+ - `sap_get_global_state` for compact registry state.
26
+ - `sap_list_agents` with `limit <= 20`, `view: "compact"`, and
27
+ `includeProtocolIndexes: false` for a small current directory page.
21
28
  - Use `sap_discover_agents` for paid hosted agent directory search. It supports
22
29
  `query`, `wallet`, `agentPda`, `protocol`, `capability`, `capabilities`,
23
30
  `capabilityMode`, `hasX402Endpoint`, `limit`, `cursor`, and `view`.
24
31
  - Use `sap_list_all_agents` for global directory requests or when the user asks
25
32
  for the whole SAP ecosystem. Keep the first page small and follow
26
33
  `pagination.nextCursor` only when the previous page is useful.
34
+ - Use paid discovery only when the user needs search, enrichment, full rows,
35
+ large pages, analytics, or global enumeration beyond the free compact page.
27
36
  - Prefer exact filters before broad scans: `wallet` when a wallet is known,
28
37
  `query` for an agent name such as `XONA`, and `capability` for one exact
29
38
  capability such as `creative:imageGeneration`.
@@ -34,6 +43,8 @@ indexes, and filtered agent discovery.
34
43
  the canonical AgentAccount directory.
35
44
  - Do not guess that global enumeration is impossible; try `sap_list_all_agents`
36
45
  first and report the exact failure if it fails.
46
+ - If discovery hits `payment_required`, a transient RPC error, or a missing
47
+ local bridge, call `sap_agent_next_action` before retrying or changing route.
37
48
 
38
49
  ## Common Inputs
39
50
 
@@ -16,16 +16,18 @@ Always inspect runtime context through MCP tools, not by reading config files:
16
16
 
17
17
  1. `sap_agent_start`
18
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`
19
+ 3. `sap_agent_context` for free compact agent/directory orientation before paid discovery
20
+ 4. `sap_skills_bundle` with `includeContents: true`
21
+ 5. `sap_pricing_catalog` before estimating hosted paid call tiers
22
+ 6. `sap_agent_next_action` before retrying after any SAP MCP error or partial write result
23
+ 7. `sap_skills_upgrade_plan` when local skills are missing or stale
24
+ 8. `sap_runtime_repair_plan` when hosted tools are connected but `sap_payments` is missing
25
+ 9. `sap_protocol_invariants` before SAP registry writes or when treasury, protocol fee, hosted write routing, or local signer routing is unclear
26
+ 10. `sap_agent_identity_plan` before agent registration, profile-image updates, Metaplex identity, SNS linking, or full identity setup
27
+ 11. `sap_profile_current`
28
+ 12. `sap_profile_list`
29
+ 13. `sap_profile_public_key`
30
+ 14. `sap_network_stats`
29
31
 
30
32
  For simple "are you connected?" checks, do not dump tool counts or inspect
31
33
  local files. Use `sap_agent_runtime_status` first and answer with the hosted
@@ -45,6 +47,11 @@ and error strings unchanged.
45
47
 
46
48
  ## Discovery Rules
47
49
 
50
+ - Use free exact/base reads first when the wallet, PDA, or a small orientation
51
+ page is enough: `sap_agent_context`, `sap_get_agent`, `sap_get_agent_profile`,
52
+ `sap_get_agent_stats`, `sap_is_agent_active`, `sap_get_global_state`, and
53
+ `sap_list_agents` with `limit <= 20`, `view: "compact"`, and
54
+ `includeProtocolIndexes: false`.
48
55
  - Use `sap_get_network_overview` for live ecosystem counters.
49
56
  - Use `sap_discover_agents` for targeted paid hosted discovery. Prefer
50
57
  `query`, `wallet`, `agentPda`, `protocol`, `capability`, `capabilities`,
@@ -52,7 +59,9 @@ and error strings unchanged.
52
59
  - Use `sap_list_all_agents` when the user asks for all current SAP ecosystem
53
60
  agents. It performs global on-chain `AgentAccount` enumeration and returns
54
61
  `pagination.nextCursor` when more pages are available.
55
- - Use `sap_list_agents` as a compatibility alias for `sap_discover_agents`.
62
+ - Use `sap_list_agents` for a free compact orientation page first. Larger
63
+ pages, `view: "full"`, hydration, protocol index summaries, and global scans
64
+ are paid read-premium.
56
65
  - Use `sap_fetch_protocol_index` when a specific protocol ID is known.
57
66
  - If a capability lookup returns zero results, retry with `query` or `wallet`
58
67
  before saying an agent is absent. AgentAccount rows are canonical; indexes can
@@ -80,7 +89,8 @@ Use the bundled routing map for local MCP tool selection:
80
89
  - `USER_DOCS/05_SKILLS_AND_TOOLS.md`
81
90
 
82
91
  SAP MCP startup and skill bootstrap tools are free context/setup tools. Call
83
- `sap_agent_start`, `sap_agent_runtime_status`, `sap_pricing_catalog`,
92
+ `sap_agent_start`, `sap_agent_runtime_status`, `sap_agent_context`,
93
+ `sap_agent_next_action`, `sap_pricing_catalog`,
84
94
  `sap_skills_list`, `sap_skills_bundle`, `sap_skills_upgrade_plan`,
85
95
  `sap_runtime_repair_plan`, and local `sap_skills_install` directly. Do not
86
96
  route startup, runtime status, pricing catalog, skill listing, bundling,
@@ -49,12 +49,22 @@ SAP registry and discovery:
49
49
  `sap_deactivate_tool`, `sap_reactivate_tool`,
50
50
  `sap_report_tool_invocations`, `sap_report_calls`.
51
51
 
52
- Use `sap_discover_agents` for targeted paid hosted agent search by `query`,
53
- `wallet`, `agentPda`, `protocol`, `capability`, `capabilities`, or
54
- `hasX402Endpoint`. Use `sap_list_all_agents` for user requests such as "give me
55
- a list of all agents in the SAP ecosystem rn"; start with a small `limit` and
56
- continue with `pagination.nextCursor`. If a capability lookup returns zero,
57
- retry with `query` or `wallet` before reporting that the agent is absent.
52
+ Use free exact/base reads before paid discovery when possible:
53
+ `sap_agent_context`, `sap_get_agent`, `sap_get_agent_profile`,
54
+ `sap_get_agent_stats`, `sap_is_agent_active`, `sap_get_global_state`, and
55
+ `sap_list_agents` with `limit <= 20`, `view: "compact"`, and
56
+ `includeProtocolIndexes: false`.
57
+ Use `sap_discover_agents` for targeted paid hosted search by `query`, `wallet`,
58
+ `agentPda`, `protocol`, `capability`, `capabilities`, or `hasX402Endpoint`.
59
+ Use paid `sap_list_all_agents` for user requests such as "give me a list of all
60
+ agents in the SAP ecosystem rn"; start with a small `limit` and continue with
61
+ `pagination.nextCursor`. If a capability lookup returns zero, retry with
62
+ `query` or `wallet` before reporting that the agent is absent.
63
+
64
+ Use `sap_agent_next_action` before retrying any SAP MCP error or partial write
65
+ result. It normalizes `payment_required`, `hosted_local_signer_required`,
66
+ transient Solana RPC failures, missing local bridge tools, and unconfirmed
67
+ submitted signatures into the next safe tool route.
58
68
 
59
69
  Use `sap_protocol_invariants` before registry writes when the program id,
60
70
  protocol treasury, source-level 0.1 SOL registration fee invariant, hosted
@@ -36,6 +36,12 @@ Use `sap_discover_agents` for targeted hosted directory reads by `query`,
36
36
  `wallet`, `agentPda`, `protocol`, `capability`, `capabilities`, or
37
37
  `hasX402Endpoint`. Use `sap_list_all_agents` for global current ecosystem
38
38
  requests, keep pages small, and continue with `pagination.nextCursor`.
39
+ For first-pass orientation, prefer free reads: `sap_agent_context`,
40
+ `sap_get_agent`, `sap_get_agent_profile`, `sap_get_agent_stats`,
41
+ `sap_is_agent_active`, `sap_get_global_state`, and `sap_list_agents` with `limit <= 20`,
42
+ `view: "compact"`, and `includeProtocolIndexes: false`. Use paid discovery
43
+ only when the user needs search, enrichment, full rows, large pages, analytics,
44
+ or global enumeration beyond the compact page.
39
45
 
40
46
  Before registering or updating an agent profile, call free
41
47
  `sap_protocol_invariants` when treasury, registration fee, hosted write route,
@@ -52,6 +58,11 @@ Hosted accountless SAP MCP cannot sign wallet-owned registry writes. If hosted
52
58
  `confirmationStatus`, and `protocolFee.status`; after update, fetch the agent
53
59
  profile again and compare the changed fields.
54
60
 
61
+ If any SAP operation returns `payment_required`, `hosted_local_signer_required`,
62
+ `BlockhashNotFound`, timeout, missing `sap_payments`, or a submitted signature
63
+ that did not confirm, call `sap_agent_next_action` before retrying. Follow its
64
+ `safeToRetryNow` and `nextTool` fields.
65
+
55
66
  ## Memory
56
67
 
57
68
  Use:
@@ -45,9 +45,12 @@ hosted calls still proceed through x402/pay.sh plus the user's local SAP profile
45
45
  or external signer.
46
46
 
47
47
  - Free: `tools/list`, `prompts/list`, `resources/list`, `sap_profile_current`,
48
- `sap_get_network_overview`, `sol_get_balance`, `spl-token_getBalance`, and
49
- `spl-token_getTokenAccounts`.
50
- - Read premium: `sap_list_all_agents`, indexed discovery, network stats,
48
+ `sap_agent_start`, `sap_agent_runtime_status`, `sap_agent_context`,
49
+ `sap_agent_next_action`, exact SAP agent/profile reads, compact
50
+ `sap_list_agents` pages with `limit <= 20`, `sap_get_network_overview`, `sol_get_balance`,
51
+ `spl-token_getBalance`, and `spl-token_getTokenAccounts`.
52
+ - Read premium: `sap_discover_agents`, `sap_list_all_agents`, full/enriched or
53
+ large `sap_list_agents` pages, indexed discovery, network stats,
51
54
  protocol/capability indexes.
52
55
  - Builder: batch SNS/domain checks, analytics, transaction builders.
53
56
  - Value action: fixed fee plus configured basis-points fee when public USD
@@ -58,6 +61,11 @@ instructions, create a payment, retry with `PAYMENT-SIGNATURE`, and capture
58
61
  `PAYMENT-RESPONSE` after settlement. If a `payShCheckoutUrl` is present, surface
59
62
  it for browser/manual checkout flows.
60
63
 
64
+ Before retrying `payment_required`, `hosted_local_signer_required`,
65
+ `BlockhashNotFound`, timeout, missing `sap_payments`, or an unconfirmed
66
+ signature, call `sap_agent_next_action`. Use its `safeToRetryNow`, `nextTool`,
67
+ and `paymentCharged` fields as the retry guard.
68
+
61
69
  For fast x402 execution:
62
70
 
63
71
  1. Reuse the MCP session returned by `initialize`.