fix: boot npx MCP server and align live AgentPay production surfaces - #247
Merged
Conversation
npx @agentpayxyz/mcp-server@0.2.0 never opened stdio because isMainModule used CJS require.main in an ESM package. Start the server from the bin, detect CLI entry in ESM, and bump the package to 0.2.1 (publish is documented, not run). Also align merchant register to apk_/mer_* keys, Launch tool calls to 50, x402 challenge/verify, receipt/demo, dead agentpay.gg MCP URLs, and agentpay.so copy so Ace rail names and Postizzz leftover stay off the public legal and marketing pages. Co-authored-by: Rumblingb <Rumblingb@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
The published bin starts stdio. Auto-start via import.meta.url in index.ts broke CJS Jest when api-edge imported the tool surface. Co-authored-by: Rumblingb <Rumblingb@users.noreply.github.com>
Unblocks Workers typecheck after the exposure-recovery page required the flag. Co-authored-by: Rumblingb <Rumblingb@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Product lock
AgentPay stays guardrails + payment authority for agents (one key, spend limit, card or crypto). Ace and RCM stay dark. Locked H1 is unchanged:
What this PR fixes
P0 —
@agentpayxyz/mcp-serverdoes not boot. Published 0.2.0bin/agentpay-mcp.mjsonly importeddist/index.js, andisMainModuleused CJSrequire.main === modulein an ESM package. The process printed the missing-key warning and exited 0 with no MCP stdio.startStdioServer()).packages/mcp-server/src/cli-entry.ts.packages/mcp-server/README.md. Not published from this PR.DEFAULT_API_URLremainshttps://api.agentpay.so.index.tsdoes not auto-start (Jest/CJS and the Worker import that file). The published bin is the CLI entry.Also in this PR, in priority order:
POST /api/merchants/registernow returnsapk_<64 hex>andmer_<uuid>when the key is returned inline (email still preferred). Rotate/recover use the same key format. Auth still accepts existing raw-hex keys.includedToolCallsis 50 (was 250). Public site stays at 50.agentpay.gg.FRONTEND_URLishttps://agentpay.so. Auth help links point atagentpay.so/docsand/start.POST /api/x402/verifyuses in-process verify lookup instead of a public self-fetch that 502'd. Missing backend now returns 503 with a reason, not 502.GET /api/x402,/api/x402/challenge,/api/x402/pay,/x402, and/.well-known/x402. Schema remains at/api/x402/schema.GET /api/receipt/demoreturns a demo receipt instead of 500. Invalid IDs no longer crash uuid lookup.agentpay.soprivacy and terms no longer mention Postizzz / TikTok / social publishing. Contactrajiv_baskaran@agentpay.sostays./,/start,/docs,/aboutdrop IRCTC and National Rail. UK/India stays as payment rails only (GBP/INR, UPI, Open Banking). Landing worker files come from PR 242 and are stacked here with the copy lock.What still needs a human
npm publish --access publicof@agentpayxyz/mcp-server@0.2.1apps/api-edge(npx wrangler deploy)workers/agentpay-landing(agentpay-landing-production)RESEND_API_KEY/ verified sending domainTests / repro
Local: landing worker tests pass; Jest covers MCP boot contract,
apk_/mer_*keys, Launch=50, x402 challenge/verify (not 502), receipt/demo 200. Afternpm run build --workspace @agentpayxyz/mcp-server,node bin/agentpay-mcp.mjs --helpwarns about a missing key, prints help, and stays up on stdio instead of exiting 0.Do not merge. Do not deploy. Do not npm publish from this PR.