@oobe-protocol-labs/sap-mcp-server 0.1.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/.env.example +159 -0
- package/CHANGELOG.md +55 -0
- package/LICENSE +21 -0
- package/README.md +223 -0
- package/config.example.json +64 -0
- package/config.schema.json +370 -0
- package/config.secure-example.json +100 -0
- package/dist/adapters/index.d.ts +6 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +6 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/mcp/errors.d.ts +7 -0
- package/dist/adapters/mcp/errors.d.ts.map +1 -0
- package/dist/adapters/mcp/errors.js +10 -0
- package/dist/adapters/mcp/errors.js.map +1 -0
- package/dist/adapters/mcp/index.d.ts +8 -0
- package/dist/adapters/mcp/index.d.ts.map +1 -0
- package/dist/adapters/mcp/index.js +8 -0
- package/dist/adapters/mcp/index.js.map +1 -0
- package/dist/adapters/mcp/prompt-response.d.ts +13 -0
- package/dist/adapters/mcp/prompt-response.d.ts.map +1 -0
- package/dist/adapters/mcp/prompt-response.js +7 -0
- package/dist/adapters/mcp/prompt-response.js.map +1 -0
- package/dist/adapters/mcp/resource-response.d.ts +8 -0
- package/dist/adapters/mcp/resource-response.d.ts.map +1 -0
- package/dist/adapters/mcp/resource-response.js +7 -0
- package/dist/adapters/mcp/resource-response.js.map +1 -0
- package/dist/adapters/mcp/sdk-compat.d.ts +191 -0
- package/dist/adapters/mcp/sdk-compat.d.ts.map +1 -0
- package/dist/adapters/mcp/sdk-compat.js +606 -0
- package/dist/adapters/mcp/sdk-compat.js.map +1 -0
- package/dist/adapters/mcp/tool-response.d.ts +32 -0
- package/dist/adapters/mcp/tool-response.d.ts.map +1 -0
- package/dist/adapters/mcp/tool-response.js +27 -0
- package/dist/adapters/mcp/tool-response.js.map +1 -0
- package/dist/adapters/solana/commitment.d.ts +9 -0
- package/dist/adapters/solana/commitment.d.ts.map +1 -0
- package/dist/adapters/solana/commitment.js +14 -0
- package/dist/adapters/solana/commitment.js.map +1 -0
- package/dist/adapters/solana/connection.d.ts +10 -0
- package/dist/adapters/solana/connection.d.ts.map +1 -0
- package/dist/adapters/solana/connection.js +13 -0
- package/dist/adapters/solana/connection.js.map +1 -0
- package/dist/adapters/solana/index.d.ts +7 -0
- package/dist/adapters/solana/index.d.ts.map +1 -0
- package/dist/adapters/solana/index.js +7 -0
- package/dist/adapters/solana/index.js.map +1 -0
- package/dist/adapters/solana/public-key.d.ts +9 -0
- package/dist/adapters/solana/public-key.d.ts.map +1 -0
- package/dist/adapters/solana/public-key.js +11 -0
- package/dist/adapters/solana/public-key.js.map +1 -0
- package/dist/cli.d.ts +29 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +269 -0
- package/dist/cli.js.map +1 -0
- package/dist/config/defaults.d.ts +28 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +28 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/env.d.ts +297 -0
- package/dist/config/env.d.ts.map +1 -0
- package/dist/config/env.js +563 -0
- package/dist/config/env.js.map +1 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +7 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/mcp-client-injection.d.ts +113 -0
- package/dist/config/mcp-client-injection.d.ts.map +1 -0
- package/dist/config/mcp-client-injection.js +453 -0
- package/dist/config/mcp-client-injection.js.map +1 -0
- package/dist/config/paths.d.ts +37 -0
- package/dist/config/paths.d.ts.map +1 -0
- package/dist/config/paths.js +93 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/config/profiles.d.ts +85 -0
- package/dist/config/profiles.d.ts.map +1 -0
- package/dist/config/profiles.js +346 -0
- package/dist/config/profiles.js.map +1 -0
- package/dist/config/schema.d.ts +9 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +8 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/secure-config.d.ts +607 -0
- package/dist/config/secure-config.d.ts.map +1 -0
- package/dist/config/secure-config.js +526 -0
- package/dist/config/secure-config.js.map +1 -0
- package/dist/config/setup.d.ts +42 -0
- package/dist/config/setup.d.ts.map +1 -0
- package/dist/config/setup.js +173 -0
- package/dist/config/setup.js.map +1 -0
- package/dist/config/wizard.d.ts +15 -0
- package/dist/config/wizard.d.ts.map +1 -0
- package/dist/config/wizard.js +1176 -0
- package/dist/config/wizard.js.map +1 -0
- package/dist/config-cli.d.ts +21 -0
- package/dist/config-cli.d.ts.map +1 -0
- package/dist/config-cli.js +679 -0
- package/dist/config-cli.js.map +1 -0
- package/dist/core/constants.d.ts +78 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +78 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/errors.d.ts +188 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +337 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/guards.d.ts +41 -0
- package/dist/core/guards.d.ts.map +1 -0
- package/dist/core/guards.js +93 -0
- package/dist/core/guards.js.map +1 -0
- package/dist/core/index.d.ts +11 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +10 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/logger.d.ts +64 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +159 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/result.d.ts +49 -0
- package/dist/core/result.d.ts.map +1 -0
- package/dist/core/result.js +61 -0
- package/dist/core/result.js.map +1 -0
- package/dist/core/types.d.ts +147 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +8 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/payments/http-adapter.d.ts +76 -0
- package/dist/payments/http-adapter.d.ts.map +1 -0
- package/dist/payments/http-adapter.js +126 -0
- package/dist/payments/http-adapter.js.map +1 -0
- package/dist/payments/index.d.ts +12 -0
- package/dist/payments/index.d.ts.map +1 -0
- package/dist/payments/index.js +9 -0
- package/dist/payments/index.js.map +1 -0
- package/dist/payments/json-rpc.d.ts +49 -0
- package/dist/payments/json-rpc.d.ts.map +1 -0
- package/dist/payments/json-rpc.js +53 -0
- package/dist/payments/json-rpc.js.map +1 -0
- package/dist/payments/monetization-gate.d.ts +49 -0
- package/dist/payments/monetization-gate.d.ts.map +1 -0
- package/dist/payments/monetization-gate.js +398 -0
- package/dist/payments/monetization-gate.js.map +1 -0
- package/dist/payments/oobe-facilitator-server.d.ts +71 -0
- package/dist/payments/oobe-facilitator-server.d.ts.map +1 -0
- package/dist/payments/oobe-facilitator-server.js +409 -0
- package/dist/payments/oobe-facilitator-server.js.map +1 -0
- package/dist/payments/pay-sh-spec.d.ts +44 -0
- package/dist/payments/pay-sh-spec.d.ts.map +1 -0
- package/dist/payments/pay-sh-spec.js +218 -0
- package/dist/payments/pay-sh-spec.js.map +1 -0
- package/dist/payments/pricing.d.ts +60 -0
- package/dist/payments/pricing.d.ts.map +1 -0
- package/dist/payments/pricing.js +272 -0
- package/dist/payments/pricing.js.map +1 -0
- package/dist/payments/usage-ledger.d.ts +84 -0
- package/dist/payments/usage-ledger.d.ts.map +1 -0
- package/dist/payments/usage-ledger.js +126 -0
- package/dist/payments/usage-ledger.js.map +1 -0
- package/dist/policy/bento-policy-engine.d.ts +71 -0
- package/dist/policy/bento-policy-engine.d.ts.map +1 -0
- package/dist/policy/bento-policy-engine.js +218 -0
- package/dist/policy/bento-policy-engine.js.map +1 -0
- package/dist/policy/default-policies.d.ts +9 -0
- package/dist/policy/default-policies.d.ts.map +1 -0
- package/dist/policy/default-policies.js +69 -0
- package/dist/policy/default-policies.js.map +1 -0
- package/dist/policy/hybrid-policy-engine.d.ts +95 -0
- package/dist/policy/hybrid-policy-engine.d.ts.map +1 -0
- package/dist/policy/hybrid-policy-engine.js +297 -0
- package/dist/policy/hybrid-policy-engine.js.map +1 -0
- package/dist/policy/index.d.ts +10 -0
- package/dist/policy/index.d.ts.map +1 -0
- package/dist/policy/index.js +10 -0
- package/dist/policy/index.js.map +1 -0
- package/dist/policy/local-policy-engine.d.ts +119 -0
- package/dist/policy/local-policy-engine.d.ts.map +1 -0
- package/dist/policy/local-policy-engine.js +318 -0
- package/dist/policy/local-policy-engine.js.map +1 -0
- package/dist/policy/permission-checks.d.ts +19 -0
- package/dist/policy/permission-checks.d.ts.map +1 -0
- package/dist/policy/permission-checks.js +60 -0
- package/dist/policy/permission-checks.js.map +1 -0
- package/dist/policy/policy-engine.d.ts +57 -0
- package/dist/policy/policy-engine.d.ts.map +1 -0
- package/dist/policy/policy-engine.js +162 -0
- package/dist/policy/policy-engine.js.map +1 -0
- package/dist/policy/policy-types.d.ts +46 -0
- package/dist/policy/policy-types.d.ts.map +1 -0
- package/dist/policy/policy-types.js +5 -0
- package/dist/policy/policy-types.js.map +1 -0
- package/dist/policy/risk-level.d.ts +18 -0
- package/dist/policy/risk-level.d.ts.map +1 -0
- package/dist/policy/risk-level.js +46 -0
- package/dist/policy/risk-level.js.map +1 -0
- package/dist/policy/spending-limits.d.ts +17 -0
- package/dist/policy/spending-limits.d.ts.map +1 -0
- package/dist/policy/spending-limits.js +40 -0
- package/dist/policy/spending-limits.js.map +1 -0
- package/dist/prompts/context/sap-agent-context.prompt.d.ts +64 -0
- package/dist/prompts/context/sap-agent-context.prompt.d.ts.map +1 -0
- package/dist/prompts/context/sap-agent-context.prompt.js +336 -0
- package/dist/prompts/context/sap-agent-context.prompt.js.map +1 -0
- package/dist/prompts/developer/debug-sap-error.prompt.d.ts +13 -0
- package/dist/prompts/developer/debug-sap-error.prompt.d.ts.map +1 -0
- package/dist/prompts/developer/debug-sap-error.prompt.js +78 -0
- package/dist/prompts/developer/debug-sap-error.prompt.js.map +1 -0
- package/dist/prompts/developer/generate-sap-integration.prompt.d.ts +13 -0
- package/dist/prompts/developer/generate-sap-integration.prompt.d.ts.map +1 -0
- package/dist/prompts/developer/generate-sap-integration.prompt.js +132 -0
- package/dist/prompts/developer/generate-sap-integration.prompt.js.map +1 -0
- package/dist/prompts/developer/index.d.ts +6 -0
- package/dist/prompts/developer/index.d.ts.map +1 -0
- package/dist/prompts/developer/index.js +6 -0
- package/dist/prompts/developer/index.js.map +1 -0
- package/dist/prompts/execution-proof/explain-proof-of-execution.prompt.d.ts +13 -0
- package/dist/prompts/execution-proof/explain-proof-of-execution.prompt.d.ts.map +1 -0
- package/dist/prompts/execution-proof/explain-proof-of-execution.prompt.js +97 -0
- package/dist/prompts/execution-proof/explain-proof-of-execution.prompt.js.map +1 -0
- package/dist/prompts/execution-proof/index.d.ts +6 -0
- package/dist/prompts/execution-proof/index.d.ts.map +1 -0
- package/dist/prompts/execution-proof/index.js +6 -0
- package/dist/prompts/execution-proof/index.js.map +1 -0
- package/dist/prompts/execution-proof/verify-execution-proof.prompt.d.ts +13 -0
- package/dist/prompts/execution-proof/verify-execution-proof.prompt.d.ts.map +1 -0
- package/dist/prompts/execution-proof/verify-execution-proof.prompt.js +95 -0
- package/dist/prompts/execution-proof/verify-execution-proof.prompt.js.map +1 -0
- package/dist/prompts/index.d.ts +5 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +5 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/payments/create-paid-api.prompt.d.ts +13 -0
- package/dist/prompts/payments/create-paid-api.prompt.d.ts.map +1 -0
- package/dist/prompts/payments/create-paid-api.prompt.js +142 -0
- package/dist/prompts/payments/create-paid-api.prompt.js.map +1 -0
- package/dist/prompts/payments/explain-x402-settlement.prompt.d.ts +13 -0
- package/dist/prompts/payments/explain-x402-settlement.prompt.d.ts.map +1 -0
- package/dist/prompts/payments/explain-x402-settlement.prompt.js +83 -0
- package/dist/prompts/payments/explain-x402-settlement.prompt.js.map +1 -0
- package/dist/prompts/payments/index.d.ts +6 -0
- package/dist/prompts/payments/index.d.ts.map +1 -0
- package/dist/prompts/payments/index.js +6 -0
- package/dist/prompts/payments/index.js.map +1 -0
- package/dist/prompts/register-prompts.d.ts +10 -0
- package/dist/prompts/register-prompts.d.ts.map +1 -0
- package/dist/prompts/register-prompts.js +40 -0
- package/dist/prompts/register-prompts.js.map +1 -0
- package/dist/prompts/registry/analyze-sap-agent.prompt.d.ts +13 -0
- package/dist/prompts/registry/analyze-sap-agent.prompt.d.ts.map +1 -0
- package/dist/prompts/registry/analyze-sap-agent.prompt.js +85 -0
- package/dist/prompts/registry/analyze-sap-agent.prompt.js.map +1 -0
- package/dist/prompts/registry/index.d.ts +6 -0
- package/dist/prompts/registry/index.d.ts.map +1 -0
- package/dist/prompts/registry/index.js +6 -0
- package/dist/prompts/registry/index.js.map +1 -0
- package/dist/prompts/registry/register-sap-agent.prompt.d.ts +13 -0
- package/dist/prompts/registry/register-sap-agent.prompt.d.ts.map +1 -0
- package/dist/prompts/registry/register-sap-agent.prompt.js +152 -0
- package/dist/prompts/registry/register-sap-agent.prompt.js.map +1 -0
- package/dist/remote/auth/index.d.ts +86 -0
- package/dist/remote/auth/index.d.ts.map +1 -0
- package/dist/remote/auth/index.js +152 -0
- package/dist/remote/auth/index.js.map +1 -0
- package/dist/remote/server.d.ts +140 -0
- package/dist/remote/server.d.ts.map +1 -0
- package/dist/remote/server.js +412 -0
- package/dist/remote/server.js.map +1 -0
- package/dist/resources/current/sap-current-config.resource.d.ts +30 -0
- package/dist/resources/current/sap-current-config.resource.d.ts.map +1 -0
- package/dist/resources/current/sap-current-config.resource.js +142 -0
- package/dist/resources/current/sap-current-config.resource.js.map +1 -0
- package/dist/resources/execution-proof/index.d.ts +5 -0
- package/dist/resources/execution-proof/index.d.ts.map +1 -0
- package/dist/resources/execution-proof/index.js +5 -0
- package/dist/resources/execution-proof/index.js.map +1 -0
- package/dist/resources/execution-proof/sap-execution-record.resource.d.ts +13 -0
- package/dist/resources/execution-proof/sap-execution-record.resource.d.ts.map +1 -0
- package/dist/resources/execution-proof/sap-execution-record.resource.js +75 -0
- package/dist/resources/execution-proof/sap-execution-record.resource.js.map +1 -0
- package/dist/resources/index.d.ts +5 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +5 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/memory/index.d.ts +5 -0
- package/dist/resources/memory/index.d.ts.map +1 -0
- package/dist/resources/memory/index.js +5 -0
- package/dist/resources/memory/index.js.map +1 -0
- package/dist/resources/memory/sap-memory.resource.d.ts +13 -0
- package/dist/resources/memory/sap-memory.resource.d.ts.map +1 -0
- package/dist/resources/memory/sap-memory.resource.js +77 -0
- package/dist/resources/memory/sap-memory.resource.js.map +1 -0
- package/dist/resources/profile/sap-active-profile.resource.d.ts +51 -0
- package/dist/resources/profile/sap-active-profile.resource.d.ts.map +1 -0
- package/dist/resources/profile/sap-active-profile.resource.js +119 -0
- package/dist/resources/profile/sap-active-profile.resource.js.map +1 -0
- package/dist/resources/register-resources.d.ts +10 -0
- package/dist/resources/register-resources.d.ts.map +1 -0
- package/dist/resources/register-resources.js +33 -0
- package/dist/resources/register-resources.js.map +1 -0
- package/dist/resources/registry/index.d.ts +6 -0
- package/dist/resources/registry/index.d.ts.map +1 -0
- package/dist/resources/registry/index.js +6 -0
- package/dist/resources/registry/index.js.map +1 -0
- package/dist/resources/registry/sap-agent.resource.d.ts +13 -0
- package/dist/resources/registry/sap-agent.resource.d.ts.map +1 -0
- package/dist/resources/registry/sap-agent.resource.js +75 -0
- package/dist/resources/registry/sap-agent.resource.js.map +1 -0
- package/dist/resources/registry/sap-global-registry.resource.d.ts +13 -0
- package/dist/resources/registry/sap-global-registry.resource.d.ts.map +1 -0
- package/dist/resources/registry/sap-global-registry.resource.js +71 -0
- package/dist/resources/registry/sap-global-registry.resource.js.map +1 -0
- package/dist/resources/reputation/index.d.ts +5 -0
- package/dist/resources/reputation/index.d.ts.map +1 -0
- package/dist/resources/reputation/index.js +5 -0
- package/dist/resources/reputation/index.js.map +1 -0
- package/dist/resources/reputation/sap-reputation.resource.d.ts +13 -0
- package/dist/resources/reputation/sap-reputation.resource.d.ts.map +1 -0
- package/dist/resources/reputation/sap-reputation.resource.js +75 -0
- package/dist/resources/reputation/sap-reputation.resource.js.map +1 -0
- package/dist/resources/stats/sap-network-stats.resource.d.ts +14 -0
- package/dist/resources/stats/sap-network-stats.resource.d.ts.map +1 -0
- package/dist/resources/stats/sap-network-stats.resource.js +86 -0
- package/dist/resources/stats/sap-network-stats.resource.js.map +1 -0
- package/dist/resources/tool-schema/index.d.ts +5 -0
- package/dist/resources/tool-schema/index.d.ts.map +1 -0
- package/dist/resources/tool-schema/index.js +5 -0
- package/dist/resources/tool-schema/index.js.map +1 -0
- package/dist/resources/tool-schema/sap-tool-schema.resource.d.ts +13 -0
- package/dist/resources/tool-schema/sap-tool-schema.resource.d.ts.map +1 -0
- package/dist/resources/tool-schema/sap-tool-schema.resource.js +75 -0
- package/dist/resources/tool-schema/sap-tool-schema.resource.js.map +1 -0
- package/dist/sap/index.d.ts +7 -0
- package/dist/sap/index.d.ts.map +1 -0
- package/dist/sap/index.js +6 -0
- package/dist/sap/index.js.map +1 -0
- package/dist/sap/sap-client-manager.d.ts +54 -0
- package/dist/sap/sap-client-manager.d.ts.map +1 -0
- package/dist/sap/sap-client-manager.js +129 -0
- package/dist/sap/sap-client-manager.js.map +1 -0
- package/dist/sap/sap-errors.d.ts +13 -0
- package/dist/sap/sap-errors.d.ts.map +1 -0
- package/dist/sap/sap-errors.js +23 -0
- package/dist/sap/sap-errors.js.map +1 -0
- package/dist/sap/sap-types.d.ts +69 -0
- package/dist/sap/sap-types.d.ts.map +1 -0
- package/dist/sap/sap-types.js +5 -0
- package/dist/sap/sap-types.js.map +1 -0
- package/dist/schemas/common.schema.d.ts +42 -0
- package/dist/schemas/common.schema.d.ts.map +1 -0
- package/dist/schemas/common.schema.js +36 -0
- package/dist/schemas/common.schema.js.map +1 -0
- package/dist/schemas/developer.schema.d.ts +31 -0
- package/dist/schemas/developer.schema.d.ts.map +1 -0
- package/dist/schemas/developer.schema.js +19 -0
- package/dist/schemas/developer.schema.js.map +1 -0
- package/dist/schemas/execution-proof.schema.d.ts +44 -0
- package/dist/schemas/execution-proof.schema.d.ts.map +1 -0
- package/dist/schemas/execution-proof.schema.js +26 -0
- package/dist/schemas/execution-proof.schema.js.map +1 -0
- package/dist/schemas/identity.schema.d.ts +34 -0
- package/dist/schemas/identity.schema.d.ts.map +1 -0
- package/dist/schemas/identity.schema.js +21 -0
- package/dist/schemas/identity.schema.js.map +1 -0
- package/dist/schemas/index.d.ts +15 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +15 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/memory.schema.d.ts +34 -0
- package/dist/schemas/memory.schema.d.ts.map +1 -0
- package/dist/schemas/memory.schema.js +21 -0
- package/dist/schemas/memory.schema.js.map +1 -0
- package/dist/schemas/payments.schema.d.ts +37 -0
- package/dist/schemas/payments.schema.d.ts.map +1 -0
- package/dist/schemas/payments.schema.js +22 -0
- package/dist/schemas/payments.schema.js.map +1 -0
- package/dist/schemas/registry.schema.d.ts +65 -0
- package/dist/schemas/registry.schema.d.ts.map +1 -0
- package/dist/schemas/registry.schema.js +34 -0
- package/dist/schemas/registry.schema.js.map +1 -0
- package/dist/schemas/reputation.schema.d.ts +31 -0
- package/dist/schemas/reputation.schema.d.ts.map +1 -0
- package/dist/schemas/reputation.schema.js +20 -0
- package/dist/schemas/reputation.schema.js.map +1 -0
- package/dist/schemas/settlement.schema.d.ts +50 -0
- package/dist/schemas/settlement.schema.d.ts.map +1 -0
- package/dist/schemas/settlement.schema.js +29 -0
- package/dist/schemas/settlement.schema.js.map +1 -0
- package/dist/schemas/tool-schema.schema.d.ts +56 -0
- package/dist/schemas/tool-schema.schema.d.ts.map +1 -0
- package/dist/schemas/tool-schema.schema.js +26 -0
- package/dist/schemas/tool-schema.schema.js.map +1 -0
- package/dist/schemas/transaction.schema.d.ts +34 -0
- package/dist/schemas/transaction.schema.d.ts.map +1 -0
- package/dist/schemas/transaction.schema.js +20 -0
- package/dist/schemas/transaction.schema.js.map +1 -0
- package/dist/security/approval-required.d.ts +9 -0
- package/dist/security/approval-required.d.ts.map +1 -0
- package/dist/security/approval-required.js +10 -0
- package/dist/security/approval-required.js.map +1 -0
- package/dist/security/index.d.ts +9 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +9 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/private-key-guard.d.ts +11 -0
- package/dist/security/private-key-guard.d.ts.map +1 -0
- package/dist/security/private-key-guard.js +22 -0
- package/dist/security/private-key-guard.js.map +1 -0
- package/dist/security/prompt-injection-notes.d.ts +13 -0
- package/dist/security/prompt-injection-notes.d.ts.map +1 -0
- package/dist/security/prompt-injection-notes.js +23 -0
- package/dist/security/prompt-injection-notes.js.map +1 -0
- package/dist/security/tool-permissions.d.ts +30 -0
- package/dist/security/tool-permissions.d.ts.map +1 -0
- package/dist/security/tool-permissions.js +270 -0
- package/dist/security/tool-permissions.js.map +1 -0
- package/dist/security/unsafe-action-guard.d.ts +28 -0
- package/dist/security/unsafe-action-guard.d.ts.map +1 -0
- package/dist/security/unsafe-action-guard.js +175 -0
- package/dist/security/unsafe-action-guard.js.map +1 -0
- package/dist/server/create-server.d.ts +12 -0
- package/dist/server/create-server.d.ts.map +1 -0
- package/dist/server/create-server.js +57 -0
- package/dist/server/create-server.js.map +1 -0
- package/dist/server/index.d.ts +7 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +7 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/register-capabilities.d.ts +10 -0
- package/dist/server/register-capabilities.d.ts.map +1 -0
- package/dist/server/register-capabilities.js +23 -0
- package/dist/server/register-capabilities.js.map +1 -0
- package/dist/server/server-metadata.d.ts +32 -0
- package/dist/server/server-metadata.d.ts.map +1 -0
- package/dist/server/server-metadata.js +32 -0
- package/dist/server/server-metadata.js.map +1 -0
- package/dist/session/agent-session.d.ts +25 -0
- package/dist/session/agent-session.d.ts.map +1 -0
- package/dist/session/agent-session.js +35 -0
- package/dist/session/agent-session.js.map +1 -0
- package/dist/session/delegated-session.d.ts +20 -0
- package/dist/session/delegated-session.d.ts.map +1 -0
- package/dist/session/delegated-session.js +47 -0
- package/dist/session/delegated-session.js.map +1 -0
- package/dist/session/index.d.ts +10 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +9 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/redis-session-store.d.ts +89 -0
- package/dist/session/redis-session-store.d.ts.map +1 -0
- package/dist/session/redis-session-store.js +219 -0
- package/dist/session/redis-session-store.js.map +1 -0
- package/dist/session/session-limits.d.ts +20 -0
- package/dist/session/session-limits.d.ts.map +1 -0
- package/dist/session/session-limits.js +55 -0
- package/dist/session/session-limits.js.map +1 -0
- package/dist/session/session-permissions.d.ts +37 -0
- package/dist/session/session-permissions.d.ts.map +1 -0
- package/dist/session/session-permissions.js +58 -0
- package/dist/session/session-permissions.js.map +1 -0
- package/dist/session/session-store.d.ts +38 -0
- package/dist/session/session-store.d.ts.map +1 -0
- package/dist/session/session-store.js +62 -0
- package/dist/session/session-store.js.map +1 -0
- package/dist/session/session-types.d.ts +33 -0
- package/dist/session/session-types.d.ts.map +1 -0
- package/dist/session/session-types.js +5 -0
- package/dist/session/session-types.js.map +1 -0
- package/dist/signer/external-signer.d.ts +16 -0
- package/dist/signer/external-signer.d.ts.map +1 -0
- package/dist/signer/external-signer.js +128 -0
- package/dist/signer/external-signer.js.map +1 -0
- package/dist/signer/index.d.ts +9 -0
- package/dist/signer/index.d.ts.map +1 -0
- package/dist/signer/index.js +8 -0
- package/dist/signer/index.js.map +1 -0
- package/dist/signer/load-keypair.d.ts +15 -0
- package/dist/signer/load-keypair.d.ts.map +1 -0
- package/dist/signer/load-keypair.js +39 -0
- package/dist/signer/load-keypair.js.map +1 -0
- package/dist/signer/local-keypair-signer.d.ts +11 -0
- package/dist/signer/local-keypair-signer.d.ts.map +1 -0
- package/dist/signer/local-keypair-signer.js +46 -0
- package/dist/signer/local-keypair-signer.js.map +1 -0
- package/dist/signer/signer-resolver.d.ts +10 -0
- package/dist/signer/signer-resolver.d.ts.map +1 -0
- package/dist/signer/signer-resolver.js +63 -0
- package/dist/signer/signer-resolver.js.map +1 -0
- package/dist/signer/signer-types.d.ts +35 -0
- package/dist/signer/signer-types.d.ts.map +1 -0
- package/dist/signer/signer-types.js +5 -0
- package/dist/signer/signer-types.js.map +1 -0
- package/dist/signer/signing-proxy.d.ts +45 -0
- package/dist/signer/signing-proxy.d.ts.map +1 -0
- package/dist/signer/signing-proxy.js +300 -0
- package/dist/signer/signing-proxy.js.map +1 -0
- package/dist/tools/client-sdk-tools.d.ts +22 -0
- package/dist/tools/client-sdk-tools.d.ts.map +1 -0
- package/dist/tools/client-sdk-tools.js +220 -0
- package/dist/tools/client-sdk-tools.js.map +1 -0
- package/dist/tools/index.d.ts +11 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +17 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/profile-tools.d.ts +12 -0
- package/dist/tools/profile-tools.d.ts.map +1 -0
- package/dist/tools/profile-tools.js +250 -0
- package/dist/tools/profile-tools.js.map +1 -0
- package/dist/tools/register-tools.d.ts +12 -0
- package/dist/tools/register-tools.d.ts.map +1 -0
- package/dist/tools/register-tools.js +36 -0
- package/dist/tools/register-tools.js.map +1 -0
- package/dist/tools/sap-network-stats.tool.d.ts +14 -0
- package/dist/tools/sap-network-stats.tool.d.ts.map +1 -0
- package/dist/tools/sap-network-stats.tool.js +101 -0
- package/dist/tools/sap-network-stats.tool.js.map +1 -0
- package/dist/tools/sap-sdk-tools.d.ts +15 -0
- package/dist/tools/sap-sdk-tools.d.ts.map +1 -0
- package/dist/tools/sap-sdk-tools.js +1515 -0
- package/dist/tools/sap-sdk-tools.js.map +1 -0
- package/dist/tools/sap-sns-tools.d.ts +35 -0
- package/dist/tools/sap-sns-tools.d.ts.map +1 -0
- package/dist/tools/sap-sns-tools.js +626 -0
- package/dist/tools/sap-sns-tools.js.map +1 -0
- package/dist/tools/skills-tools.d.ts +12 -0
- package/dist/tools/skills-tools.d.ts.map +1 -0
- package/dist/tools/skills-tools.js +273 -0
- package/dist/tools/skills-tools.js.map +1 -0
- package/dist/tools/transaction-tools.d.ts +14 -0
- package/dist/tools/transaction-tools.d.ts.map +1 -0
- package/dist/tools/transaction-tools.js +297 -0
- package/dist/tools/transaction-tools.js.map +1 -0
- package/dist/transports/http.d.ts +40 -0
- package/dist/transports/http.d.ts.map +1 -0
- package/dist/transports/http.js +212 -0
- package/dist/transports/http.js.map +1 -0
- package/dist/transports/index.d.ts +6 -0
- package/dist/transports/index.d.ts.map +1 -0
- package/dist/transports/index.js +6 -0
- package/dist/transports/index.js.map +1 -0
- package/dist/transports/stdio.d.ts +14 -0
- package/dist/transports/stdio.d.ts.map +1 -0
- package/dist/transports/stdio.js +32 -0
- package/dist/transports/stdio.js.map +1 -0
- package/dist/tui/components.d.ts +59 -0
- package/dist/tui/components.d.ts.map +1 -0
- package/dist/tui/components.js +82 -0
- package/dist/tui/components.js.map +1 -0
- package/dist/tui/config-wizard.d.ts +12 -0
- package/dist/tui/config-wizard.d.ts.map +1 -0
- package/dist/tui/config-wizard.js +348 -0
- package/dist/tui/config-wizard.js.map +1 -0
- package/dist/tui/wizard-save.d.ts +51 -0
- package/dist/tui/wizard-save.d.ts.map +1 -0
- package/dist/tui/wizard-save.js +148 -0
- package/dist/tui/wizard-save.js.map +1 -0
- package/docs/00_README.md +45 -0
- package/docs/01_PRODUCT_OVERVIEW.md +69 -0
- package/docs/02_ARCHITECTURE_AND_REQUEST_FLOW.md +120 -0
- package/docs/03_CONFIGURATION_AND_WIZARD.md +143 -0
- package/docs/04_LOCAL_STDIO_USAGE.md +118 -0
- package/docs/05_REMOTE_VPS_DEPLOYMENT.md +136 -0
- package/docs/06_PAYMENTS_X402_AND_PAYSH.md +162 -0
- package/docs/07_ENDPOINTS_AND_CLIENTS.md +114 -0
- package/docs/08_SECURITY_POLICY_AND_SIGNING.md +134 -0
- package/docs/09_TOOLS_SKILLS_AND_AGENT_GUIDE.md +72 -0
- package/docs/10_OPERATIONS_RELEASE_AND_PM2.md +90 -0
- package/docs/11_CODE_QUALITY_AUDIT.md +49 -0
- package/ecosystem.config.example.cjs +55 -0
- package/package.json +132 -0
- package/skills/README.md +146 -0
- package/skills/sap-agent-registry/SKILL.md +39 -0
- package/skills/sap-agentkit/SKILL.md +40 -0
- package/skills/sap-defi/SKILL.md +51 -0
- package/skills/sap-discovery-indexing/SKILL.md +33 -0
- package/skills/sap-escrow-settlement/SKILL.md +37 -0
- package/skills/sap-ledger-session/SKILL.md +24 -0
- package/skills/sap-market-data/SKILL.md +36 -0
- package/skills/sap-mcp/SKILL.md +202 -0
- package/skills/sap-mcp/TOOL_REFERENCE.md +184 -0
- package/skills/sap-memory-vault/SKILL.md +29 -0
- package/skills/sap-nft-metaplex/SKILL.md +38 -0
- package/skills/sap-operations/SKILL.md +97 -0
- package/skills/sap-payments-x402/SKILL.md +47 -0
- package/skills/sap-reputation-attestation/SKILL.md +30 -0
- package/skills/sap-sns/SKILL.md +51 -0
- package/skills/sap-social-gaming/SKILL.md +30 -0
- package/skills/sap-solana-token/SKILL.md +32 -0
- package/skills/sap-staking/SKILL.md +24 -0
- package/skills/sap-tool-registry/SKILL.md +29 -0
package/.env.example
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# SAP MCP Server - Environment Configuration
|
|
2
|
+
# Copy this file to .env and customize for your environment
|
|
3
|
+
|
|
4
|
+
# =============================================================================
|
|
5
|
+
# Server Mode (default: readonly)
|
|
6
|
+
# =============================================================================
|
|
7
|
+
# - readonly: No signing, read-only operations only (SAFE)
|
|
8
|
+
# - local-dev-keypair: Uses local wallet for signing (DEV ONLY)
|
|
9
|
+
# - external-signer: Prepares TXs for external signing service
|
|
10
|
+
# - delegated-session: Uses delegated session with permissions
|
|
11
|
+
# - hosted-api: Hosted mode with HTTP transport
|
|
12
|
+
|
|
13
|
+
SAP_MCP_MODE=readonly
|
|
14
|
+
|
|
15
|
+
# Prefer profile/config pointers for MCP clients such as Hermes, Claude, Codex, or OpenClaw.
|
|
16
|
+
# This avoids stale YAML env values shadowing the active JSON profile.
|
|
17
|
+
# SAP_MCP_PROFILE=gianni-market-nft-agent
|
|
18
|
+
# SAP_MCP_CONFIG_PATH=~/.config/mcp-sap/config-gianni-market-nft-agent.json
|
|
19
|
+
# Set this only when you intentionally want env RPC/mode/wallet to override a profile JSON.
|
|
20
|
+
# SAP_MCP_ALLOW_ENV_CONFIG_OVERRIDE=false
|
|
21
|
+
|
|
22
|
+
# =============================================================================
|
|
23
|
+
# Solana RPC Configuration
|
|
24
|
+
# =============================================================================
|
|
25
|
+
|
|
26
|
+
SAP_RPC_URL=https://api.mainnet-beta.solana.com
|
|
27
|
+
# SAP_MCP_RPC_URL is a compatibility alias for explicit RPC override.
|
|
28
|
+
# Do not set it in MCP client YAML when using SAP_MCP_PROFILE or SAP_MCP_CONFIG_PATH.
|
|
29
|
+
# SAP_MCP_RPC_URL=https://api.mainnet-beta.solana.com
|
|
30
|
+
# SAP_RPC_URL_DEVNET=https://api.devnet.solana.com
|
|
31
|
+
# SAP_RPC_URL_TESTNET=https://api.testnet.solana.com
|
|
32
|
+
|
|
33
|
+
# =============================================================================
|
|
34
|
+
# SAP Program Configuration
|
|
35
|
+
# =============================================================================
|
|
36
|
+
|
|
37
|
+
SAP_PROGRAM_ID=SAPpUhsWLJG1FfkGRcXagEDMrMsWGjbky7AyhGpFETZ
|
|
38
|
+
|
|
39
|
+
# =============================================================================
|
|
40
|
+
# Commitment & Performance
|
|
41
|
+
# =============================================================================
|
|
42
|
+
|
|
43
|
+
SAP_COMMITMENT=confirmed
|
|
44
|
+
SAP_MAX_RETRIES=3
|
|
45
|
+
SAP_RETRY_DELAY_MS=1000
|
|
46
|
+
|
|
47
|
+
# =============================================================================
|
|
48
|
+
# Signer Configuration (for local-dev-keypair mode)
|
|
49
|
+
# =============================================================================
|
|
50
|
+
|
|
51
|
+
# Path to wallet keypair JSON file (KEEP SECURE!)
|
|
52
|
+
# SAP_WALLET_PATH=/path/to/your/wallet.json
|
|
53
|
+
# SAP_WALLET_ENCRYPTED=false
|
|
54
|
+
# SAP_WALLET_PASSPHRASE_ENV=WALLET_PASSPHRASE
|
|
55
|
+
|
|
56
|
+
# =============================================================================
|
|
57
|
+
# External Signer Configuration (for external-signer mode)
|
|
58
|
+
# =============================================================================
|
|
59
|
+
|
|
60
|
+
# SAP_EXTERNAL_SIGNER_URL=https://signer.example.com/api/v1/sign
|
|
61
|
+
# Local signing proxy form:
|
|
62
|
+
# SAP_EXTERNAL_SIGNER_URL=http://127.0.0.1:8765/sign/<profile>
|
|
63
|
+
# Start with:
|
|
64
|
+
# SAP_SIGNING_AUTH_TOKEN=replace-with-local-token sap-signing-proxy
|
|
65
|
+
# SAP_EXTERNAL_SIGNER_AUTH_TOKEN=replace-with-local-token
|
|
66
|
+
# SAP_EXTERNAL_SIGNER_TIMEOUT_MS=30000
|
|
67
|
+
|
|
68
|
+
# =============================================================================
|
|
69
|
+
# HTTP Transport Configuration (for hosted-api mode)
|
|
70
|
+
# =============================================================================
|
|
71
|
+
|
|
72
|
+
SAP_ENABLE_HTTP=false
|
|
73
|
+
SAP_HTTP_PORT=8787
|
|
74
|
+
SAP_HTTP_HOST=127.0.0.1
|
|
75
|
+
# SAP_HTTP_CORS_ORIGINS=https://app.example.com,https://admin.example.com
|
|
76
|
+
|
|
77
|
+
# =============================================================================
|
|
78
|
+
# Remote MCP Access Control
|
|
79
|
+
# =============================================================================
|
|
80
|
+
# Public agent-facing deployments can be bearerless and rely on x402 for paid
|
|
81
|
+
# tools plus rate limits/policy for free tools. Enterprise/private deployments
|
|
82
|
+
# can still use api_key or jwt.
|
|
83
|
+
# SAP_MCP_AUTH_TYPE=none
|
|
84
|
+
# SAP_MCP_AUTH_TYPE=api_key
|
|
85
|
+
# SAP_MCP_API_KEYS=<api-key>=<operator-id>
|
|
86
|
+
# SAP_MCP_AUTH_TYPE=jwt
|
|
87
|
+
# SAP_MCP_AUTH_SECRET=<private-jwt-secret>
|
|
88
|
+
|
|
89
|
+
# =============================================================================
|
|
90
|
+
# Security & Spending Limits
|
|
91
|
+
# =============================================================================
|
|
92
|
+
|
|
93
|
+
SAP_MAX_TX_VALUE_SOL=10
|
|
94
|
+
SAP_REQUIRE_APPROVAL_ABOVE_SOL=1
|
|
95
|
+
SAP_DAILY_LIMIT_SOL=100
|
|
96
|
+
# SAP_ALLOWED_TOOLS=all
|
|
97
|
+
# SAP_ALLOWED_TOOLS=sap_get_agent,sap_list_agents,sap_get_reputation
|
|
98
|
+
|
|
99
|
+
# =============================================================================
|
|
100
|
+
# Logging & Observability
|
|
101
|
+
# =============================================================================
|
|
102
|
+
|
|
103
|
+
SAP_LOG_LEVEL=info
|
|
104
|
+
SAP_LOG_FORMAT=pretty
|
|
105
|
+
# SAP_LOG_FILE=/path/to/sap-mcp.log
|
|
106
|
+
SAP_ENABLE_METRICS=false
|
|
107
|
+
# SAP_METRICS_PORT=9090
|
|
108
|
+
|
|
109
|
+
# =============================================================================
|
|
110
|
+
# Advanced Configuration
|
|
111
|
+
# =============================================================================
|
|
112
|
+
|
|
113
|
+
SAP_ENABLE_CACHE=true
|
|
114
|
+
SAP_CACHE_TTL_SECONDS=300
|
|
115
|
+
SAP_ENABLE_RATE_LIMIT=true
|
|
116
|
+
SAP_RATE_LIMIT_PER_MINUTE=60
|
|
117
|
+
|
|
118
|
+
# =============================================================================
|
|
119
|
+
# Hosted Remote Monetization (x402 v2 / pay.sh)
|
|
120
|
+
# =============================================================================
|
|
121
|
+
# Applies only to hosted HTTP MCP traffic. Local stdio remains free.
|
|
122
|
+
|
|
123
|
+
SAP_MCP_MONETIZATION_ENABLED=false
|
|
124
|
+
SAP_MCP_MONETIZATION_PROVIDER=x402
|
|
125
|
+
# SAP_MCP_MONETIZATION_PAY_TO=YOUR_SOLANA_USDC_RECIPIENT
|
|
126
|
+
# Optional CAIP-2 override. If omitted, derived from SAP_RPC_URL.
|
|
127
|
+
# SAP_MCP_MONETIZATION_NETWORK=solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
|
|
128
|
+
# Required when monetization is enabled. Use OOBE hosted facilitator or a self-hosted sap-mcp-facilitator.
|
|
129
|
+
# SAP_MCP_X402_FACILITATOR_URL=<private-or-hosted-facilitator-url>
|
|
130
|
+
SAP_MCP_X402_MAX_TIMEOUT_SECONDS=120
|
|
131
|
+
# SAP_MCP_X402_FACILITATOR_AUTH_TOKEN=
|
|
132
|
+
# Optional browser/manual checkout link included in 402 JSON responses.
|
|
133
|
+
# SAP_MCP_PAY_SH_CHECKOUT_URL=https://pay.sh/checkout/YOUR_CHECKOUT_ID
|
|
134
|
+
|
|
135
|
+
# OOBE self-hosted x402 facilitator.
|
|
136
|
+
# The facilitator signer is a dedicated fee-payer keypair used only to complete
|
|
137
|
+
# and submit x402 SVM settlement transactions. It is NOT the payTo recipient,
|
|
138
|
+
# NOT an SAP agent wallet, and NOT the Solana CLI default keypair.
|
|
139
|
+
# Create it with: npx sap-mcp-facilitator init
|
|
140
|
+
# Fund its public key with SOL on every configured network for transaction fees.
|
|
141
|
+
SAP_MCP_FACILITATOR_HOST=127.0.0.1
|
|
142
|
+
SAP_MCP_FACILITATOR_PORT=1111
|
|
143
|
+
SAP_MCP_FACILITATOR_PATH_PREFIX=/facilitator
|
|
144
|
+
SAP_MCP_FACILITATOR_NETWORKS=devnet
|
|
145
|
+
# SAP_MCP_FACILITATOR_SIGNER_PATH=~/.config/mcp-sap/keypairs/oobe-x402-facilitator-keypair.json
|
|
146
|
+
# SAP_MCP_FACILITATOR_RPC_URL=https://api.devnet.solana.com
|
|
147
|
+
# SAP_MCP_FACILITATOR_AUTH_TOKEN=
|
|
148
|
+
|
|
149
|
+
# Initial pricing:
|
|
150
|
+
# Free: tools/list, prompts/list, resources/list, sap_profile_current, base overview.
|
|
151
|
+
# Read premium: enriched discovery/indexes/network stats.
|
|
152
|
+
# Builder: SNS batch checks, analytics, transaction builders.
|
|
153
|
+
# Value action: fixed fee plus basis-points fee when public USD notional is present.
|
|
154
|
+
SAP_MCP_PRICE_READ_PREMIUM_USD=0.008
|
|
155
|
+
SAP_MCP_PRICE_BUILDER_USD=0.05
|
|
156
|
+
SAP_MCP_PRICE_VALUE_FIXED_USD=0.20
|
|
157
|
+
SAP_MCP_PRICE_VALUE_BPS=50
|
|
158
|
+
SAP_MCP_PRICE_MIN_USD=0.001
|
|
159
|
+
SAP_MCP_PRICE_MAX_USD=100
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
## 0.1.0 - 2026-06-29
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added production local and remote MCP launch documentation.
|
|
10
|
+
- Added profile-managed configuration docs for `~/.config/mcp-sap`.
|
|
11
|
+
- Added bundled SAP MCP skills and SAP SDK tool-routing documentation.
|
|
12
|
+
- Added profile inspection and switching tools for MCP clients.
|
|
13
|
+
- Added transaction decode, preview, signing, and submission tools with policy checks.
|
|
14
|
+
- Added SNS tool coverage for `synapse-sap-sdk` 0.21.x.
|
|
15
|
+
- Added MCP client config injection support for Claude, Hermes, OpenClaw, and Codex.
|
|
16
|
+
- Added optional remote-only x402 v2/pay.sh monetization gate for hosted MCP `tools/call` requests.
|
|
17
|
+
- Added hosted MCP pricing registry, payment usage ledger, and monetization documentation.
|
|
18
|
+
- Added `sap-mcp-facilitator` for OOBE-operated x402 SVM `/supported`, `/verify`, and `/settle` facilitation.
|
|
19
|
+
- Added `sap-mcp-pay-sh-spec` to generate a pay.sh provider YAML for hosted SAP MCP proxy monetization.
|
|
20
|
+
- Added a code quality audit document with release gates, engineering rules, and residual risk tracking.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Runtime profile configuration now protects profile-owned RPC, mode, program, and wallet values from stale MCP client environment variables unless `SAP_MCP_ALLOW_ENV_CONFIG_OVERRIDE=true`.
|
|
25
|
+
- The wizard creates named profiles and dedicated keypairs under `~/.config/mcp-sap`.
|
|
26
|
+
- The wizard UI now uses an aqua-first visual system, clearer step descriptions, and no-color accessibility support for terminal environments.
|
|
27
|
+
- The wizard MCP client setup step can now print manual JSON snippets for hosted `https://mcp.sap.oobeprotocol.ai/mcp` and local active-profile setups.
|
|
28
|
+
- The wizard now exposes hosted `https://mcp.sap.oobeprotocol.ai/mcp` as the recommended MCP client connection path and keeps it separate from local profile injection.
|
|
29
|
+
- Hosted MCP onboarding now states that users connect to the hosted URL while x402/pay.sh payments and value-moving tool transactions still require a wizard-created user SAP profile and user-controlled signer.
|
|
30
|
+
- Remote hosted deployments now publish `/.well-known/sap-mcp-wizard.json` and `/wizard/install.sh` so agents can direct users to the wizard when local SAP MCP config is missing or inaccessible.
|
|
31
|
+
- Agent context prompts now instruct agents to preserve the user's request language and avoid exposing keypair material.
|
|
32
|
+
- Tool documentation now reflects the current runtime registry: 232 tools.
|
|
33
|
+
- Remote HTTP transports can now gate paid tool calls before execution and settle x402 payments after successful MCP responses.
|
|
34
|
+
- Monetization now requires an explicit facilitator URL and documents OOBE hosted/self-hosted facilitator deployment.
|
|
35
|
+
- Hybrid policy logging now uses the structured runtime logger instead of direct console output.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- Fixed ESM-safe Solana balance support through `sol_get_balance`.
|
|
40
|
+
- Fixed stale permission mappings with an alignment test against the registered MCP tool surface.
|
|
41
|
+
- Fixed Bento policy integration tests and fail-open/fail-closed behavior.
|
|
42
|
+
- Fixed package release hygiene with a real MIT license, public docs, examples, schema, and changelog.
|
|
43
|
+
- Fixed TypeScript ESLint setup for open-source CI readiness.
|
|
44
|
+
- Fixed profile reloads to use the canonical runtime config pipeline, including new monetization defaults.
|
|
45
|
+
- Fixed signing proxy startup so env-only deployments do not require a default `config.json`.
|
|
46
|
+
- Removed legacy root-level documentation that conflicted with the numbered public docs.
|
|
47
|
+
- Removed generated macOS metadata from the source tree.
|
|
48
|
+
|
|
49
|
+
### Security
|
|
50
|
+
|
|
51
|
+
- Local keypair signing is isolated to the SAP MCP profile wallet and does not touch the Solana CLI keypair.
|
|
52
|
+
- MCP client injection no longer pins wallet paths or RPC overrides by default.
|
|
53
|
+
- Private key and transaction policy guards run before MCP tool execution/signing paths.
|
|
54
|
+
- Payment audit logs store request hashes and settlement metadata, not keypair bytes, raw arguments, or x402 payment signatures.
|
|
55
|
+
- Paid x402 virtual resource paths are bound to the SHA-256 hash of the exact JSON-RPC request body.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OOBE Protocol Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# SAP MCP Server
|
|
2
|
+
|
|
3
|
+
Production-oriented Model Context Protocol server for OOBE Synapse Agent Protocol, Solana, Synapse AgentKit, SNS, and monetized hosted agent workflows.
|
|
4
|
+
|
|
5
|
+
SAP MCP exposes the same typed tool registry through two supported MCP launch modes:
|
|
6
|
+
|
|
7
|
+
1. Local stdio for desktop agents and local development.
|
|
8
|
+
2. Remote Streamable HTTP at `/mcp` for hosted customers and orchestrators.
|
|
9
|
+
|
|
10
|
+
It also includes a professional setup wizard, profile-managed config under `~/.config/mcp-sap`, optional Bento policy integration, local and external signing modes, x402 monetization, a self-hosted OOBE facilitator, pay.sh provider YAML generation, and an A2A-compatible discovery card.
|
|
11
|
+
|
|
12
|
+
## 1. Status
|
|
13
|
+
|
|
14
|
+
| Area | Current behavior |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Package version | `0.1.0` |
|
|
17
|
+
| MCP transport | stdio locally, Streamable HTTP remotely |
|
|
18
|
+
| Remote access | Bearerless public mode for hosted agents; API key or JWT for private modes |
|
|
19
|
+
| Config directory | `~/.config/mcp-sap` only |
|
|
20
|
+
| Agent wallet | Dedicated wallet path under `~/.config/mcp-sap/keypairs/` by default |
|
|
21
|
+
| Solana CLI keypair | Never modified by the wizard |
|
|
22
|
+
| Policy | Local policy by default, optional Bento or hybrid policy |
|
|
23
|
+
| Monetization | Optional remote-only x402/pay.sh payment flow with per-tool pricing |
|
|
24
|
+
| Signing | Local dedicated wallet or external signer, depending on profile mode |
|
|
25
|
+
| Discovery | A2A-compatible card at `/.well-known/agent-card.json` |
|
|
26
|
+
|
|
27
|
+
## 2. Install
|
|
28
|
+
|
|
29
|
+
From source:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pnpm install
|
|
33
|
+
pnpm run build
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
From the published package:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install -g @oobe-protocol-labs/sap-mcp-server
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 3. Quick Start
|
|
43
|
+
|
|
44
|
+
Create or select a profile:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx sap-mcp-config wizard
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Inspect the active profile:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx sap-mcp-config show
|
|
54
|
+
npx sap-mcp-config pubkey
|
|
55
|
+
npx sap-mcp-config profiles
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Start local stdio MCP:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
sap-mcp-server
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
or from source:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
node dist/cli.js
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Hosted customers connect their agents to `https://mcp.sap.oobeprotocol.ai/mcp`, but signing remains user-controlled. Any user who wants to pay x402/pay.sh charges, register or operate a SAP identity, or execute value-moving Solana/SAP tools should run the wizard first and keep the dedicated wallet under `~/.config/mcp-sap/keypairs/` or behind an external signer. Read-only hosted discovery can use the remote URL without a local signer.
|
|
71
|
+
|
|
72
|
+
## 4. Local Client Config
|
|
73
|
+
|
|
74
|
+
For local agents, let SAP MCP follow the active profile manager instead of hard-coding wallet paths or stale RPC overrides:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"mcpServers": {
|
|
79
|
+
"sap": {
|
|
80
|
+
"command": "sap-mcp-server",
|
|
81
|
+
"env": {
|
|
82
|
+
"SAP_MCP_ALLOW_ENV_CONFIG_OVERRIDE": "false",
|
|
83
|
+
"SAP_LOG_LEVEL": "info"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
See [04. Local Stdio Usage](docs/04_LOCAL_STDIO_USAGE.md).
|
|
91
|
+
|
|
92
|
+
## 5. Remote Server
|
|
93
|
+
|
|
94
|
+
Remote deployments expose MCP over Streamable HTTP:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
node dist/remote/server.js
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Production environment values should come from a private secret store or private deployment file, not from public docs. Public hosted agent-facing deployments can use `SAP_MCP_AUTH_TYPE=none` when x402, rate limits, and policy are enabled. API key or JWT auth remains available for private beta, enterprise, and admin deployments.
|
|
101
|
+
|
|
102
|
+
Remote endpoints:
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
GET /health
|
|
106
|
+
GET /.well-known/agent-card.json
|
|
107
|
+
GET /.well-known/sap-mcp-wizard.json
|
|
108
|
+
GET /wizard/install.sh
|
|
109
|
+
POST /mcp
|
|
110
|
+
GET /mcp
|
|
111
|
+
DELETE /mcp
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
See [05. Remote VPS Deployment](docs/05_REMOTE_VPS_DEPLOYMENT.md) and [07. Endpoints And Clients](docs/07_ENDPOINTS_AND_CLIENTS.md).
|
|
115
|
+
|
|
116
|
+
## 6. Monetization
|
|
117
|
+
|
|
118
|
+
Hosted HTTP deployments can require payment for paid `tools/call` requests while leaving local stdio and base MCP protocol calls free.
|
|
119
|
+
|
|
120
|
+
Initial model:
|
|
121
|
+
|
|
122
|
+
| Tier | Examples | Price |
|
|
123
|
+
| --- | --- | --- |
|
|
124
|
+
| Free | `tools/list`, `prompts/list`, `resources/list`, `sap_profile_current`, base overview | Free |
|
|
125
|
+
| Premium read | `sap_list_all_agents`, enriched network stats, indexed discovery | `$0.007` to `$0.01` |
|
|
126
|
+
| Builder or batch | complex builders, SNS/domain batch checks, enriched analytics | `$0.01` to `$0.10` |
|
|
127
|
+
| Value action | selected value-linked operations | fixed `$0.20` plus optional `0.5%` |
|
|
128
|
+
|
|
129
|
+
Enable x402:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
SAP_MCP_MONETIZATION_ENABLED=true
|
|
133
|
+
SAP_MCP_MONETIZATION_PROVIDER=x402
|
|
134
|
+
SAP_MCP_MONETIZATION_PAY_TO=YOUR_SOLANA_USDC_RECIPIENT
|
|
135
|
+
SAP_MCP_X402_FACILITATOR_URL=YOUR_PRIVATE_OR_HOSTED_FACILITATOR_URL
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Initialize and run the OOBE facilitator:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npx sap-mcp-facilitator init
|
|
142
|
+
npx sap-mcp-facilitator start
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Generate a pay.sh provider YAML:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
npx sap-mcp-pay-sh-spec \
|
|
149
|
+
--out sap-mcp-pay-sh.yml \
|
|
150
|
+
--upstream-url https://mcp.sap.oobeprotocol.ai \
|
|
151
|
+
--network mainnet \
|
|
152
|
+
--recipient YOUR_SOLANA_USDC_RECIPIENT
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
See [06. Payments, x402, And pay.sh](docs/06_PAYMENTS_X402_AND_PAYSH.md).
|
|
156
|
+
|
|
157
|
+
## 7. Commands
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
pnpm run typecheck
|
|
161
|
+
pnpm run lint
|
|
162
|
+
pnpm test -- --run
|
|
163
|
+
pnpm run build
|
|
164
|
+
pnpm run verify:release
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Installed binaries:
|
|
168
|
+
|
|
169
|
+
| Command | Purpose |
|
|
170
|
+
| --- | --- |
|
|
171
|
+
| `sap-mcp-server` | Local stdio MCP server and CLI entry point |
|
|
172
|
+
| `sap-mcp-remote` | Remote MCP server with bearerless, API key, and JWT modes |
|
|
173
|
+
| `sap-mcp-config` | Config CLI, profile manager, approval workflow, and wizard |
|
|
174
|
+
| `sap-mcp-wizard` | TUI configuration wizard |
|
|
175
|
+
| `sap-signing-proxy` | Local signing proxy |
|
|
176
|
+
| `sap-mcp-facilitator` | Self-hosted x402 SVM facilitator |
|
|
177
|
+
| `sap-mcp-pay-sh-spec` | pay.sh provider YAML generator |
|
|
178
|
+
|
|
179
|
+
## 8. Documentation
|
|
180
|
+
|
|
181
|
+
Start with [00. Documentation Index](docs/00_README.md).
|
|
182
|
+
|
|
183
|
+
| Document | Purpose |
|
|
184
|
+
| --- | --- |
|
|
185
|
+
| [01. Product Overview](docs/01_PRODUCT_OVERVIEW.md) | Product model, users, public/private repo guidance, and wizard distribution. |
|
|
186
|
+
| [02. Architecture And Request Flow](docs/02_ARCHITECTURE_AND_REQUEST_FLOW.md) | Runtime modules, local flow, remote flow, signing, payments, and trust boundaries. |
|
|
187
|
+
| [03. Configuration And Wizard](docs/03_CONFIGURATION_AND_WIZARD.md) | Profile manager, wizard, wallet isolation, client injection, and config CLI. |
|
|
188
|
+
| [04. Local Stdio Usage](docs/04_LOCAL_STDIO_USAGE.md) | Local setup for Claude, Hermes, Codex, OpenClaw, and development agents. |
|
|
189
|
+
| [05. Remote VPS Deployment](docs/05_REMOTE_VPS_DEPLOYMENT.md) | Hosted deployment, reverse proxy, PM2, and customer onboarding. |
|
|
190
|
+
| [06. Payments, x402, And pay.sh](docs/06_PAYMENTS_X402_AND_PAYSH.md) | Pricing, x402 gate, pay.sh provider YAML, facilitator signer, and settlement. |
|
|
191
|
+
| [07. Endpoints And Clients](docs/07_ENDPOINTS_AND_CLIENTS.md) | HTTP endpoints, headers, smoke tests, and client examples. |
|
|
192
|
+
| [08. Security, Policy, And Signing](docs/08_SECURITY_POLICY_AND_SIGNING.md) | Key material rules, signer modes, Bento policy, and transaction safety. |
|
|
193
|
+
| [09. Tools, Skills, And Agent Guide](docs/09_TOOLS_SKILLS_AND_AGENT_GUIDE.md) | Tool families, SDK doc pointers, skills, and agent behavior. |
|
|
194
|
+
| [10. Operations, Release, And PM2](docs/10_OPERATIONS_RELEASE_AND_PM2.md) | Quality gates, PM2, secrets, release packaging, and changelog discipline. |
|
|
195
|
+
| [11. Code Quality Audit](docs/11_CODE_QUALITY_AUDIT.md) | Current engineering scorecard, release gates, quality rules, and residual risks. |
|
|
196
|
+
|
|
197
|
+
## 9. Repository Layout
|
|
198
|
+
|
|
199
|
+
```text
|
|
200
|
+
src/
|
|
201
|
+
adapters/ MCP and Solana adapter helpers
|
|
202
|
+
config/ Runtime config, secure config manager, setup wizard pipeline
|
|
203
|
+
core/ Shared runtime types, errors, logger, constants
|
|
204
|
+
payments/ x402 monetization, facilitator, usage ledger, pay.sh spec
|
|
205
|
+
policy/ Local, Bento, and hybrid policy engines
|
|
206
|
+
remote/ Streamable HTTP MCP server
|
|
207
|
+
resources/ MCP resources
|
|
208
|
+
security/ Private-key, unsafe-action, and permission guards
|
|
209
|
+
server/ MCP server factory and capability registration
|
|
210
|
+
signer/ Local, delegated, and external signer adapters
|
|
211
|
+
tools/ SAP, Solana, AgentKit, SNS, profile, skill, and payment tools
|
|
212
|
+
transports/ stdio and local HTTP transport helpers
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## 10. License
|
|
216
|
+
|
|
217
|
+
SAP MCP Server is released under the [MIT License](LICENSE).
|
|
218
|
+
|
|
219
|
+
## 11. Partner Products
|
|
220
|
+
|
|
221
|
+
| Partner / Product | Integration |
|
|
222
|
+
| --- | --- |
|
|
223
|
+
| [@bentoguard / Bento Guard](https://github.com/bentoguard) | Optional policy layer for AI-assisted intent scoring, escalation, and hybrid local/Bento guardrails. Uses the optional `@bentoguard/sdk` package and credentials from [app.bentoguard.xyz](https://app.bentoguard.xyz). |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./config.schema.json",
|
|
3
|
+
"_comment": "SAP MCP Server Configuration - User-specific overrides",
|
|
4
|
+
"_docs": "https://github.com/oobe-protocol-labs/sap-mcp-server#configuration",
|
|
5
|
+
|
|
6
|
+
"mode": "readonly",
|
|
7
|
+
|
|
8
|
+
"rpcUrl": "https://api.mainnet-beta.solana.com",
|
|
9
|
+
"rpcUrlDevnet": "https://api.devnet.solana.com",
|
|
10
|
+
"rpcUrlTestnet": "https://api.testnet.solana.com",
|
|
11
|
+
|
|
12
|
+
"programId": "SAPpUhsWLJG1FfkGRcXagEDMrMsWGjbky7AyhGpFETZ",
|
|
13
|
+
|
|
14
|
+
"commitment": "confirmed",
|
|
15
|
+
"maxRetries": 3,
|
|
16
|
+
"retryDelayMs": 1000,
|
|
17
|
+
|
|
18
|
+
"walletPath": "~/.config/mcp-sap/keypairs/dev-wallet-keypair.json",
|
|
19
|
+
"walletEncrypted": false,
|
|
20
|
+
|
|
21
|
+
"externalSignerUrl": "https://signer.example.com/api/v1/sign",
|
|
22
|
+
"externalSignerTimeoutMs": 30000,
|
|
23
|
+
|
|
24
|
+
"enableHttp": false,
|
|
25
|
+
"httpPort": 8787,
|
|
26
|
+
"httpHost": "127.0.0.1",
|
|
27
|
+
"httpCorsOrigins": ["https://app.example.com", "https://admin.example.com"],
|
|
28
|
+
|
|
29
|
+
"maxTxValueSol": 10,
|
|
30
|
+
"requireApprovalAboveSol": 1,
|
|
31
|
+
"dailyLimitSol": 100,
|
|
32
|
+
"allowedTools": "all",
|
|
33
|
+
|
|
34
|
+
"logLevel": "info",
|
|
35
|
+
"logFormat": "pretty",
|
|
36
|
+
"logFile": "~/.local/share/mcp-sap/logs/sap-mcp.log",
|
|
37
|
+
|
|
38
|
+
"enableMetrics": false,
|
|
39
|
+
"metricsPort": 9090,
|
|
40
|
+
|
|
41
|
+
"enableCache": true,
|
|
42
|
+
"cacheTtlSeconds": 300,
|
|
43
|
+
|
|
44
|
+
"enableRateLimit": true,
|
|
45
|
+
"rateLimitPerMinute": 60,
|
|
46
|
+
|
|
47
|
+
"monetization": {
|
|
48
|
+
"enabled": false,
|
|
49
|
+
"provider": "x402",
|
|
50
|
+
"payTo": "YOUR_SOLANA_USDC_RECIPIENT",
|
|
51
|
+
"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
52
|
+
"facilitatorUrl": "https://x402.oobeprotocol.ai/facilitator",
|
|
53
|
+
"maxTimeoutSeconds": 120,
|
|
54
|
+
"payShCheckoutUrl": "https://pay.sh/checkout/YOUR_CHECKOUT_ID",
|
|
55
|
+
"prices": {
|
|
56
|
+
"readPremiumUsd": 0.008,
|
|
57
|
+
"builderUsd": 0.05,
|
|
58
|
+
"valueFixedUsd": 0.2,
|
|
59
|
+
"valueBps": 50,
|
|
60
|
+
"minUsd": 0.001,
|
|
61
|
+
"maxUsd": 100
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|