DePix App Gateway

by depixapp

Not rated
GitHub

About

Non-custodial Pix payment gateway on the Liquid Network. An AI agent creates checkouts/products, reads transaction status, and manages support tickets — 22 tools. Non-custodial: no funds, no keys held.

Details

Author
depixapp
Categories
Finance

Setup

Install DePix App Gateway in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/depixapp/depix-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

The MCP (Model Context Protocol) server forDePix App— the agent-facing interface of the non-custodial Pix↔DePix payment gatewayandof a non-custodial Liquid wallet.

One MCP, two levels of access.Same package, same registry entry; what works depends only on whether the running instance has a seed:

Custody is decided bywho holds the seed, not by the transport. Every spend materializes a signerin-process, and there is no remote-signing path — so DePix App cannot host working wallet tools without becoming custodial, and does not. That is physics, not a product tier.

- A pure client of the public DePix API(https://api.depixapp.com/api/) for the 22 gateway tools. It holdszero critical credentials— no Eulen token, no database, no webhook HMAC. Yoursk_key is passedverbatimto the API on each call and lives only in memory for that request.
- Same door as everyone.No privileged path: the same auth, scopes and rate limits as any external agent.

Level 1 (mcp.depixapp.com) only:it never signs, never holds funds, never stores your key. It has no wallet code at all — the wallet engine is not merely disabled there, it isstructurally absentfrom that deployment's import graph, and a CI guard (npm run guard:hosted) fails the build if that ever changes.

Level 2 (npx) only:the 27wallet_tools hold, send, convert and pay — signing locally, inside your own process, under guardrails (per-transaction and rolling-24h BRL caps, optional allowlist) that no tool call can raise. There is no tool that exports the seed, edits guardrails, or pays a merchant checkout QR.

The wallet engine started life as the standalone@depixapp/sdk(still published, still supported for programmatic use in your own Node code). If what you want isan agent with a wallet, you want this package:@depixapp/mcpnow embeds that engine and exposes it over MCP, so nothing has to be written.

Quickstart 1 — Connect Claude Code (remote, HTTP)

Pass your DePix API key as a Bearer header. Always start with a sandbox key.

claude mcp add --transport http depix https://mcp.depixapp.com/mcp \ --header "Authorization: Bearer sk_test_YOUR_KEY"

Then test the connection by asking Claude to runget_account. It should return your merchant withis_live: false(sandbox).

Cursor— add to~/.cursor/mcp.json(or a project.cursor/mcp.json):

{ "mcpServers": { "depix": { "url": "https://mcp.depixapp.com/mcp", "headers": { "Authorization": "Bearer sk_test_YOUR_KEY" } } } }

Or use the one-click deeplink. The key placeholder lives INSIDE the base64config=value, so re-encode it with your real key first:

node -e 'const cfg={url:"https://mcp.depixapp.com/mcp",headers:{Authorization:"Bearer sk_test_YOUR_KEY"}};console.log(Buffer.from(JSON.stringify(cfg)).toString("base64"))'
cursor://anysphere.cursor-deeplink/mcp/install?name=depix&config=<base64 from the command above>

The claude.ai web UI custom-connector only supports OAuth (no custom header). This server is an OAuth 2.1 Resource Server (WorkOS AuthKit): the web connector signs you in, and the session forwards your verified login to the API as the bearer. To operate you must firstlink that login to your DePix account(dashboard → connector settings); until then the tools return a typed "not linked yet" message. OAuth sessions are read + merchant only and can never move money (wallet_write) — use ansk_key for withdrawals. The whole OAuth surface is feature-flagged (AUTHKIT_DOMAIN): with it unset, only thesk_header/stdio paths above are active. Terminal clients keep usingsk_keys.

Quickstart 2 — Local stdio, 49 tools (Claude Desktop / Claude Code / Cursor)

RequiresNode.js ≥ 22.4. The only official npm package is@depixapp/mcp— the@depixappscope is organization-owned; do not install any similarly-named unscoped package. Secrets come from the environment, never from a flag.

Exactly the 22 tools of level 1, running locally:

{ "mcpServers": { "depix": { "command": "npx", "args": ["-y", "@depixapp/mcp"], "env": { "DEPIX_API_KEY": "sk_test_YOUR_KEY" } } } }

All 49 tools are stilllisted— the 27wallet_ones answer with a typedwallet_not_configurederror telling the agent to ask you to runinit. That is deliberate: MCP hosts snapshot the tool list when they connect, so a catalog that grew later would mean "restart your client".

initis a human ceremony at a terminal, never an MCP tool.It prints your 12-word seed backup, so it refuses to run when stdin/stdout are not a real TTY, and no agent can invoke it:

npx -y @depixapp/mcp init # create a new wallet npx -y @depixapp/mcp init --restore # import an existing 12-word mnemonic

It asks for (or generates) a passphrase — never echoed — walks you through the backup ritual, and finishes by printing the exactmcpServersblock to paste, with the passphrase left as a placeholder for you to fill in:

{ "mcpServers": { "depix": { "command": "npx", "args": ["-y", "@depixapp/mcp"], "env": { "DEPIX_API_KEY": "sk_test_YOUR_KEY", "DEPIX_WALLET_PASSPHRASE": "<the passphrase you typed>", "DEPIX_WALLET_DIR": "/Users/you/.depix-wallet" } } } }

Clear your terminal scrollback afterwards. Restart your MCP client and ask it to runwallet_status.

Run the server directly to sanity-check:

DEPIX_API_KEY=sk_test_YOUR_KEY npx -y @depixapp/mcp

Self-hosting over HTTP is NOT trivially safe.The wallet tools have no auth of their own and the seed is loaded process-wide. Over localstdiothat is fine. Exposed over HTTP, anyone who reaches the port can drain the wallet — bind to localhost and add your own bearer/mTLS + network isolation, or don't.

Quickstart 3 — Sandbox testing (the full loop)

Always test with ansk_test_key beforesk_live_. Sandbox QRs are non-payable placeholders (SANDBOX-…-DO-NOT-PAY).
-

create_checkoutamountis always required; on the defaultPixrailpayer_tax_numberis too (the CPF/CNPJ is required even in sandbox). Use a test CPF like52998224725:

{ "amount": 1500, "payer_tax_number": "52998224725" }

Returns achk_…id, apayment_url, a sandboxpix.qr_code, andis_live: false.

simulate_checkout_payment{ "checkout_id": "chk_…" }marks the sandbox checkout paid (sandbox-only; live checkouts returnsandbox_only).

wait_for_checkout{ "checkout_id": "chk_…" }. The server polls internally and streams progress; you makeonecall and it returns{ "status": "completed", "terminal": true }— no client-side polling loop.

You can also read a synthetic deposit:get_deposit_statuswith asandbox_…id returnsdepix_sent.

Charging on the DePix rail instead of Pix

create_checkouttakespayment_method. The default"pix"is the flow above. With"depix"the payer sends DePixwallet-to-wallet on Liquidto the merchant's dedicated address — there is no Pix QR and no payer document:

{ "amount": 9990, "payment_method": "depix", "expected_discount_pct": 10 }

The response carriesdepixinstead ofpix:address, theexactamount_centsto send (face amount minus the merchant's discount, minus a sub-cent-window adjustment that makes the value unique — that uniqueness is how the payment is matched), the decimalamounta wallet signs,asset_idand a ready-to-scanuri. Send any other amount or any other asset and the payment cannot be credited automatically, and an on-chain payment is irreversible.

Settlement is observed on-chain:approvedat the first confirmation (~1 min),completedat the second.expires_inaccepts 300–3600 s here (default 1800) instead of the Pix rail's 300–1200. The rail must be enabled by the merchant — otherwise the API answersdepix_not_enabled. Sandbox DePix checkouts are deliberately unpayable (placeholder address,uri: null); drive them withsimulate_checkout_payment.

22 gateway tools— available at both levels. Amounts are BRL cents.

Charges (cobranças).create_productwithkind: "charge"creates a payment link with adue dateand optional late fine/interest — rent, tuition, an instalment. It is served atpay.depixapp.com/c/{id}, never appears on the merchant's public store, and the amount is recomputed on each visit (base + fine + pro-rata interest for the current cycle). Withrecurrencethe same link keeps working month after month, settling the oldest unpaid cycle first.list_productsdoesnotreturn charges unless you passkind: "charge"(or"all"); charge rows then carrycharge_state— current cycle, days late, today's total.

Do not confuse it withcreate_checkout, which mints aone-offpayment that is paid once and is short-lived. A charge is the standing one.

The last six are the support channel: open a ticket, poll for the human reply, reply back, attach a screenshot or diagnostic/log file (base64, ~3 MB), or close it (up to 5 open per account). Replies are not pushed — pollget_support_ticket. Amounts are BRL cents. A tool call whose key lacks the required scope returns aninsufficient_scopetool error naming the missing scope — that is the only way to discover a missing scope (the API never lists a key's scopes).

wallet_convertis the primary conversion surface (wallet_quoteenumerates the routes); the provider-level tools are the escape hatch.wallet_shift_usdtis the onecustodialroute (SideShift) and says so. Amounts carry their unit in the field name:amount_centsis BRL cents,amount_satsis the asset's base units.

There is deliberatelynotool to export the seed, change guardrails, edit the payout addresses, or pay a merchant checkout QR — not even from a fully injected model.

Local (npx) level only — the wallet half:

There is deliberatelynoenv for an API key, Eulen token, HMAC or DB credential in the remote server. In HTTP mode the key arrives per-request in theAuthorizationheader. The wallet passphrase and seed existonlyon the operator's machine — the hosted deployment reads neither and has no code that could.

- POST /mcp— the MCP Streamable HTTP endpoint (DELETEends a session;GETreturns 405 — this stateless server offers no standalone SSE stream).
- GET /.well-known/mcp.json— minimal discovery document.
- GET /api/health(also/) — service status.

npm install npm test # vitest npm run typecheck # tsc --noEmit npm run lint # eslint npm run build # compile src (incl. the vendored engine) → dist npm run guard:hosted # the hosted deployment has no path to the wallet engine npm run licenses:check # THIRD_PARTY_LICENSES matches the prod dep tree npm run vendor:check # src/vendor matches the pinned engine commit

SetDEPIX_TEST_KEY=sk_test_…to run the real-sandbox e2e test (test/e2e/sandbox.test.ts), otherwise it is skipped.

The 27 wallet tools come from the DePix App wallet engine, whose source isvendoredhere from a pinned commit rather than taken as an npm dependency.

- vendor/engine.pin.jsonis the single source of truth (repo + full 40-char SHA).
- npm run vendor:engineregeneratessrc/vendor/from that commit, stamping each file with the Apache-2.0 header and its provenance.Never hand-edit anything undersrc/vendor/— change it upstream and bump the pin.
- The tree is
committedbecausenpm cirunspreparebuild: the sources must exist before any install step could fetch them. Reproducibility comes fromnpm run vendor:check, which CI runs against a fresh checkout of the pinned commit and fails on a single byte of drift.

api/mcp.tssrc/http.tssrc/server.tshaszeroimport path tosrc/vendor/. Neither repo runs a tree-shaking bundler, so that import graph is the whole guarantee.scripts/check-hosted-isolation.mjsenforces it twice — a static walk of the TypeScript sources and a@vercel/nfttrace of the compiled entries — and its--self-testproves both checks reject a poisoned entry. Onlysrc/stdio.tssrc/unified.tsmay reach the engine.

CI(.github/workflows/ci.yml) runs typecheck + lint + test + build + all three guards on every push tomainand every PR, on Node 22 and 24 — that is the correctness gate.

Publishing is automated via GitHub Actions usingnpm Trusted Publishing (OIDC)— no npm token, no 2FA prompt, and every release carries build provenance..github/workflows/publish-mcp.yml(on avtag) publishes thenpm packageand then theMCP Registryentry (registry/server.json).
- Bump the version inpackage.json,registry/server.json(both the top-levelversionandpackages[].version) and theresolveServerVersionfallback insrc/config.ts— they must match, and CI fails the release if the tag,package.jsonand the registry npm entry disagree (a unit test pins the config fallback). The MCP Registry isimmutable per version, so anything that publishes from the tagged tree has to be right before the tag.
- Commit tomain.
- Tag and push:

git tag v2.0.0 && git push origin v2.0.0

The workflow verifies the versions, re-checks the vendored engine against its pinned commit, publishes to npm with provenance, then publishes the registry entry (idempotent — re-running a tag is a safe no-op). Re-tagging an already-published version skips both publishes.

One-time setup (already done): the package is registered as an npmTrusted Publisherfor this repo with workflow filenamepublish-mcp.yml(npmjs.com → package → Settings → Trusted Publisher). No secrets are stored in the repo.
- claude mcp add --transport http depix <url>/mcp --header "Authorization: Bearer sk_test_…"
- Ask Claude to runget_account→ returns the merchant,is_live: false.
- create_checkout(sandbox) →simulate_checkout_paymentwait_for_checkoutcompleted.

Pushing tomaindeploys to production (mcp.depixapp.com). Validate on a Vercel preview deploy before merging.Previews are reachable out of the box:a non-production deployment adds its ownVERCEL_URLandVERCEL_BRANCH_URLto the DNS-rebinding allowlist (resolveAllowedHosts), and production widens by nothing. If you ever need to allow another host, setMCP_ALLOWED_HOSTSto theexacthostname — the allowlist is an exact match, so*.vercel.appmatches nothing and would leave the preview unreachable.

Bridge Town is an MCP-native, git-versioned financial modeling platform for FP&A teams and finance leaders. AI agents use Bridge Town tools to create projects, write Python model files, run models in isolated cloud sandboxes, query data, write outputs to Google Sheets, create dashboards, branch scenarios, and collaborate with teammates.

The Capital.com MCP Server lets your AI assistant talk to your trading account directly. Market data, position checks, trade previews – all in plain language, without leaving your AI tool.

Coinrule Agentic Trading MCP enables investors to create, backtest, execute, and manage trading agents through natural language across stocks, crypto and ETFs

Invest with Claude and other AI assistants

Australian Consumer Data Right Product Data

Remote MCP server for historical crypto & prediction-market data: search ~500K instruments, live market stats (OHLC, turnover, spreads, depth, slippage) and tick-data purchase. Keyless for catalog & stats; optional OAuth for account tools. Endpoint: https://cryptostruct.com/mcp

Cross-border debt collection from your AI assistant: check cases, get pricing, submit new cases.

Read-only MCP server for your Evibe investment portfolio + live market data (holdings, performance, dividends, benchmarks, screeners). Works with Claude & ChatGPT.

Financial and quantitative modeling engine for AI agents. Typed, named, deterministic.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.