mrmainspring 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/cli.d.ts +9 -0
- package/dist/cli.js +147 -0
- package/dist/config.js +4 -3
- package/dist/env-file.d.ts +4 -0
- package/dist/env-file.js +28 -7
- package/dist/index.js +6 -1
- package/dist/paths.d.ts +7 -0
- package/dist/paths.js +20 -0
- package/package.json +61 -60
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@ boundaries, and x402 settlement-provider wiring.
|
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npm install -g mrmainspring
|
|
11
|
+
mainspring setup cursor
|
|
11
12
|
```
|
|
12
13
|
|
|
13
14
|
Run the stdio MCP server:
|
|
@@ -25,13 +26,14 @@ npm run mcp:stdio
|
|
|
25
26
|
|
|
26
27
|
## Environment
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
No environment variables are required for local memory, Grimoire, audit, or
|
|
30
|
+
payment preflight tools. `mainspring setup` creates the local config, data, and
|
|
31
|
+
logs directories under the user's standard app config folder. Use
|
|
32
|
+
`SIGIL_ENV_FILE` to point at a specific env file for advanced setups.
|
|
30
33
|
|
|
31
34
|
Important package boundaries:
|
|
32
35
|
|
|
33
|
-
- Keep `.env`,
|
|
34
|
-
package.
|
|
36
|
+
- Keep `.env`, local keys, and generated demo data outside the npm package.
|
|
35
37
|
- Real Casper submission remains gated by `CASPER_ENABLE_REAL_SUBMISSION=true`.
|
|
36
38
|
- Real x402 settlement remains gated by `X402_ENABLE_REAL_SETTLEMENT=true` and
|
|
37
39
|
a configured `X402_SIGNER_URL`.
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type InitResult = {
|
|
2
|
+
envFile: string;
|
|
3
|
+
dataDir: string;
|
|
4
|
+
logsDir: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function runCliCommand(args: string[]): boolean;
|
|
7
|
+
export declare function initializeLocalSetup(env?: NodeJS.ProcessEnv): InitResult;
|
|
8
|
+
export declare function formatMcpConfig(): string;
|
|
9
|
+
export {};
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname } from "node:path";
|
|
3
|
+
import { loadConfig } from "./config.js";
|
|
4
|
+
import { ensureGrimoireMasterKey, loadLocalEnvFile, resolveEnvPath } from "./env-file.js";
|
|
5
|
+
import { getDefaultMainspringPaths } from "./paths.js";
|
|
6
|
+
const VERSION = "0.1.1";
|
|
7
|
+
const HELP = `Mr Mainspring MCP server
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
mainspring Start the MCP stdio server
|
|
11
|
+
mainspring --help Show this help
|
|
12
|
+
mainspring --version Show the installed version
|
|
13
|
+
mainspring init Create local config, data, and logs directories
|
|
14
|
+
mainspring config Print MCP client config JSON
|
|
15
|
+
mainspring setup [client] Initialize local files and print MCP config
|
|
16
|
+
mainspring doctor Check the local setup
|
|
17
|
+
|
|
18
|
+
MCP client config:
|
|
19
|
+
{
|
|
20
|
+
"mcpServers": {
|
|
21
|
+
"mainspring": {
|
|
22
|
+
"command": "mainspring"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Advanced users can still set SIGIL_ENV_FILE, SIGIL_DATA_DIR, Supabase, Casper,
|
|
28
|
+
and x402 env vars. No env vars are required for local memory, Grimoire, audit,
|
|
29
|
+
or payment preflight tools.
|
|
30
|
+
`;
|
|
31
|
+
export function runCliCommand(args) {
|
|
32
|
+
const [command, target] = args;
|
|
33
|
+
if (!command || command === "stdio" || command === "server" || command === "mcp") {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
if (command === "--help" || command === "-h" || command === "help") {
|
|
37
|
+
process.stdout.write(HELP);
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
if (command === "--version" || command === "-v" || command === "version") {
|
|
41
|
+
process.stdout.write(`${VERSION}\n`);
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
if (command === "init") {
|
|
45
|
+
const result = initializeLocalSetup();
|
|
46
|
+
process.stdout.write(formatInitResult(result));
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
if (command === "config") {
|
|
50
|
+
process.stdout.write(`${formatMcpConfig()}\n`);
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
if (command === "setup") {
|
|
54
|
+
const result = initializeLocalSetup();
|
|
55
|
+
process.stdout.write(formatInitResult(result));
|
|
56
|
+
process.stdout.write(`\nPaste this into ${formatClientName(target)} MCP config:\n\n`);
|
|
57
|
+
process.stdout.write(`${formatMcpConfig()}\n`);
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
if (command === "doctor") {
|
|
61
|
+
process.stdout.write(formatDoctorReport());
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
process.stderr.write(`Unknown command: ${command}\n\n${HELP}`);
|
|
65
|
+
process.exitCode = 1;
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
export function initializeLocalSetup(env = process.env) {
|
|
69
|
+
const paths = getDefaultMainspringPaths(env);
|
|
70
|
+
const envFile = env.SIGIL_ENV_FILE?.trim() ? resolveEnvPath(env) : paths.envFile;
|
|
71
|
+
mkdirSync(paths.appDir, { recursive: true });
|
|
72
|
+
mkdirSync(paths.dataDir, { recursive: true });
|
|
73
|
+
mkdirSync(paths.logsDir, { recursive: true });
|
|
74
|
+
mkdirSync(dirname(envFile), { recursive: true });
|
|
75
|
+
if (!existsSync(envFile)) {
|
|
76
|
+
writeFileSync(envFile, [
|
|
77
|
+
"# Mr Mainspring local config",
|
|
78
|
+
"SIGIL_STORAGE_BACKEND=file",
|
|
79
|
+
`SIGIL_DATA_DIR=${quoteEnvValue(paths.dataDir)}`,
|
|
80
|
+
""
|
|
81
|
+
].join("\n"), "utf8");
|
|
82
|
+
}
|
|
83
|
+
const setupEnv = { ...env, SIGIL_ENV_FILE: envFile };
|
|
84
|
+
loadLocalEnvFile(setupEnv);
|
|
85
|
+
ensureGrimoireMasterKey(setupEnv, { announce: false });
|
|
86
|
+
return {
|
|
87
|
+
envFile,
|
|
88
|
+
dataDir: paths.dataDir,
|
|
89
|
+
logsDir: paths.logsDir
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export function formatMcpConfig() {
|
|
93
|
+
return JSON.stringify({
|
|
94
|
+
mcpServers: {
|
|
95
|
+
mainspring: {
|
|
96
|
+
command: "mainspring"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}, null, 2);
|
|
100
|
+
}
|
|
101
|
+
function formatInitResult(result) {
|
|
102
|
+
return [
|
|
103
|
+
"Mr Mainspring local setup is ready.",
|
|
104
|
+
`Config: ${result.envFile}`,
|
|
105
|
+
`Data: ${result.dataDir}`,
|
|
106
|
+
`Logs: ${result.logsDir}`,
|
|
107
|
+
""
|
|
108
|
+
].join("\n");
|
|
109
|
+
}
|
|
110
|
+
function formatDoctorReport(env = process.env) {
|
|
111
|
+
const paths = getDefaultMainspringPaths(env);
|
|
112
|
+
const envFile = resolveEnvPath(env);
|
|
113
|
+
const envCopy = { ...env };
|
|
114
|
+
loadLocalEnvFile(envCopy);
|
|
115
|
+
const lines = ["Mr Mainspring doctor"];
|
|
116
|
+
const nodeMajor = Number.parseInt(process.versions.node.split(".")[0] ?? "0", 10);
|
|
117
|
+
lines.push(formatCheck(nodeMajor >= 20, `Node.js ${process.versions.node}`, "Node.js 20 or newer is required"));
|
|
118
|
+
lines.push(formatCheck(existsSync(envFile), `Config file: ${envFile}`, "Config file missing; run mainspring init"));
|
|
119
|
+
lines.push(formatCheck(existsSync(paths.dataDir), `Data dir: ${paths.dataDir}`, "Data dir missing; run mainspring init"));
|
|
120
|
+
lines.push(formatCheck(existsSync(paths.logsDir), `Logs dir: ${paths.logsDir}`, "Logs dir missing; run mainspring init"));
|
|
121
|
+
try {
|
|
122
|
+
const config = loadConfig(envCopy);
|
|
123
|
+
lines.push(`[ok] Storage backend: ${config.storage.backend}`);
|
|
124
|
+
lines.push(`[ok] Casper real submission: ${config.casper.submissionEnabled ? "enabled" : "disabled"}`);
|
|
125
|
+
lines.push(`[ok] x402 real settlement: ${config.x402.settlementEnabled ? "enabled" : "disabled"}`);
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
lines.push(`[error] ${error instanceof Error ? error.message : String(error)}`);
|
|
129
|
+
process.exitCode = 1;
|
|
130
|
+
}
|
|
131
|
+
return `${lines.join("\n")}\n`;
|
|
132
|
+
}
|
|
133
|
+
function formatCheck(ok, success, failure) {
|
|
134
|
+
return ok ? `[ok] ${success}` : `[warn] ${failure}`;
|
|
135
|
+
}
|
|
136
|
+
function formatClientName(target) {
|
|
137
|
+
if (!target)
|
|
138
|
+
return "your";
|
|
139
|
+
if (target.toLowerCase() === "cursor")
|
|
140
|
+
return "Cursor";
|
|
141
|
+
if (target.toLowerCase() === "claude")
|
|
142
|
+
return "Claude Desktop";
|
|
143
|
+
return target;
|
|
144
|
+
}
|
|
145
|
+
function quoteEnvValue(value) {
|
|
146
|
+
return `"${value.replace(/"/g, "")}"`;
|
|
147
|
+
}
|
package/dist/config.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { dirname, isAbsolute, resolve } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { getDefaultMainspringPaths } from "./paths.js";
|
|
4
5
|
const CASPER_HASH_PATTERN = /^(hash-)?[a-f0-9]{64}$/i;
|
|
5
6
|
const CASPER_PACKAGE_HASH_PATTERN = /^(hash-|package-)?[a-f0-9]{64}$/i;
|
|
6
7
|
export function loadConfig(env = process.env) {
|
|
@@ -13,7 +14,7 @@ export function loadConfig(env = process.env) {
|
|
|
13
14
|
memoryAnchorPackageHash: optionalEnv(env.MEMORY_ANCHOR_PACKAGE_HASH),
|
|
14
15
|
submissionEnabled: parseBoolean(env.CASPER_ENABLE_REAL_SUBMISSION),
|
|
15
16
|
clientBin: optionalEnv(env.CASPER_CLIENT_BIN) ?? "casper-client",
|
|
16
|
-
clientWslDistro: optionalEnv(env.CASPER_CLIENT_WSL_DISTRO),
|
|
17
|
+
clientWslDistro: process.platform === "win32" ? optionalEnv(env.CASPER_CLIENT_WSL_DISTRO) : null,
|
|
17
18
|
anchorSubmissionMode: parseCasperAnchorSubmissionMode(env.CASPER_ANCHOR_SUBMISSION_MODE),
|
|
18
19
|
gasPriceTolerance: optionalEnv(env.CASPER_GAS_PRICE_TOLERANCE) ?? "10",
|
|
19
20
|
pricingMode: optionalEnv(env.CASPER_PRICING_MODE) ?? "classic",
|
|
@@ -37,10 +38,10 @@ export function loadConfig(env = process.env) {
|
|
|
37
38
|
};
|
|
38
39
|
validateX402Config(x402);
|
|
39
40
|
return {
|
|
40
|
-
dataDir: resolve(optionalEnv(env.SIGIL_DATA_DIR) ??
|
|
41
|
+
dataDir: resolve(optionalEnv(env.SIGIL_DATA_DIR) ?? getDefaultMainspringPaths(env).dataDir),
|
|
41
42
|
grimoireMasterKey: loadMasterKey(env.GRIMOIRE_MASTER_KEY),
|
|
42
43
|
serverName: optionalEnv(env.SIGIL_MCP_NAME) ?? "mr-mainspring",
|
|
43
|
-
serverVersion: optionalEnv(env.SIGIL_MCP_VERSION) ?? "0.1.
|
|
44
|
+
serverVersion: optionalEnv(env.SIGIL_MCP_VERSION) ?? "0.1.1",
|
|
44
45
|
storage: loadStorageConfig(env),
|
|
45
46
|
casper,
|
|
46
47
|
x402
|
package/dist/env-file.d.ts
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
1
|
export declare function loadLocalEnvFile(env?: NodeJS.ProcessEnv): string | null;
|
|
2
|
+
export declare function resolveEnvPath(env?: NodeJS.ProcessEnv): string;
|
|
3
|
+
export declare function ensureGrimoireMasterKey(env?: NodeJS.ProcessEnv, options?: {
|
|
4
|
+
announce?: boolean;
|
|
5
|
+
}): void;
|
package/dist/env-file.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
-
import {
|
|
1
|
+
import { appendFileSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
2
|
+
import { randomBytes } from "node:crypto";
|
|
3
|
+
import { dirname, join, resolve } from "node:path";
|
|
3
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { getDefaultMainspringPaths } from "./paths.js";
|
|
4
6
|
export function loadLocalEnvFile(env = process.env) {
|
|
5
7
|
const envPath = resolveEnvPath(env);
|
|
6
|
-
if (!
|
|
8
|
+
if (!existsSync(envPath)) {
|
|
7
9
|
return null;
|
|
8
10
|
}
|
|
9
11
|
const raw = readFileSync(envPath, "utf8");
|
|
@@ -14,14 +16,20 @@ export function loadLocalEnvFile(env = process.env) {
|
|
|
14
16
|
}
|
|
15
17
|
return envPath;
|
|
16
18
|
}
|
|
17
|
-
function resolveEnvPath(env) {
|
|
19
|
+
export function resolveEnvPath(env = process.env) {
|
|
18
20
|
if (env.SIGIL_ENV_FILE?.trim()) {
|
|
19
|
-
return env.SIGIL_ENV_FILE.trim();
|
|
21
|
+
return resolve(env.SIGIL_ENV_FILE.trim());
|
|
20
22
|
}
|
|
21
23
|
const backendRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
22
24
|
const repoRoot = dirname(backendRoot);
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
+
const defaultEnvFile = getDefaultMainspringPaths(env).envFile;
|
|
26
|
+
const candidates = [
|
|
27
|
+
defaultEnvFile,
|
|
28
|
+
join(process.cwd(), ".env"),
|
|
29
|
+
join(backendRoot, ".env"),
|
|
30
|
+
join(repoRoot, ".env")
|
|
31
|
+
];
|
|
32
|
+
return resolve(candidates.find((candidate) => existsSync(candidate)) ?? defaultEnvFile);
|
|
25
33
|
}
|
|
26
34
|
function parseEnv(raw) {
|
|
27
35
|
const entries = [];
|
|
@@ -42,6 +50,19 @@ function parseEnv(raw) {
|
|
|
42
50
|
}
|
|
43
51
|
return entries;
|
|
44
52
|
}
|
|
53
|
+
export function ensureGrimoireMasterKey(env = process.env, options = {}) {
|
|
54
|
+
if (env.GRIMOIRE_MASTER_KEY)
|
|
55
|
+
return;
|
|
56
|
+
const key = randomBytes(32).toString("base64");
|
|
57
|
+
const targetPath = resolveEnvPath(env);
|
|
58
|
+
mkdirSync(dirname(targetPath), { recursive: true });
|
|
59
|
+
const prefix = existsSync(targetPath) && readFileSync(targetPath, "utf8").trim() ? "\n" : "";
|
|
60
|
+
appendFileSync(targetPath, `${prefix}GRIMOIRE_MASTER_KEY=${key}\n`, "utf8");
|
|
61
|
+
env.GRIMOIRE_MASTER_KEY = key;
|
|
62
|
+
if (options.announce !== false) {
|
|
63
|
+
process.stderr.write(`[mr-mainspring] Generated GRIMOIRE_MASTER_KEY at ${targetPath}\n`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
45
66
|
function unquote(value) {
|
|
46
67
|
if ((value.startsWith('"') && value.endsWith('"')) ||
|
|
47
68
|
(value.startsWith("'") && value.endsWith("'"))) {
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import { runCliCommand } from "./cli.js";
|
|
3
4
|
import { loadConfig } from "./config.js";
|
|
4
|
-
import { loadLocalEnvFile } from "./env-file.js";
|
|
5
|
+
import { ensureGrimoireMasterKey, loadLocalEnvFile } from "./env-file.js";
|
|
5
6
|
import { createSigilServer } from "./server.js";
|
|
6
7
|
async function main() {
|
|
8
|
+
if (runCliCommand(process.argv.slice(2))) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
7
11
|
loadLocalEnvFile();
|
|
12
|
+
ensureGrimoireMasterKey();
|
|
8
13
|
const config = loadConfig();
|
|
9
14
|
const server = createSigilServer(config);
|
|
10
15
|
const transport = new StdioServerTransport();
|
package/dist/paths.d.ts
ADDED
package/dist/paths.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { homedir, platform } from "node:os";
|
|
2
|
+
import { join, resolve } from "node:path";
|
|
3
|
+
export function getDefaultMainspringPaths(env = process.env, platformName = platform(), homeDir = homedir()) {
|
|
4
|
+
const appDir = resolve(getDefaultAppDir(env, platformName, homeDir));
|
|
5
|
+
return {
|
|
6
|
+
appDir,
|
|
7
|
+
envFile: join(appDir, ".env"),
|
|
8
|
+
dataDir: join(appDir, "data"),
|
|
9
|
+
logsDir: join(appDir, "logs")
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function getDefaultAppDir(env, platformName, homeDir) {
|
|
13
|
+
if (platformName === "win32") {
|
|
14
|
+
return join(env.APPDATA?.trim() || join(homeDir, "AppData", "Roaming"), "MrMainspring");
|
|
15
|
+
}
|
|
16
|
+
if (platformName === "darwin") {
|
|
17
|
+
return join(homeDir, "Library", "Application Support", "MrMainspring");
|
|
18
|
+
}
|
|
19
|
+
return join(env.XDG_CONFIG_HOME?.trim() || join(homeDir, ".config"), "mrmainspring");
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
2
|
"name": "mrmainspring",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Mr Mainspring MCP backend with memory, Grimoire policies, audit, Casper anchoring, and x402 settlement boundaries.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"bin": {
|
|
8
|
-
"mainspring": "dist/index.js"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"dist/**/*.
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"demo:
|
|
37
|
-
"demo:x402-
|
|
38
|
-
"demo:x402-sidecars
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"x402:
|
|
46
|
-
"x402:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Mr Mainspring MCP backend with memory, Grimoire policies, audit, Casper anchoring, and x402 settlement boundaries.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mainspring": "dist/index.js",
|
|
9
|
+
"mrmainspring": "dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/server.js",
|
|
12
|
+
"types": "./dist/server.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/server.d.ts",
|
|
16
|
+
"import": "./dist/server.js"
|
|
17
|
+
},
|
|
18
|
+
"./mcp": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist/**/*.js",
|
|
29
|
+
"dist/**/*.d.ts",
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"README.md",
|
|
32
|
+
"package.json"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsc -p tsconfig.json",
|
|
36
|
+
"demo:stdio": "npm run build && tsx scripts/demo-stdio.ts",
|
|
37
|
+
"demo:x402-http": "tsx scripts/x402-demo-http-server.ts",
|
|
38
|
+
"demo:x402-sidecars": "tsx scripts/x402-local-sidecars.ts",
|
|
39
|
+
"demo:x402-sidecars:smoke": "tsx scripts/x402-local-sidecars.ts --smoke",
|
|
40
|
+
"dev": "tsx src/index.ts",
|
|
41
|
+
"mcp:stdio": "node dist/index.js",
|
|
42
|
+
"prepack": "npm run build",
|
|
43
|
+
"smoke:x402-payment-fetch": "tsx scripts/x402-payment-fetch-smoke.ts",
|
|
44
|
+
"test": "vitest run",
|
|
45
|
+
"x402:facilitator": "tsx scripts/x402-facilitator-sidecar.ts",
|
|
46
|
+
"x402:resource": "tsx scripts/x402-local-sidecars.ts",
|
|
47
|
+
"x402:signer": "tsx scripts/x402-signer-sidecar.ts"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@modelcontextprotocol/sdk": "^1.13.0",
|
|
51
|
+
"zod": "^3.25.76"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": "^22.15.30",
|
|
55
|
+
"tsx": "^4.19.4",
|
|
56
|
+
"typescript": "^5.8.3",
|
|
57
|
+
"vitest": "^4.1.8"
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=20.0.0"
|
|
61
|
+
}
|
|
62
|
+
}
|