Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion typescript/packages/ampersend-sdk/src/mcp/proxy/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ function parseOptions(args: Array<string>, envPrefix = "TS__MCP_PROXY__"): Proxy
* Main entry point for the MCP x402 proxy CLI
*/
async function main(): Promise<void> {
const options = parseOptions(process.argv.slice(2))
// Strip leading '--' that pnpm passes through when using `pnpm script -- args`
const args = process.argv.slice(2)
const cleanedArgs = args[0] === "--" ? args.slice(1) : args
const options = parseOptions(cleanedArgs)

const treasurerType = options.treasurer.constructor.name
console.log(`[MCP-PROXY] Starting MCP proxy (${treasurerType})...`)
Expand Down
8 changes: 4 additions & 4 deletions typescript/packages/ampersend-sdk/src/mcp/proxy/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ export function createEnvSchema(envPrefix = "") {
BUYER_PRIVATE_KEY: z
.string()
.refine((val) => val.startsWith("0x"), {
message: "Must start with 0x",
message: `${envPrefix}BUYER_PRIVATE_KEY must start with 0x`,
})
.optional(),
BUYER_SMART_ACCOUNT_ADDRESS: z
.string()
.refine((val) => val.startsWith("0x"), {
message: "Must start with 0x",
message: `${envPrefix}BUYER_SMART_ACCOUNT_ADDRESS must start with 0x`,
})
.optional(),
BUYER_SMART_ACCOUNT_KEY_PRIVATE_KEY: z
.string()
.refine((val) => val.startsWith("0x"), {
message: "Must start with 0x",
message: `${envPrefix}BUYER_SMART_ACCOUNT_KEY_PRIVATE_KEY must start with 0x`,
})
.optional(),
BUYER_SMART_ACCOUNT_VALIDATOR_ADDRESS: z
.string()
.refine((val) => val.startsWith("0x"), {
message: "Must start with 0x",
message: `${envPrefix}BUYER_SMART_ACCOUNT_VALIDATOR_ADDRESS must start with 0x`,
})
.optional()
.default(OWNABLE_VALIDATOR),
Expand Down