@oobe-protocol-labs/sap-mcp-server 0.7.4 → 0.8.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/CHANGELOG.md +123 -0
- package/README.md +14 -7
- package/USER_DOCS/00_START_HERE.md +45 -7
- package/USER_DOCS/01_HOSTED_REMOTE_MCP.md +2 -0
- package/USER_DOCS/03_PAYMENTS_X402_PAYSH.md +13 -5
- package/USER_DOCS/04_CLIENT_CONFIGS.md +25 -15
- package/USER_DOCS/06_DESKTOP_GUI_WIZARD.md +36 -21
- package/assets/logos/drift.svg +12 -0
- package/assets/logos/jupiter.ico +0 -0
- package/assets/logos/mcp.svg +11 -0
- package/assets/logos/meteora.png +0 -0
- package/assets/logos/orca.ico +0 -0
- package/assets/logos/raydium.ico +0 -0
- package/assets/logos/smithery.svg +11 -0
- package/assets/oobe-logo.png +0 -0
- package/dist/config/mcp-client-injection.d.ts +26 -7
- package/dist/config/mcp-client-injection.d.ts.map +1 -1
- package/dist/config/mcp-client-injection.js +182 -58
- package/dist/config/mcp-client-injection.js.map +1 -1
- package/dist/config/wizard.d.ts.map +1 -1
- package/dist/config/wizard.js +92 -57
- package/dist/config/wizard.js.map +1 -1
- package/dist/core/constants.d.ts +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/payments/pricing.d.ts.map +1 -1
- package/dist/payments/pricing.js +11 -0
- package/dist/payments/pricing.js.map +1 -1
- package/dist/payments/x402-paid-call.d.ts +85 -1
- package/dist/payments/x402-paid-call.d.ts.map +1 -1
- package/dist/payments/x402-paid-call.js +168 -4
- package/dist/payments/x402-paid-call.js.map +1 -1
- package/dist/prompts/context/sap-agent-context.prompt.js +6 -3
- package/dist/prompts/context/sap-agent-context.prompt.js.map +1 -1
- package/dist/remote/public-home/escape.d.ts +11 -0
- package/dist/remote/public-home/escape.d.ts.map +1 -0
- package/dist/remote/public-home/escape.js +20 -0
- package/dist/remote/public-home/escape.js.map +1 -0
- package/dist/remote/public-home/index.d.ts +8 -0
- package/dist/remote/public-home/index.d.ts.map +1 -0
- package/dist/remote/public-home/index.js +57 -0
- package/dist/remote/public-home/index.js.map +1 -0
- package/dist/remote/public-home/scripts.d.ts +6 -0
- package/dist/remote/public-home/scripts.d.ts.map +1 -0
- package/dist/remote/public-home/scripts.js +106 -0
- package/dist/remote/public-home/scripts.js.map +1 -0
- package/dist/remote/public-home/sections.d.ts +67 -0
- package/dist/remote/public-home/sections.d.ts.map +1 -0
- package/dist/remote/public-home/sections.js +727 -0
- package/dist/remote/public-home/sections.js.map +1 -0
- package/dist/remote/public-home/styles.d.ts +6 -0
- package/dist/remote/public-home/styles.d.ts.map +1 -0
- package/dist/remote/public-home/styles.js +1534 -0
- package/dist/remote/public-home/styles.js.map +1 -0
- package/dist/remote/public-home/types.d.ts +95 -0
- package/dist/remote/public-home/types.d.ts.map +1 -0
- package/dist/remote/public-home/types.js +2 -0
- package/dist/remote/public-home/types.js.map +1 -0
- package/dist/remote/server.d.ts +1 -1
- package/dist/remote/server.d.ts.map +1 -1
- package/dist/remote/server.js +55 -282
- package/dist/remote/server.js.map +1 -1
- package/dist/security/tool-permissions.d.ts.map +1 -1
- package/dist/security/tool-permissions.js +5 -0
- package/dist/security/tool-permissions.js.map +1 -1
- package/dist/tools/magicblock-tools.js +6 -6
- package/dist/tools/magicblock-tools.js.map +1 -1
- package/dist/tools/profile-tools.d.ts.map +1 -1
- package/dist/tools/profile-tools.js +136 -33
- package/dist/tools/profile-tools.js.map +1 -1
- package/dist/tools/register-tools.d.ts.map +1 -1
- package/dist/tools/register-tools.js +5 -0
- package/dist/tools/register-tools.js.map +1 -1
- package/dist/tools/x402-paid-call-tool.d.ts +1 -1
- package/dist/tools/x402-paid-call-tool.d.ts.map +1 -1
- package/dist/tools/x402-paid-call-tool.js +314 -28
- package/dist/tools/x402-paid-call-tool.js.map +1 -1
- package/dist/wizard-core/desktop-flow.d.ts +40 -1
- package/dist/wizard-core/desktop-flow.d.ts.map +1 -1
- package/dist/wizard-core/desktop-flow.js +206 -15
- package/dist/wizard-core/desktop-flow.js.map +1 -1
- package/docs/03_CONFIGURATION_AND_WIZARD.md +6 -2
- package/docs/06_PAYMENTS_X402_AND_PAYSH.md +29 -7
- package/docs/07_ENDPOINTS_AND_CLIENTS.md +1 -1
- package/docs/14_DESKTOP_WIZARD_RELEASE.md +24 -5
- package/docs/15_DASHBOARD_SCREENSHARE_SCRIPT.md +137 -0
- package/docs/README.md +23 -2
- package/package.json +1 -1
- package/server.json +3 -3
- package/skills/sap-mcp/SKILL.md +23 -7
- package/skills/sap-payments-x402/SKILL.md +37 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/remote/public-home/styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
3
|
+
* @description Public HTML preview surface rendered by the hosted MCP server.
|
|
4
|
+
*/
|
|
5
|
+
export type LandingEndpoint = 'root' | 'mcp';
|
|
6
|
+
/**
|
|
7
|
+
* @name LandingPublicServerInfo
|
|
8
|
+
* @description Secret-free public server metadata used to render the hosted landing page.
|
|
9
|
+
*/
|
|
10
|
+
export interface LandingPublicServerInfo {
|
|
11
|
+
title: string;
|
|
12
|
+
displayName: string;
|
|
13
|
+
description: string;
|
|
14
|
+
version: string;
|
|
15
|
+
homepage: string;
|
|
16
|
+
icon: string;
|
|
17
|
+
endpoints: {
|
|
18
|
+
landing: string;
|
|
19
|
+
docs: string;
|
|
20
|
+
mcp: string;
|
|
21
|
+
health: string;
|
|
22
|
+
serverInfo: string;
|
|
23
|
+
openApi: string;
|
|
24
|
+
x402Discovery: string;
|
|
25
|
+
smitheryServerCard: string;
|
|
26
|
+
payShProvider: string;
|
|
27
|
+
agentCard: string;
|
|
28
|
+
wizardDescriptor: string;
|
|
29
|
+
wizardDownloads: string;
|
|
30
|
+
wizardInstallScript: string;
|
|
31
|
+
favicon: string;
|
|
32
|
+
faviconIco: string;
|
|
33
|
+
};
|
|
34
|
+
downloads: {
|
|
35
|
+
release: string;
|
|
36
|
+
desktopWizard: {
|
|
37
|
+
macosArm64Dmg: string;
|
|
38
|
+
windowsX64Setup: string;
|
|
39
|
+
linuxX64TarGz: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
payments?: {
|
|
43
|
+
provider: 'x402' | 'pay-sh';
|
|
44
|
+
network: string;
|
|
45
|
+
assetSymbol: 'USDC';
|
|
46
|
+
payTo: string;
|
|
47
|
+
facilitator?: {
|
|
48
|
+
role: 'x402-svm-fee-payer';
|
|
49
|
+
publicKey: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
docs: {
|
|
53
|
+
npm: string;
|
|
54
|
+
github: string;
|
|
55
|
+
userDocs: string;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @name LandingPublicPaymentStats
|
|
60
|
+
* @description Public-safe aggregate payment metrics displayed on the hosted landing page.
|
|
61
|
+
*/
|
|
62
|
+
export interface LandingPublicPaymentStats {
|
|
63
|
+
totalVolumeUsd: number;
|
|
64
|
+
totalSettlements: number;
|
|
65
|
+
totalPaymentRequests: number;
|
|
66
|
+
totalVerifiedPayments: number;
|
|
67
|
+
totalFailedSettlements: number;
|
|
68
|
+
lastSettlementAt?: string;
|
|
69
|
+
ledgerAvailable: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @name LandingPageModel
|
|
73
|
+
* @description Complete data contract for rendering the hosted SAP MCP public homepage.
|
|
74
|
+
*/
|
|
75
|
+
export interface LandingPageModel {
|
|
76
|
+
endpoint: LandingEndpoint;
|
|
77
|
+
info: LandingPublicServerInfo;
|
|
78
|
+
paymentStats: LandingPublicPaymentStats;
|
|
79
|
+
pageUrl: string;
|
|
80
|
+
title: string;
|
|
81
|
+
installScriptCommand: string;
|
|
82
|
+
wizardCommand: string;
|
|
83
|
+
paidCallCommand: string;
|
|
84
|
+
paidCallAddonPath: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @name LandingLink
|
|
88
|
+
* @description Public navigation link rendered in the top navigation or footer.
|
|
89
|
+
*/
|
|
90
|
+
export interface LandingLink {
|
|
91
|
+
label: string;
|
|
92
|
+
href: string;
|
|
93
|
+
tone?: 'primary' | 'default';
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/remote/public-home/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,KAAK,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;I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AAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,EAAE,uBAAuB,CAAC;IAC9B,YAAY,EAAE,yBAAyB,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/remote/public-home/types.ts"],"names":[],"mappings":""}
|
package/dist/remote/server.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { type RemoteRateLimitConfig } from './rate-limiter.js';
|
|
|
12
12
|
* @description Resolved public logo asset response metadata for browser and crawler icon routes.
|
|
13
13
|
*/
|
|
14
14
|
export interface PublicLogoAsset {
|
|
15
|
-
contentType: 'image/png' | 'image/x-icon';
|
|
15
|
+
contentType: 'image/png' | 'image/svg+xml' | 'image/x-icon';
|
|
16
16
|
contentLength: number;
|
|
17
17
|
body?: Buffer;
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/remote/server.ts"],"names":[],"mappings":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BAEd,MAAM,CAAC,EAAE,eAAe;IAa3C;;;OAGG;IACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA6OnC;;;OAGG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAkBlC;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;;OAGG;YACW,wBAAwB;IA4BtC;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IAmCnC;;;OAGG;YACW,wBAAwB;IAqBtC;;;OAGG;YACW,8BAA8B;IAiC5C;;;OAGG;IACH,OAAO,CAAC,SAAS;CAoBlB;AAED;;;GAGG;AACH,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,IAAI,CAAC,CAgBjE"}
|
package/dist/remote/server.js
CHANGED
|
@@ -17,9 +17,12 @@ import { AuthManager } from './auth/index.js';
|
|
|
17
17
|
import { McpMonetizationGate, resolvePaymentNetwork } from '../payments/index.js';
|
|
18
18
|
import { generatePayShProviderYaml } from '../payments/pay-sh-spec.js';
|
|
19
19
|
import { RemoteRateLimiter, buildRemoteRateLimitConfigFromEnv } from './rate-limiter.js';
|
|
20
|
+
import { renderLandingPage } from './public-home/index.js';
|
|
20
21
|
const PUBLIC_SERVER_TITLE = 'SAP MCP Server | OOBE Protocol';
|
|
21
22
|
const PUBLIC_SERVER_DESCRIPTION = 'Hosted Solana-native MCP gateway for Synapse Agent Protocol tools, x402/pay.sh monetization, SNS identity, and agent operations.';
|
|
22
23
|
const LOGO_ASSET_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'assets', 'explorer_logo.png');
|
|
24
|
+
const OOBE_LOGO_ASSET_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'assets', 'oobe-logo.png');
|
|
25
|
+
const LOGO_ASSET_ROOT_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'assets', 'logos');
|
|
23
26
|
const DOCS_ROOT_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'docs');
|
|
24
27
|
const USER_DOCS_ROOT_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'USER_DOCS');
|
|
25
28
|
const PAYMENT_STATS_CACHE_MS = 15_000;
|
|
@@ -33,8 +36,18 @@ const USDC_MAINNET_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
|
|
|
33
36
|
const USDC_DEVNET_MINT = '4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU';
|
|
34
37
|
const MCP_REGISTRY_AUTH_PATH = '/.well-known/mcp-registry-auth';
|
|
35
38
|
let logoAssetCache;
|
|
39
|
+
let oobeLogoAssetCache;
|
|
36
40
|
let paymentStatsCache;
|
|
37
41
|
let serverCardCapabilitiesCache;
|
|
42
|
+
const PUBLIC_LOGO_ASSETS = {
|
|
43
|
+
'/logos/drift.svg': { filename: 'drift.svg', contentType: 'image/svg+xml' },
|
|
44
|
+
'/logos/jupiter.ico': { filename: 'jupiter.ico', contentType: 'image/x-icon' },
|
|
45
|
+
'/logos/mcp.svg': { filename: 'mcp.svg', contentType: 'image/svg+xml' },
|
|
46
|
+
'/logos/meteora.png': { filename: 'meteora.png', contentType: 'image/png' },
|
|
47
|
+
'/logos/orca.ico': { filename: 'orca.ico', contentType: 'image/x-icon' },
|
|
48
|
+
'/logos/raydium.ico': { filename: 'raydium.ico', contentType: 'image/x-icon' },
|
|
49
|
+
'/logos/smithery.svg': { filename: 'smithery.svg', contentType: 'image/svg+xml' },
|
|
50
|
+
};
|
|
38
51
|
/**
|
|
39
52
|
* @name parseApiKeys
|
|
40
53
|
* @description Parses comma-separated `apiKey=userId` entries from environment configuration.
|
|
@@ -376,6 +389,23 @@ export function resolvePublicLogoAsset(method, pathname) {
|
|
|
376
389
|
if (method !== 'GET' && method !== 'HEAD') {
|
|
377
390
|
return undefined;
|
|
378
391
|
}
|
|
392
|
+
const logoAsset = PUBLIC_LOGO_ASSETS[pathname];
|
|
393
|
+
if (logoAsset !== undefined) {
|
|
394
|
+
const image = readFileSync(join(LOGO_ASSET_ROOT_PATH, logoAsset.filename));
|
|
395
|
+
return {
|
|
396
|
+
contentType: logoAsset.contentType,
|
|
397
|
+
contentLength: image.byteLength,
|
|
398
|
+
body: method === 'HEAD' ? undefined : image,
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
if (pathname === '/oobe-logo.png') {
|
|
402
|
+
const image = readOobeLogoAsset();
|
|
403
|
+
return {
|
|
404
|
+
contentType: 'image/png',
|
|
405
|
+
contentLength: image.byteLength,
|
|
406
|
+
body: method === 'HEAD' ? undefined : image,
|
|
407
|
+
};
|
|
408
|
+
}
|
|
379
409
|
const image = readLogoAsset();
|
|
380
410
|
const body = method === 'HEAD' ? undefined : image;
|
|
381
411
|
if (['/favicon.png', '/apple-touch-icon.png', '/og.png'].includes(pathname)) {
|
|
@@ -415,6 +445,14 @@ function readLogoAsset() {
|
|
|
415
445
|
logoAssetCache ??= readFileSync(LOGO_ASSET_PATH);
|
|
416
446
|
return logoAssetCache;
|
|
417
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* @name readOobeLogoAsset
|
|
450
|
+
* @description Loads the bundled OOBE mark used by the public navigation link.
|
|
451
|
+
*/
|
|
452
|
+
function readOobeLogoAsset() {
|
|
453
|
+
oobeLogoAssetCache ??= readFileSync(OOBE_LOGO_ASSET_PATH);
|
|
454
|
+
return oobeLogoAssetCache;
|
|
455
|
+
}
|
|
418
456
|
/**
|
|
419
457
|
* @name readPublicPaymentStats
|
|
420
458
|
* @description Reads cached public-safe payment totals from the append-only usage ledger.
|
|
@@ -728,7 +766,7 @@ export function buildOpenApiSpec(req, config) {
|
|
|
728
766
|
title: 'SAP MCP Server',
|
|
729
767
|
version: MCP_SERVER_VERSION,
|
|
730
768
|
description: 'MCP gateway for Solana DeFi, SAP agent registry, and x402 micropayments. 248 tools across Jupiter, Drift, Metaplex, Pump.fun, Raydium, Orca, and more.',
|
|
731
|
-
'x-guidance': 'Connect to POST /mcp with Accept: application/json, text/event-stream. Initialize an MCP session first, then call tools. Paid tools return a payment_required JSON-RPC error (HTTP 200 for MCP SDK compatibility) or HTTP 402 for non-MCP clients. Use
|
|
769
|
+
'x-guidance': 'Connect to POST /mcp with Accept: application/json, text/event-stream. Initialize an MCP session first, then call tools. Paid tools return a payment_required JSON-RPC error (HTTP 200 for MCP SDK compatibility) or HTTP 402 for non-MCP clients. Use the local sap_payments_call_paid_tool bridge or npx sap-mcp-x402-paid-call to self-pay and retry.',
|
|
732
770
|
contact: {
|
|
733
771
|
name: 'OOBE Protocol Labs',
|
|
734
772
|
url: 'https://github.com/OOBE-PROTOCOL/sap-mcp',
|
|
@@ -799,7 +837,11 @@ export function buildOpenApiSpec(req, config) {
|
|
|
799
837
|
description: 'MCP method.',
|
|
800
838
|
examples: ['initialize', 'tools/list', 'prompts/list', 'resources/list', 'ping'],
|
|
801
839
|
},
|
|
802
|
-
params: {
|
|
840
|
+
params: {
|
|
841
|
+
type: 'object',
|
|
842
|
+
description: 'JSON-RPC parameters for the requested MCP method. Use an empty object when the method has no parameters.',
|
|
843
|
+
additionalProperties: true,
|
|
844
|
+
},
|
|
803
845
|
},
|
|
804
846
|
required: ['jsonrpc', 'id', 'method'],
|
|
805
847
|
},
|
|
@@ -938,262 +980,17 @@ export function buildLandingHtml(req, config, endpoint = 'root') {
|
|
|
938
980
|
const title = endpoint === 'mcp'
|
|
939
981
|
? 'SAP MCP Streamable HTTP Endpoint | OOBE Protocol'
|
|
940
982
|
: info.title;
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
<meta name="description" content="${escapeHtml(info.description)}">
|
|
953
|
-
<meta name="robots" content="index,follow">
|
|
954
|
-
<link rel="canonical" href="${escapeHtml(pageUrl)}">
|
|
955
|
-
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
956
|
-
<link rel="icon" type="image/png" href="/favicon.png">
|
|
957
|
-
<link rel="shortcut icon" href="/favicon.ico">
|
|
958
|
-
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
|
959
|
-
<meta property="og:type" content="website">
|
|
960
|
-
<meta property="og:title" content="${escapeHtml(title)}">
|
|
961
|
-
<meta property="og:description" content="${escapeHtml(info.description)}">
|
|
962
|
-
<meta property="og:url" content="${escapeHtml(pageUrl)}">
|
|
963
|
-
<meta property="og:image" content="${escapeHtml(info.endpoints.favicon)}">
|
|
964
|
-
<meta name="twitter:card" content="summary">
|
|
965
|
-
<meta name="twitter:title" content="${escapeHtml(title)}">
|
|
966
|
-
<meta name="twitter:description" content="${escapeHtml(info.description)}">
|
|
967
|
-
<meta name="twitter:image" content="${escapeHtml(info.endpoints.favicon)}">
|
|
968
|
-
<script type="application/ld+json">${publicInfo}</script>
|
|
969
|
-
<style>
|
|
970
|
-
:root {
|
|
971
|
-
color-scheme: dark;
|
|
972
|
-
--aqua: #28d8e8;
|
|
973
|
-
--aqua-soft: rgba(40,216,232,.13);
|
|
974
|
-
--ink: #f4fbff;
|
|
975
|
-
--muted: #a8bdc6;
|
|
976
|
-
--subtle: #76909a;
|
|
977
|
-
--panel: rgba(255,255,255,.062);
|
|
978
|
-
--panel-strong: rgba(255,255,255,.095);
|
|
979
|
-
--line: rgba(255,255,255,.14);
|
|
980
|
-
--line-strong: rgba(40,216,232,.38);
|
|
981
|
-
--surface: #080d12;
|
|
982
|
-
--success: #8ef3c5;
|
|
983
|
-
--warning: #ffd38a;
|
|
984
|
-
}
|
|
985
|
-
* { box-sizing: border-box; }
|
|
986
|
-
html { scroll-behavior: smooth; }
|
|
987
|
-
body {
|
|
988
|
-
margin: 0;
|
|
989
|
-
min-height: 100vh;
|
|
990
|
-
font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
991
|
-
color: var(--ink);
|
|
992
|
-
background:
|
|
993
|
-
linear-gradient(115deg, rgba(40,216,232,.13), transparent 34%),
|
|
994
|
-
linear-gradient(180deg, #0a1218 0%, var(--surface) 46%, #05080b 100%);
|
|
995
|
-
}
|
|
996
|
-
body::before {
|
|
997
|
-
content: "";
|
|
998
|
-
position: fixed;
|
|
999
|
-
inset: 0;
|
|
1000
|
-
pointer-events: none;
|
|
1001
|
-
background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
|
|
1002
|
-
background-size: 64px 64px;
|
|
1003
|
-
mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 72%);
|
|
1004
|
-
}
|
|
1005
|
-
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 40px; position: relative; }
|
|
1006
|
-
header { display: grid; grid-template-columns: 92px 1fr; gap: 24px; align-items: center; margin-bottom: 30px; }
|
|
1007
|
-
img.logo { width: 92px; height: 92px; border-radius: 24px; box-shadow: 0 18px 70px rgba(40,216,232,.22); }
|
|
1008
|
-
h1 { margin: 0; max-width: 920px; font-size: clamp(2.2rem, 5vw, 5rem); line-height: .95; letter-spacing: 0; }
|
|
1009
|
-
p { margin: 10px 0 0; color: var(--muted); max-width: 760px; }
|
|
1010
|
-
a { color: var(--aqua); text-underline-offset: 4px; }
|
|
1011
|
-
a:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; border-radius: 6px; }
|
|
1012
|
-
code {
|
|
1013
|
-
color: #e9fcff;
|
|
1014
|
-
overflow-wrap: anywhere;
|
|
1015
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
|
1016
|
-
font-size: .92em;
|
|
1017
|
-
}
|
|
1018
|
-
.badge { display: inline-flex; align-items: center; gap: 8px; color: var(--aqua); font-weight: 750; text-transform: uppercase; font-size: .78rem; letter-spacing: 0; }
|
|
1019
|
-
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
|
|
1020
|
-
.button {
|
|
1021
|
-
display: inline-flex;
|
|
1022
|
-
min-height: 42px;
|
|
1023
|
-
align-items: center;
|
|
1024
|
-
justify-content: center;
|
|
1025
|
-
border: 1px solid var(--line-strong);
|
|
1026
|
-
border-radius: 8px;
|
|
1027
|
-
padding: 9px 14px;
|
|
1028
|
-
background: var(--aqua-soft);
|
|
1029
|
-
color: var(--ink);
|
|
1030
|
-
font-weight: 700;
|
|
1031
|
-
text-decoration: none;
|
|
1032
|
-
}
|
|
1033
|
-
.button.secondary { background: transparent; border-color: var(--line); color: var(--aqua); }
|
|
1034
|
-
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; margin-top: 28px; }
|
|
1035
|
-
.card {
|
|
1036
|
-
min-height: 148px;
|
|
1037
|
-
border: 1px solid var(--line);
|
|
1038
|
-
border-radius: 8px;
|
|
1039
|
-
background: var(--panel);
|
|
1040
|
-
padding: 18px;
|
|
1041
|
-
color: inherit;
|
|
1042
|
-
text-decoration: none;
|
|
1043
|
-
}
|
|
1044
|
-
.card.strong { background: linear-gradient(180deg, var(--panel-strong), var(--panel)); border-color: var(--line-strong); }
|
|
1045
|
-
.span-3 { grid-column: span 3; }
|
|
1046
|
-
.span-4 { grid-column: span 4; }
|
|
1047
|
-
.span-5 { grid-column: span 5; }
|
|
1048
|
-
.span-6 { grid-column: span 6; }
|
|
1049
|
-
.span-7 { grid-column: span 7; }
|
|
1050
|
-
.span-8 { grid-column: span 8; }
|
|
1051
|
-
.span-12 { grid-column: span 12; }
|
|
1052
|
-
h2 { margin: 0 0 12px; font-size: 1rem; color: var(--aqua); letter-spacing: 0; }
|
|
1053
|
-
h3 { margin: 0 0 6px; font-size: .86rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0; }
|
|
1054
|
-
.metric { margin-top: 4px; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1; font-weight: 800; letter-spacing: 0; }
|
|
1055
|
-
.metric.small { font-size: clamp(1.55rem, 3vw, 2.3rem); }
|
|
1056
|
-
.caption { margin-top: 10px; color: var(--subtle); font-size: .94rem; }
|
|
1057
|
-
.status { color: var(--success); }
|
|
1058
|
-
.warning { color: var(--warning); }
|
|
1059
|
-
.list { padding-left: 18px; margin: 0; color: var(--muted); }
|
|
1060
|
-
.list li + li { margin-top: 8px; }
|
|
1061
|
-
.command { margin-top: 12px; border: 1px solid rgba(255,255,255,.10); border-radius: 8px; background: rgba(0,0,0,.28); padding: 13px; }
|
|
1062
|
-
.download-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
|
|
1063
|
-
.download-link {
|
|
1064
|
-
display: grid;
|
|
1065
|
-
min-height: 74px;
|
|
1066
|
-
align-content: center;
|
|
1067
|
-
gap: 4px;
|
|
1068
|
-
border: 1px solid var(--line);
|
|
1069
|
-
border-radius: 8px;
|
|
1070
|
-
background: rgba(0,0,0,.18);
|
|
1071
|
-
padding: 12px;
|
|
1072
|
-
color: var(--ink);
|
|
1073
|
-
text-decoration: none;
|
|
1074
|
-
}
|
|
1075
|
-
.download-link strong { color: var(--aqua); }
|
|
1076
|
-
.download-link span { color: var(--muted); font-size: .88rem; }
|
|
1077
|
-
.endpoint-list { display: grid; gap: 10px; margin-top: 10px; }
|
|
1078
|
-
.endpoint-row { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: baseline; }
|
|
1079
|
-
.method { color: var(--success); font: 700 .78rem/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
|
|
1080
|
-
.footer { margin-top: 26px; color: var(--muted); font-size: .94rem; }
|
|
1081
|
-
@media (max-width: 860px) {
|
|
1082
|
-
header { grid-template-columns: 1fr; }
|
|
1083
|
-
img.logo { width: 76px; height: 76px; border-radius: 20px; }
|
|
1084
|
-
.span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
|
|
1085
|
-
.download-grid { grid-template-columns: 1fr; }
|
|
1086
|
-
}
|
|
1087
|
-
@media (min-width: 861px) and (max-width: 1120px) {
|
|
1088
|
-
.span-3, .span-4 { grid-column: span 6; }
|
|
1089
|
-
.span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
|
|
1090
|
-
}
|
|
1091
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1092
|
-
html { scroll-behavior: auto; }
|
|
1093
|
-
}
|
|
1094
|
-
</style>
|
|
1095
|
-
</head>
|
|
1096
|
-
<body>
|
|
1097
|
-
<main>
|
|
1098
|
-
<header>
|
|
1099
|
-
<img class="logo" src="/favicon.png" alt="SAP MCP logo" width="92" height="92">
|
|
1100
|
-
<div>
|
|
1101
|
-
<span class="badge">OOBE Protocol • ${escapeHtml(endpointLabel)}</span>
|
|
1102
|
-
<h1>${escapeHtml(title)}</h1>
|
|
1103
|
-
<p>${escapeHtml(info.description)}</p>
|
|
1104
|
-
<div class="hero-actions">
|
|
1105
|
-
<a class="button" href="/wizard/install.sh">Install wizard</a>
|
|
1106
|
-
<a class="button secondary" href="/wizard/downloads.json">Downloads</a>
|
|
1107
|
-
<a class="button secondary" href="/docs">Docs</a>
|
|
1108
|
-
<a class="button secondary" href="/server.json">Server JSON</a>
|
|
1109
|
-
<a class="button secondary" href="/openapi.json">OpenAPI</a>
|
|
1110
|
-
<a class="button secondary" href="/pay/provider.yml">pay.sh YAML</a>
|
|
1111
|
-
<a class="button secondary" href="/.well-known/agent-card.json">Agent card</a>
|
|
1112
|
-
</div>
|
|
1113
|
-
</div>
|
|
1114
|
-
</header>
|
|
1115
|
-
|
|
1116
|
-
<div class="bento" aria-label="SAP MCP hosted server overview">
|
|
1117
|
-
<section class="card strong span-4">
|
|
1118
|
-
<h3>Facilitator Volume</h3>
|
|
1119
|
-
<div class="metric">${escapeHtml(formatUsd(paymentStats.totalVolumeUsd))}</div>
|
|
1120
|
-
<p class="caption">Estimated settled x402/pay.sh tool volume recorded by the hosted payment ledger.</p>
|
|
1121
|
-
</section>
|
|
1122
|
-
|
|
1123
|
-
<section class="card strong span-4">
|
|
1124
|
-
<h3>Total Settlements</h3>
|
|
1125
|
-
<div class="metric">${escapeHtml(formatInteger(paymentStats.totalSettlements))}</div>
|
|
1126
|
-
<p class="caption">${escapeHtml(formatLastSettlement(paymentStats))}</p>
|
|
1127
|
-
</section>
|
|
1128
|
-
|
|
1129
|
-
<section class="card span-4">
|
|
1130
|
-
<h3>Payment Requests</h3>
|
|
1131
|
-
<div class="metric">${escapeHtml(formatInteger(paymentStats.totalPaymentRequests))}</div>
|
|
1132
|
-
<p class="caption"><span class="status">${escapeHtml(formatInteger(paymentStats.totalVerifiedPayments))}</span> verified, <span class="warning">${escapeHtml(formatInteger(paymentStats.totalFailedSettlements))}</span> failed settlements.</p>
|
|
1133
|
-
</section>
|
|
1134
|
-
|
|
1135
|
-
<section class="card span-7">
|
|
1136
|
-
<h2>Install Wizard</h2>
|
|
1137
|
-
<p>Create a local SAP MCP profile, signer, policy limits, and optional client injection. Hosted users still sign x402/pay.sh and value-moving operations from their own machine or external signer.</p>
|
|
1138
|
-
<div class="command"><code>${escapeHtml(installScriptCommand)}</code></div>
|
|
1139
|
-
<div class="command"><code>${escapeHtml(wizardCommand)}</code></div>
|
|
1140
|
-
</section>
|
|
1141
|
-
|
|
1142
|
-
<section class="card span-5">
|
|
1143
|
-
<h2>Native Downloads</h2>
|
|
1144
|
-
<p>Use the desktop wizard when you want a guided setup without touching config files by hand.</p>
|
|
1145
|
-
<div class="download-grid">
|
|
1146
|
-
<a class="download-link" href="${escapeHtml(info.downloads.desktopWizard.windowsX64Setup)}"><strong>Windows</strong><span>x64 setup .exe</span></a>
|
|
1147
|
-
<a class="download-link" href="${escapeHtml(info.downloads.desktopWizard.macosArm64Dmg)}"><strong>macOS</strong><span>Apple Silicon .dmg</span></a>
|
|
1148
|
-
<a class="download-link" href="${escapeHtml(info.downloads.desktopWizard.linuxX64TarGz)}"><strong>Linux</strong><span>x64 tar.gz</span></a>
|
|
1149
|
-
</div>
|
|
1150
|
-
<p class="caption">Machine-readable links: <a href="${escapeHtml(info.endpoints.wizardDownloads)}">/wizard/downloads.json</a>.</p>
|
|
1151
|
-
</section>
|
|
1152
|
-
|
|
1153
|
-
<section class="card span-5">
|
|
1154
|
-
<h2>Payments</h2>
|
|
1155
|
-
<ul class="list">
|
|
1156
|
-
<li><strong>x402:</strong> paid MCP tool calls return HTTP 402 with payment requirements, then settle through the OOBE facilitator.</li>
|
|
1157
|
-
<li><strong>pay.sh:</strong> public provider YAML is available at <a href="${escapeHtml(info.endpoints.payShProvider)}">/pay/provider.yml</a> for catalog and proxy workflows.</li>
|
|
1158
|
-
<li><strong>Local stdio:</strong> free by default; monetization applies to hosted remote usage.</li>
|
|
1159
|
-
</ul>
|
|
1160
|
-
</section>
|
|
1161
|
-
|
|
1162
|
-
<section class="card strong span-12">
|
|
1163
|
-
<h2>x402 Paid-Call Plugin For Agents</h2>
|
|
1164
|
-
<p>Agents that can reach hosted MCP but cannot replay x402 challenges natively can install the wizard addon or invoke the local paid-call helper directly. The helper signs the payment payload locally and retries the hosted tool call without sending keypair bytes to OOBE.</p>
|
|
1165
|
-
<div class="command"><code>Addon path: ${escapeHtml(X402_PAID_CALL_ADDON_PATH)}</code></div>
|
|
1166
|
-
<div class="command"><code>${escapeHtml(x402PaidCallCommand)}</code></div>
|
|
1167
|
-
</section>
|
|
1168
|
-
|
|
1169
|
-
<section class="card span-8">
|
|
1170
|
-
<h2>Endpoints</h2>
|
|
1171
|
-
<div class="endpoint-list">
|
|
1172
|
-
<div class="endpoint-row"><span class="method">POST</span><code>${escapeHtml(info.endpoints.mcp)}</code></div>
|
|
1173
|
-
<div class="endpoint-row"><span class="method">GET</span><code>${escapeHtml(info.endpoints.docs)}</code></div>
|
|
1174
|
-
<div class="endpoint-row"><span class="method">GET</span><code>${escapeHtml(info.endpoints.health)}</code></div>
|
|
1175
|
-
<div class="endpoint-row"><span class="method">GET</span><code>${escapeHtml(info.endpoints.serverInfo)}</code></div>
|
|
1176
|
-
<div class="endpoint-row"><span class="method">GET</span><code>${escapeHtml(info.endpoints.openApi)}</code></div>
|
|
1177
|
-
<div class="endpoint-row"><span class="method">GET</span><code>${escapeHtml(info.endpoints.x402Discovery)}</code></div>
|
|
1178
|
-
<div class="endpoint-row"><span class="method">GET</span><code>${escapeHtml(info.endpoints.payShProvider)}</code></div>
|
|
1179
|
-
<div class="endpoint-row"><span class="method">GET</span><code>${escapeHtml(info.endpoints.agentCard)}</code></div>
|
|
1180
|
-
<div class="endpoint-row"><span class="method">GET</span><code>${escapeHtml(info.endpoints.wizardDescriptor)}</code></div>
|
|
1181
|
-
</div>
|
|
1182
|
-
</section>
|
|
1183
|
-
|
|
1184
|
-
<section class="card span-4">
|
|
1185
|
-
<h2>Security Boundary</h2>
|
|
1186
|
-
<ul class="list">
|
|
1187
|
-
<li>Keypair bytes are never exposed by public endpoints.</li>
|
|
1188
|
-
<li>RPC secrets are redacted from public metadata and UI.</li>
|
|
1189
|
-
<li>Paid tools require payment before execution.</li>
|
|
1190
|
-
</ul>
|
|
1191
|
-
</section>
|
|
1192
|
-
</div>
|
|
1193
|
-
<p class="footer">Use <a href="/server.json">/server.json</a> for machine-readable public metadata. MCP clients should connect to <a href="/mcp">/mcp</a> with <code>Accept: application/json, text/event-stream</code>.</p>
|
|
1194
|
-
</main>
|
|
1195
|
-
</body>
|
|
1196
|
-
</html>`;
|
|
983
|
+
return renderLandingPage({
|
|
984
|
+
endpoint,
|
|
985
|
+
info,
|
|
986
|
+
paymentStats,
|
|
987
|
+
pageUrl,
|
|
988
|
+
title,
|
|
989
|
+
installScriptCommand: 'curl -fsSL https://mcp.sap.oobeprotocol.ai/wizard/install.sh | sh',
|
|
990
|
+
wizardCommand: WIZARD_NPM_COMMAND,
|
|
991
|
+
paidCallCommand: X402_PAID_CALL_NPX_COMMAND,
|
|
992
|
+
paidCallAddonPath: X402_PAID_CALL_ADDON_PATH,
|
|
993
|
+
});
|
|
1197
994
|
}
|
|
1198
995
|
/**
|
|
1199
996
|
* @name buildDocsHtml
|
|
@@ -1312,30 +1109,6 @@ function acceptsHtmlPreview(req) {
|
|
|
1312
1109
|
const accept = String(req.headers.accept ?? '');
|
|
1313
1110
|
return accept.includes('text/html') && !accept.includes('text/event-stream') && !accept.includes('application/json');
|
|
1314
1111
|
}
|
|
1315
|
-
function formatUsd(value) {
|
|
1316
|
-
if (!Number.isFinite(value) || value <= 0) {
|
|
1317
|
-
return '$0.00';
|
|
1318
|
-
}
|
|
1319
|
-
return `$${value.toLocaleString('en-US', {
|
|
1320
|
-
minimumFractionDigits: value < 1 ? 3 : 2,
|
|
1321
|
-
maximumFractionDigits: value < 1 ? 3 : 2,
|
|
1322
|
-
})}`;
|
|
1323
|
-
}
|
|
1324
|
-
function formatInteger(value) {
|
|
1325
|
-
if (!Number.isFinite(value) || value <= 0) {
|
|
1326
|
-
return '0';
|
|
1327
|
-
}
|
|
1328
|
-
return Math.trunc(value).toLocaleString('en-US');
|
|
1329
|
-
}
|
|
1330
|
-
function formatLastSettlement(stats) {
|
|
1331
|
-
if (!stats.ledgerAvailable) {
|
|
1332
|
-
return 'Ledger not initialized yet. Metrics appear after the first paid hosted call.';
|
|
1333
|
-
}
|
|
1334
|
-
if (!stats.lastSettlementAt) {
|
|
1335
|
-
return 'No settlements yet. Paid requests will update this card after successful settlement.';
|
|
1336
|
-
}
|
|
1337
|
-
return `Last settlement: ${stats.lastSettlementAt}`;
|
|
1338
|
-
}
|
|
1339
1112
|
/**
|
|
1340
1113
|
* @name escapeHtml
|
|
1341
1114
|
* @description Escapes dynamic strings before embedding them in public HTML metadata.
|