From 2f7a9555e4299e957f3dd7d18684aaa20176a170 Mon Sep 17 00:00:00 2001 From: Fabiano Cruz Date: Sun, 27 Sep 2026 04:31:07 -0300 Subject: [PATCH] fix(catalog): no dead default hosts; env override for every host; weekly host check - celcoin: production default api-sec.celcoin.com.br (NXDOMAIN) -> api.openfinance.celcoin.com.br, the host Celcoin documents. 0.2.4. - stone: token URL login.openbank.stone.com.br (NXDOMAIN) -> accounts.openbank.stone.com.br (docs + OIDC discovery), STONE_AUTH_URL. 0.2.3. - banco-do-brasil: sandbox hosts -> api.hm.bb.com.br / oauth.hm.bb.com.br. 0.1.0-alpha.5. - pomelo: sandbox hosts -> api-stage.pomelo.la, token on the API host. 0.1.1. - Deprecated (no live endpoint): x402, ap2, ucp, c6, dock, matera, legiti, caf, certta, unico, nubank. README caveat at the top, package.json and server.json description start with DEPRECATED, patch/prerelease bump so the caveat reaches npm. Out of the root README quick start and decision tree. - Every server reads its host from _BASE_URL (and __URL for a second host); old *_API_BASE names still work. - scripts/check-catalog-hosts.py + .github/workflows/catalog-hosts.yml: weekly and on PRs that touch a server, resolve and TLS-handshake every default URL computed from the source; fail on a dead host outside the two policed carve-outs (deprecated packages, scripts/catalog-hosts-known-dead.json). --self-test plants dead, wrong-cert and live hosts and asserts each verdict. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/catalog-hosts.yml | 73 +++ README.md | 58 +- docs/CONTRIBUTING.md | 2 + examples/x402-demo/README.md | 4 +- package-lock.json | 64 +- packages/argentina/afip/src/index.ts | 4 +- packages/argentina/andreani/src/index.ts | 2 +- packages/argentina/bcra/src/index.ts | 2 +- packages/argentina/colppy/src/index.ts | 2 +- packages/argentina/payway/src/index.ts | 4 +- packages/argentina/tienda-nube/src/index.ts | 2 +- packages/banking/banco-do-brasil/README.md | 2 + packages/banking/banco-do-brasil/package.json | 2 +- packages/banking/banco-do-brasil/server.json | 4 +- packages/banking/banco-do-brasil/src/index.ts | 17 +- packages/banking/bradesco/src/index.ts | 4 +- packages/banking/btg/src/index.ts | 4 +- packages/banking/c6/README.md | 2 + packages/banking/c6/package.json | 4 +- packages/banking/c6/server.json | 6 +- packages/banking/c6/src/index.ts | 8 +- packages/banking/caixa/src/index.ts | 4 +- packages/banking/dock/README.md | 2 + packages/banking/dock/package.json | 4 +- packages/banking/dock/server.json | 6 +- packages/banking/dock/src/index.ts | 9 +- packages/banking/iniciador/src/index.ts | 2 +- packages/banking/itau/src/index.ts | 4 +- packages/banking/matera/README.md | 2 + packages/banking/matera/package.json | 4 +- packages/banking/matera/server.json | 6 +- packages/banking/matera/src/index.ts | 4 + packages/banking/pluggy/src/index.ts | 2 +- packages/banking/pomelo/README.md | 4 +- packages/banking/pomelo/package.json | 2 +- packages/banking/pomelo/server.json | 4 +- packages/banking/pomelo/src/index.ts | 11 +- packages/banking/santander/src/index.ts | 4 +- packages/banking/sicoob/src/index.ts | 4 +- packages/banking/stark-bank/src/index.ts | 4 +- packages/colombia/alegra/src/index.ts | 2 +- packages/colombia/bold-co/src/index.ts | 2 +- packages/colombia/coordinadora/src/index.ts | 2 +- packages/colombia/epayco/src/index.ts | 6 +- packages/colombia/nequi/src/index.ts | 4 +- packages/colombia/siigo/src/index.ts | 2 +- packages/colombia/wompi/src/index.ts | 4 +- .../communication/rd-station/src/index.ts | 2 +- packages/communication/sendgrid/src/index.ts | 2 +- packages/communication/take-blip/src/index.ts | 2 +- packages/communication/twilio/src/index.ts | 35 +- .../communication/whatsapp-cloud/src/index.ts | 2 +- packages/communication/z-api/src/index.ts | 2 +- packages/communication/zenvia/src/index.ts | 2 +- packages/crypto/bitso/src/index.ts | 2 +- packages/crypto/circle/src/index.ts | 2 +- packages/crypto/coinbase-cdp/src/index.ts | 2 +- .../crypto/coinbase-commerce/src/index.ts | 2 +- packages/crypto/foxbit/src/index.ts | 2 +- packages/crypto/mercado-bitcoin/src/index.ts | 2 +- packages/crypto/transak/src/index.ts | 2 +- packages/crypto/x402/README.md | 2 + packages/crypto/x402/package.json | 4 +- packages/crypto/x402/server.json | 6 +- packages/crypto/x402/src/index.ts | 6 +- packages/ecommerce/amazon/src/index.ts | 4 +- packages/ecommerce/correios/src/index.ts | 2 +- packages/ecommerce/melhor-envio/src/index.ts | 4 +- packages/ecommerce/shopee/src/index.ts | 4 +- packages/ecommerce/shopify/src/index.ts | 2 +- packages/ecommerce/superfrete/src/index.ts | 4 +- packages/ecommerce/vtex/src/index.ts | 4 +- packages/erp/bling/src/index.ts | 2 +- packages/erp/omie/src/index.ts | 2 +- packages/erp/quickbooks/src/index.ts | 5 +- packages/erp/tiny/src/index.ts | 2 +- packages/erp/xero/src/index.ts | 2 +- packages/fiscal/conta-azul/src/index.ts | 2 +- packages/fiscal/focus-nfe/src/index.ts | 4 +- packages/fiscal/nfe-io/src/index.ts | 6 +- packages/fiscal/nuvem-fiscal/src/index.ts | 2 +- packages/fraud/legiti/README.md | 2 + packages/fraud/legiti/package.json | 4 +- packages/fraud/legiti/server.json | 6 +- packages/fraud/legiti/src/index.ts | 4 + packages/identity/bigdatacorp/src/index.ts | 2 +- packages/identity/brasil-api/src/index.ts | 2 +- packages/identity/caf/README.md | 2 + packages/identity/caf/package.json | 4 +- packages/identity/caf/server.json | 6 +- packages/identity/caf/src/index.ts | 6 +- packages/identity/certta/README.md | 2 + packages/identity/certta/package.json | 4 +- packages/identity/certta/server.json | 6 +- packages/identity/certta/src/index.ts | 6 +- packages/identity/jumio/src/index.ts | 2 +- packages/identity/onfido/src/index.ts | 2 +- packages/identity/persona/src/index.ts | 2 +- packages/identity/unico/README.md | 2 + packages/identity/unico/package.json | 4 +- packages/identity/unico/server.json | 6 +- packages/identity/unico/src/index.ts | 4 + packages/mexico/belvo/src/index.ts | 2 +- packages/mexico/bind-erp/src/index.ts | 2 +- packages/mexico/conekta/src/index.ts | 2 +- packages/mexico/facturapi/src/index.ts | 2 +- packages/mexico/skydropx/src/index.ts | 2 +- packages/mexico/stp-spei/src/index.ts | 2 +- packages/payments/adyen/src/index.ts | 5 + packages/payments/airwallex/src/index.ts | 5 +- packages/payments/ap2/README.md | 3 +- packages/payments/ap2/package.json | 4 +- packages/payments/ap2/server.json | 6 +- packages/payments/ap2/src/index.ts | 8 +- packages/payments/asaas/src/index.ts | 4 +- packages/payments/braintree/src/index.ts | 5 +- packages/payments/braspag/src/index.ts | 8 +- packages/payments/celcoin/README.md | 3 + packages/payments/celcoin/package.json | 2 +- packages/payments/celcoin/server.json | 4 +- .../celcoin/src/__tests__/index.test.ts | 26 +- packages/payments/celcoin/src/index.ts | 10 +- packages/payments/chargebee/src/index.ts | 2 +- packages/payments/cielo/src/index.ts | 8 +- packages/payments/culqi/src/index.ts | 2 +- packages/payments/ebanx/src/index.ts | 4 +- packages/payments/efi/src/index.ts | 4 +- packages/payments/flow-cl/src/index.ts | 4 +- packages/payments/inter-bank/src/index.ts | 2 +- packages/payments/iugu/src/index.ts | 2 +- packages/payments/kushki/src/index.ts | 4 +- packages/payments/malga/src/index.ts | 4 +- packages/payments/mercado-libre/src/index.ts | 2 +- packages/payments/mercado-pago/src/index.ts | 2 +- packages/payments/niubiz/src/index.ts | 4 +- packages/payments/nubank/README.md | 2 + packages/payments/nubank/package.json | 4 +- packages/payments/nubank/server.json | 6 +- packages/payments/nubank/src/index.ts | 6 +- packages/payments/nupay/src/index.ts | 8 +- packages/payments/openpay/src/index.ts | 5 +- packages/payments/pagar-me/src/index.ts | 2 +- packages/payments/pagseguro/src/index.ts | 4 +- packages/payments/paypal/src/index.ts | 5 +- packages/payments/rapyd/src/index.ts | 4 +- packages/payments/rede/src/index.ts | 4 +- packages/payments/rinne/src/index.ts | 4 +- packages/payments/safrapay/src/index.ts | 10 +- packages/payments/stone/README.md | 3 +- packages/payments/stone/package.json | 2 +- packages/payments/stone/server.json | 4 +- .../stone/src/__tests__/index.test.ts | 31 + packages/payments/stone/src/index.ts | 12 +- packages/payments/stripe-acp/src/index.ts | 2 +- packages/payments/stripe/src/index.ts | 2 +- packages/payments/transbank/src/index.ts | 4 +- packages/payments/ucp/README.md | 4 +- packages/payments/ucp/package.json | 4 +- packages/payments/ucp/server.json | 6 +- packages/payments/ucp/src/index.ts | 8 +- packages/payments/vindi/src/index.ts | 2 +- packages/payments/wise/src/index.ts | 5 +- packages/payments/worldpay/src/index.ts | 1 + packages/payments/zoop/src/index.ts | 2 +- scripts/catalog-hosts-known-dead.json | 30 + scripts/check-catalog-hosts.py | 595 ++++++++++++++++++ 166 files changed, 1210 insertions(+), 302 deletions(-) create mode 100644 .github/workflows/catalog-hosts.yml create mode 100644 scripts/catalog-hosts-known-dead.json create mode 100644 scripts/check-catalog-hosts.py diff --git a/.github/workflows/catalog-hosts.yml b/.github/workflows/catalog-hosts.yml new file mode 100644 index 00000000..a271df45 --- /dev/null +++ b/.github/workflows/catalog-hosts.yml @@ -0,0 +1,73 @@ +name: Catalog hosts + +# Every default URL a server calls must exist. scripts/check-catalog-hosts.py +# computes the URL set from packages/*/*/src/index.ts on each run (nothing is +# listed by hand), resolves every host and completes a TLS handshake that +# verifies the certificate for that name. A host that does not resolve or whose +# certificate is for another name fails the job; a timeout or reset is only a +# warning, because it depends on where the runner sits. Deprecated packages +# (package.json description starting with "DEPRECATED") and the hosts listed in +# scripts/catalog-hosts-known-dead.json are the carve-outs; the job fails if a +# deprecated package has no dead host left or a listed host comes back. +# +# The self-test runs first: it plants a dead host, a wrong-certificate host, a +# live control, a deprecated package and a hardcoded URL in a temp tree and +# asserts each verdict by name. If the self-test fails, the catalog verdict +# below is not evidence of anything. + +on: + schedule: + - cron: "17 9 * * 1" # Mondays 09:17 UTC + workflow_dispatch: + pull_request: + branches: [main] + paths: + - "packages/*/*/src/**" + - "packages/*/*/package.json" + - "scripts/check-catalog-hosts.py" + - "scripts/catalog-hosts-known-dead.json" + - ".github/workflows/catalog-hosts.yml" + +permissions: + contents: read + issues: write + +jobs: + hosts: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Self-test (planted dead, wrong-cert and live hosts) + run: python3 scripts/check-catalog-hosts.py --self-test + + - name: Resolve and TLS-handshake every default URL in the catalog + id: check + run: | + set -o pipefail + python3 scripts/check-catalog-hosts.py | tee hosts-report.txt + + # A red scheduled run only emails whoever last touched the cron line, so + # the weekly failure also lands in one issue (reused, not duplicated). + - name: Open or update the dead-host issue (scheduled runs) + if: failure() && github.event_name == 'schedule' && steps.check.outcome == 'failure' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + title="catalog-hosts: dead host in the catalog" + { + echo "The weekly host check failed: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" + echo + echo '```' + grep -v '^::' hosts-report.txt + echo '```' + } > body.md + num=$(gh issue list --state open --search "\"$title\" in:title" --json number -q '.[0].number') + if [ -n "$num" ]; then + gh issue comment "$num" --body-file body.md + else + gh issue create --title "$title" --body-file body.md + fi diff --git a/README.md b/README.md index 46464413..4d97d059 100644 --- a/README.md +++ b/README.md @@ -55,26 +55,24 @@ Each MCP server in this repo wraps a real provider — payments, fiscal, logisti ## Agentic Payment Protocols -Four servers for the emerging agentic payment stack: +Four servers for the emerging agentic payment stack. Only Stripe ACP reaches a live service today; the other three are deprecated (see the note under the table): | Protocol | Server | Tools | What it does | |----------|--------|-------|-------------| -| **[Google UCP](packages/payments/ucp)** no live endpoint | `@codespar/mcp-ucp` | 20 | Universal Commerce Protocol — agentic shopping, cart, checkout, orders, delivery, identity. | +| **[Google UCP](packages/payments/ucp)** deprecated: no live endpoint | `@codespar/mcp-ucp` | 20 | Universal Commerce Protocol — agentic shopping, cart, checkout, orders, delivery, identity. | | **[Stripe ACP](packages/payments/stripe-acp)** | `@codespar/mcp-stripe-acp` | 24 | Agentic Commerce Protocol — AI agent checkout, payment delegation, products, invoices. | -| **[x402](packages/crypto/x402)** no live endpoint | `@codespar/mcp-x402` | 10 | HTTP-native micropayments by Coinbase — when an agent hits a 402, it pays USDC on Base/Solana and retries. Pure HTTP, no checkout UI. | -| **[AP2](packages/payments/ap2)** no live endpoint | `@codespar/mcp-ap2` alpha | 22 | Google's Agent-to-Agent Payment Protocol — authorization, audit trails, scoped spend limits. | +| **[x402](packages/crypto/x402)** deprecated: no live endpoint | `@codespar/mcp-x402` | 10 | HTTP-native micropayments by Coinbase — when an agent hits a 402, it pays USDC on Base/Solana and retries. Pure HTTP, no checkout UI. | +| **[AP2](packages/payments/ap2)** deprecated: no live endpoint | `@codespar/mcp-ap2` alpha | 22 | Google's Agent-to-Agent Payment Protocol — authorization, audit trails, scoped spend limits. | -> **No live endpoint behind UCP, AP2, and x402.** Checked on 2026-08-27: +> **UCP, AP2 and x402 are deprecated: no live endpoint.** Measured on 2026-09-27: > -> | Server | `BASE_URL` in source | What that address answered | +> | Server | Default host | What that host answered | > |---|---|---| -> | `@codespar/mcp-ucp` | `https://commerce.googleapis.com/ucp/v1` (`packages/payments/ucp/src/index.ts:71-73`) | HTTP 404, Google's generic `Error 404 (Not Found)` HTML page | -> | `@codespar/mcp-ap2` | `https://ap2.googleapis.com/v1` (`packages/payments/ap2/src/index.ts:62-64`) | HTTP 404, the same generic HTML page | -> | `@codespar/mcp-x402` | `https://api.x402.org/v1` (`packages/crypto/x402/src/index.ts:40`) | `NXDOMAIN`, the host does not resolve | +> | `@codespar/mcp-ucp` | `commerce.googleapis.com` (sandbox: `sandbox.commerce.googleapis.com`) | HTTP 404 with Google's generic `Error 404 (Not Found)` page; the sandbox host fails the TLS handshake (certificate is for `*.googleapis.com`) | +> | `@codespar/mcp-ap2` | `ap2.googleapis.com` (sandbox: `sandbox.ap2.googleapis.com`) | the same generic 404 page; the sandbox host fails the TLS handshake the same way | +> | `@codespar/mcp-x402` | `api.x402.org` | does not resolve in DNS (8.8.8.8 and 1.1.1.1) | > -> Every path these servers actually call failed on the same run, which is what the claim above rests on. A generic 404 by itself does not prove a name has no service behind it: `translate.googleapis.com/v1`, a registered service asked for a path it does not serve, answers the same generic page. -> -> UCP, AP2, and x402 are published specifications, and these three packages ship tool definitions written for them. We have not checked those definitions against a conforming implementation, and no call made through the three servers currently reaches a service. +> A generic 404 by itself does not prove a name has no service behind it: `translate.googleapis.com/v1`, a registered service asked for a path it does not serve, answers the same page. What the claim rests on is that every path these servers call failed the same way. UCP and AP2 are open specifications, not APIs Google hosts, and x402 has no central API (each seller picks its own facilitator). The three packages are deprecated on npm and kept here for reference; they are out of the quick start and the decision tree below. Eight more servers are deprecated for the same reason (their default host does not resolve): C6, Dock, Matera, Legiti, Caf, Certta, Unico and Nubank. ### The Autonomy Spectrum @@ -113,10 +111,7 @@ Each protocol sits at a different level of agent autonomy: ``` Agent needs to buy something - ├── Full commerce? → Google UCP (search → cart → checkout → delivery) ├── Retail checkout? → Stripe ACP (create_checkout → complete_checkout) - ├── API micropayment? → x402 (pay_request → USDC $0.001 → data returned) - ├── Agent-to-agent? → AP2 (authorize_payment → execute_payment) └── LATAM merchant? → Asaas / Mercado Pago / Conekta / Wompi / etc. All via MCP. Same interface. One agent. @@ -152,7 +147,7 @@ Add to `~/.config/claude/claude_desktop_config.json`: } ``` -For alpha packages (contract-gated providers like Itaú, Bradesco, Santander, Caixa, BB, BTG, C6, Sicoob, Bradesco, Matera), add `@alpha` to the install: +For alpha packages (contract-gated providers like Itaú, Bradesco, Santander, Caixa, BB, BTG, Sicoob), add `@alpha` to the install: ```bash npx -y @codespar/mcp-itau@alpha @@ -162,9 +157,6 @@ npx -y @codespar/mcp-itau@alpha ```bash npx @codespar/mcp-stripe-acp # Agentic Commerce Protocol -npx @codespar/mcp-ucp # Google Universal Commerce Protocol -npx @codespar/mcp-x402 # HTTP micropayments (Coinbase) -npx @codespar/mcp-ap2@alpha # Agent-to-Agent payment authorization npx @codespar/mcp-asaas # BR billing + Pix npx @codespar/mcp-mercado-pago # LATAM payments @@ -186,6 +178,12 @@ npx @codespar/mcp-brasil-api Then ask your agent: _"What is the address for CEP 01001-000?"_ or _"Look up CNPJ 00.000.000/0001-91"_. +### Pointing a server at another host + +Every server reads its provider host from an environment variable, so a proxy, a mock, or an endpoint the provider moved can be used without a new release. The primary API is `_BASE_URL`, where `` is the one the server's credentials already use (`CELCOIN_BASE_URL`, `STONE_BASE_URL`, `BB_BASE_URL`). A second host gets `__URL`, for example `STONE_AUTH_URL` for a token endpoint or `CIELO_QUERY_URL`. When the variable is unset the server uses its documented default. + +A weekly CI job ([`catalog-hosts.yml`](.github/workflows/catalog-hosts.yml)) resolves every default host in the catalog and completes a TLS handshake with it, and fails when a host does not exist. The only exceptions are deprecated servers and the few sandbox hosts listed, each with its reason, in [`scripts/catalog-hosts-known-dead.json`](scripts/catalog-hosts-known-dead.json); the job also fails when one of those comes back, so the list cannot go stale. Run it locally with `python3 scripts/check-catalog-hosts.py` (Python 3.10+). + --- ## The Complete Loop @@ -223,13 +221,13 @@ Browse the full catalog at [codespar.dev/servers](https://codespar.dev/servers). | **[Stripe ACP](packages/payments/stripe-acp)** | 24 | `@codespar/mcp-stripe-acp` | API Key | | **[Iugu](packages/payments/iugu)** | 23 | `@codespar/mcp-iugu` | API Key | | **[Openpay](packages/payments/openpay)** | 23 | `@codespar/mcp-openpay` | API Key | -| **[AP2](packages/payments/ap2)** alpha no live endpoint | 22 | `@codespar/mcp-ap2` | API Key | +| **[AP2](packages/payments/ap2)** alpha deprecated: no live endpoint | 22 | `@codespar/mcp-ap2` | API Key | | **[Braintree](packages/payments/braintree)** | 22 | `@codespar/mcp-braintree` | API Key | | **[Braspag](packages/payments/braspag)** | 22 | `@codespar/mcp-braspag` | API Key | | **[Cielo](packages/payments/cielo)** | 22 | `@codespar/mcp-cielo` | API Key | | **[Inter Bank](packages/payments/inter-bank)** | 22 | `@codespar/mcp-inter-bank` | OAuth2 | | **[Mercado Libre](packages/payments/mercado-libre)** | 22 | `@codespar/mcp-mercado-libre` | API Key | -| **[Nubank](packages/payments/nubank)** alpha | 22 | `@codespar/mcp-nubank` | OAuth2 | +| **[Nubank](packages/payments/nubank)** alpha deprecated: no live endpoint | 22 | `@codespar/mcp-nubank` | OAuth2 | | **[Nupay](packages/payments/nupay)** | 22 | `@codespar/mcp-nupay` | OAuth2 | | **[Pagar Me](packages/payments/pagar-me)** | 22 | `@codespar/mcp-pagar-me` | API Key | | **[Rapyd](packages/payments/rapyd)** | 22 | `@codespar/mcp-rapyd` | API Key | @@ -245,7 +243,7 @@ Browse the full catalog at [codespar.dev/servers](https://codespar.dev/servers). | **[Getnet](packages/payments/getnet)** | 20 | `@codespar/mcp-getnet` | OAuth2 | | **[Izipay](packages/payments/izipay)** alpha | 20 | `@codespar/mcp-izipay` | API Key | | **[Picpay](packages/payments/picpay)** alpha | 20 | `@codespar/mcp-picpay` | API Key | -| **[UCP](packages/payments/ucp)** no live endpoint | 20 | `@codespar/mcp-ucp` | API Key | +| **[UCP](packages/payments/ucp)** deprecated: no live endpoint | 20 | `@codespar/mcp-ucp` | API Key | | **[Vindi](packages/payments/vindi)** | 20 | `@codespar/mcp-vindi` | API Key | | **[Paypal](packages/payments/paypal)** | 19 | `@codespar/mcp-paypal` | OAuth2 | | **[Transbank](packages/payments/transbank)** alpha | 19 | `@codespar/mcp-transbank` | API Key | @@ -269,11 +267,11 @@ Browse the full catalog at [codespar.dev/servers](https://codespar.dev/servers). | **[Santander](packages/banking/santander)** alpha | 23 | `@codespar/mcp-santander` | OAuth2 | | **[Bradesco](packages/banking/bradesco)** alpha | 22 | `@codespar/mcp-bradesco` | OAuth2 | | **[Itau](packages/banking/itau)** alpha | 22 | `@codespar/mcp-itau` | OAuth2 | -| **[Matera](packages/banking/matera)** alpha | 22 | `@codespar/mcp-matera` | OAuth2 | -| **[Dock](packages/banking/dock)** alpha | 20 | `@codespar/mcp-dock` | OAuth2 | +| **[Matera](packages/banking/matera)** alpha deprecated: no live endpoint | 22 | `@codespar/mcp-matera` | OAuth2 | +| **[Dock](packages/banking/dock)** alpha deprecated: no live endpoint | 20 | `@codespar/mcp-dock` | OAuth2 | | **[Open Finance](packages/banking/open-finance)** | 18 | `@codespar/mcp-open-finance` | API Key | | **[Pluggy](packages/banking/pluggy)** | 16 | `@codespar/mcp-pluggy` | API Key | -| **[C6](packages/banking/c6)** alpha | 14 | `@codespar/mcp-c6` | OAuth2 | +| **[C6](packages/banking/c6)** alpha deprecated: no live endpoint | 14 | `@codespar/mcp-c6` | OAuth2 | | **[Banco Do Brasil](packages/banking/banco-do-brasil)** alpha | 13 | `@codespar/mcp-banco-do-brasil` | OAuth2 | | **[Sicoob](packages/banking/sicoob)** alpha | 13 | `@codespar/mcp-sicoob` | OAuth2 | | **[BTG](packages/banking/btg)** alpha | 12 | `@codespar/mcp-btg` | OAuth2 | @@ -333,10 +331,10 @@ Browse the full catalog at [codespar.dev/servers](https://codespar.dev/servers). | **[Jumio](packages/identity/jumio)** | 20 | `@codespar/mcp-jumio` | API Key | | **[Onfido](packages/identity/onfido)** | 20 | `@codespar/mcp-onfido` | API Key | | **[Persona](packages/identity/persona)** | 20 | `@codespar/mcp-persona` | API Key | -| **[Unico](packages/identity/unico)** alpha | 18 | `@codespar/mcp-unico` | OAuth2 | -| **[Certta](packages/identity/certta)** | 11 | `@codespar/mcp-certta` | API Key | +| **[Unico](packages/identity/unico)** alpha deprecated: no live endpoint | 18 | `@codespar/mcp-unico` | OAuth2 | +| **[Certta](packages/identity/certta)** deprecated: no live endpoint | 11 | `@codespar/mcp-certta` | API Key | | **[BigDataCorp](packages/identity/bigdatacorp)** | 10 | `@codespar/mcp-bigdatacorp` | API Key | -| **[Caf](packages/identity/caf)** | 9 | `@codespar/mcp-caf` | API Key | +| **[Caf](packages/identity/caf)** deprecated: no live endpoint | 9 | `@codespar/mcp-caf` | API Key | ### 🛡️ Fraud & Risk (4 servers) @@ -345,7 +343,7 @@ Browse the full catalog at [codespar.dev/servers](https://codespar.dev/servers). | **[Sift](packages/fraud/sift)** alpha | 20 | `@codespar/mcp-sift` | API Key | | **[Clearsale](packages/fraud/clearsale)** alpha | 18 | `@codespar/mcp-clearsale` | API Key | | **[Konduto](packages/fraud/konduto)** alpha | 18 | `@codespar/mcp-konduto` | API Key | -| **[Legiti](packages/fraud/legiti)** alpha | 18 | `@codespar/mcp-legiti` | API Key | +| **[Legiti](packages/fraud/legiti)** alpha deprecated: no live endpoint | 18 | `@codespar/mcp-legiti` | API Key | ### 🪙 Crypto / Stablecoins (10 servers) @@ -360,7 +358,7 @@ Browse the full catalog at [codespar.dev/servers](https://codespar.dev/servers). | **[Coinbase Commerce](packages/crypto/coinbase-commerce)** | 18 | `@codespar/mcp-coinbase-commerce` | API Key | | **[Transak](packages/crypto/transak)** alpha | 18 | `@codespar/mcp-transak` | API Key | | **[Coinbase CDP](packages/crypto/coinbase-cdp)** | 15 | `@codespar/mcp-coinbase-cdp` | API Key | -| **[x402](packages/crypto/x402)** no live endpoint | 10 | `@codespar/mcp-x402` | API Key | +| **[x402](packages/crypto/x402)** deprecated: no live endpoint | 10 | `@codespar/mcp-x402` | API Key | ### 🇦🇷 Argentina (6 servers) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index dcd36c13..4fcbdeed 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -43,6 +43,8 @@ Follow the pattern of existing servers (e.g., `packages/payments/asaas/src/index - Use `@modelcontextprotocol/sdk` for the MCP server - Implement 8-10 tools covering the main API operations - Use environment variables for API keys (never hardcode) +- Let an environment variable override every provider host: `_BASE_URL` for the main API and `__URL` for any other host (token endpoint, query API), with `` matching the server's credential variables. The documented default stays as the fallback: `const BASE_URL = process.env.ACME_BASE_URL || "https://api.acme.com/v1";` +- Use a default host that exists. `python3 scripts/check-catalog-hosts.py` resolves every default URL in the catalog and completes a TLS handshake with it; CI runs it on every PR that touches a server and weekly on `main` - Support sandbox mode via env var - Handle errors gracefully - Return JSON responses diff --git a/examples/x402-demo/README.md b/examples/x402-demo/README.md index a44d9a74..7fff0e80 100644 --- a/examples/x402-demo/README.md +++ b/examples/x402-demo/README.md @@ -59,10 +59,10 @@ npm run client ## Integration with CodeSpar -This is what the `@codespar/mcp-x402` server does under the hood — the `pay_request` tool wraps this flow so any AI agent can pay for 402-protected resources via MCP. +`@codespar/mcp-x402` was meant to wrap this flow in a `pay_request` tool. It is deprecated: its default host, `api.x402.org`, does not resolve, so none of its tools reach a service. This demo does not use it: it calls a facilitator directly (the public one on Base Sepolia, Coinbase CDP on mainnet). ## Links - [x402 Protocol](https://github.com/coinbase/x402) -- [@codespar/mcp-x402](https://www.npmjs.com/package/@codespar/mcp-x402) +- [@codespar/mcp-x402](https://www.npmjs.com/package/@codespar/mcp-x402) (deprecated: no live endpoint) - [Coinbase Faucet](https://portal.cdp.coinbase.com/products/faucet) diff --git a/package-lock.json b/package-lock.json index 189bd70e..5d9fb35b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -387,6 +387,10 @@ "resolved": "packages/payments/rede", "link": true }, + "node_modules/@codespar/mcp-rinne": { + "resolved": "packages/payments/rinne", + "link": true + }, "node_modules/@codespar/mcp-safrapay": { "resolved": "packages/payments/safrapay", "link": true @@ -3587,7 +3591,7 @@ }, "packages/banking/banco-do-brasil": { "name": "@codespar/mcp-banco-do-brasil", - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0", @@ -3642,7 +3646,7 @@ }, "packages/banking/c6": { "name": "@codespar/mcp-c6", - "version": "0.1.0-alpha.3", + "version": "0.1.0-alpha.4", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -3672,7 +3676,7 @@ }, "packages/banking/dock": { "name": "@codespar/mcp-dock", - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -3735,7 +3739,7 @@ }, "packages/banking/matera": { "name": "@codespar/mcp-matera", - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -3830,7 +3834,7 @@ }, "packages/banking/pomelo": { "name": "@codespar/mcp-pomelo", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -4523,7 +4527,7 @@ }, "packages/crypto/x402": { "name": "@codespar/mcp-x402", - "version": "0.1.4", + "version": "0.1.5", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -4862,7 +4866,7 @@ }, "packages/identity/caf": { "name": "@codespar/mcp-caf", - "version": "0.1.2", + "version": "0.1.3", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -4894,7 +4898,7 @@ }, "packages/identity/certta": { "name": "@codespar/mcp-certta", - "version": "0.1.2", + "version": "0.1.3", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -4971,7 +4975,7 @@ }, "packages/identity/unico": { "name": "@codespar/mcp-unico", - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -5240,7 +5244,7 @@ }, "packages/payments/ap2": { "name": "@codespar/mcp-ap2", - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -5344,7 +5348,7 @@ }, "packages/payments/celcoin": { "name": "@codespar/mcp-celcoin", - "version": "0.2.3", + "version": "0.2.4", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -5733,7 +5737,7 @@ }, "packages/payments/nubank": { "name": "@codespar/mcp-nubank", - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -5930,6 +5934,38 @@ "typescript": "^5.8.0" } }, + "packages/payments/rinne": { + "name": "@codespar/mcp-rinne", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.0.0" + }, + "bin": { + "mcp-rinne": "dist/index.js" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "typescript": "^5.8.0" + } + }, + "packages/payments/rinne/node_modules/@types/node": { + "version": "22.20.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.4.tgz", + "integrity": "sha512-zJRE40jpHtKqE/C4fgHrAKQLJuSpzEnP9ff9Y7YtoR3Wd2pwqzlekDeEuUQXjRd+QCYnVnNwuJYmhdk9XV8gvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "packages/payments/rinne/node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, "packages/payments/safrapay": { "name": "@codespar/mcp-safrapay", "version": "0.2.0-alpha.3", @@ -5947,7 +5983,7 @@ }, "packages/payments/stone": { "name": "@codespar/mcp-stone", - "version": "0.2.2", + "version": "0.2.3", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" @@ -6024,7 +6060,7 @@ }, "packages/payments/ucp": { "name": "@codespar/mcp-ucp", - "version": "0.1.4", + "version": "0.1.5", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" diff --git a/packages/argentina/afip/src/index.ts b/packages/argentina/afip/src/index.ts index cb5237ed..9711f98e 100644 --- a/packages/argentina/afip/src/index.ts +++ b/packages/argentina/afip/src/index.ts @@ -45,9 +45,9 @@ const CERT_PATH = process.env.AFIP_CERT_PATH || ""; const KEY_PATH = process.env.AFIP_KEY_PATH || ""; const CUIT = process.env.AFIP_CUIT || ""; const AFIP_ENV = process.env.AFIP_ENV || "homologation"; -const BASE_URL = AFIP_ENV === "production" +const BASE_URL = process.env.AFIP_BASE_URL || (AFIP_ENV === "production" ? "https://servicios1.afip.gov.ar" - : "https://wswhomo.afip.gov.ar"; + : "https://wswhomo.afip.gov.ar"); async function afipRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { diff --git a/packages/argentina/andreani/src/index.ts b/packages/argentina/andreani/src/index.ts index 4787acac..959253cc 100644 --- a/packages/argentina/andreani/src/index.ts +++ b/packages/argentina/andreani/src/index.ts @@ -41,7 +41,7 @@ import { const API_KEY = process.env.ANDREANI_API_KEY || ""; const USER = process.env.ANDREANI_USER || ""; const PASSWORD = process.env.ANDREANI_PASSWORD || ""; -const BASE_URL = "https://api.andreani.com/v2"; +const BASE_URL = process.env.ANDREANI_BASE_URL || "https://api.andreani.com/v2"; let cachedToken: string | null = null; diff --git a/packages/argentina/bcra/src/index.ts b/packages/argentina/bcra/src/index.ts index 35fcbb15..e9b25b94 100644 --- a/packages/argentina/bcra/src/index.ts +++ b/packages/argentina/bcra/src/index.ts @@ -39,7 +39,7 @@ import { ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js"; -const BASE_URL = "https://api.bcra.gob.ar"; +const BASE_URL = process.env.BCRA_BASE_URL || "https://api.bcra.gob.ar"; async function bcraRequest(method: string, path: string): Promise { const headers: Record = { diff --git a/packages/argentina/colppy/src/index.ts b/packages/argentina/colppy/src/index.ts index 70c5c770..e380a5f1 100644 --- a/packages/argentina/colppy/src/index.ts +++ b/packages/argentina/colppy/src/index.ts @@ -31,7 +31,7 @@ import { const API_KEY = process.env.COLPPY_API_KEY || ""; const COMPANY_ID = process.env.COLPPY_COMPANY_ID || ""; -const BASE_URL = "https://login.colppy.com/lib/frontera2"; +const BASE_URL = process.env.COLPPY_BASE_URL || "https://login.colppy.com/lib/frontera2"; async function colppyRequest(service: string, operation: string, params?: Record): Promise { const payload = { diff --git a/packages/argentina/payway/src/index.ts b/packages/argentina/payway/src/index.ts index 84280a2a..bffb9784 100644 --- a/packages/argentina/payway/src/index.ts +++ b/packages/argentina/payway/src/index.ts @@ -44,9 +44,9 @@ const PUBLIC_KEY = process.env.PAYWAY_PUBLIC_API_KEY || ""; const PRIVATE_KEY = process.env.PAYWAY_PRIVATE_API_KEY || ""; const ENV = (process.env.PAYWAY_ENV || "sandbox").toLowerCase(); -const BASE_URL = ENV === "production" +const BASE_URL = process.env.PAYWAY_BASE_URL || (ENV === "production" ? "https://ventasonline.payway.com.ar/api/v2" - : "https://developers.decidir.com/api/v2"; + : "https://developers.decidir.com/api/v2"); async function paywayRequest( method: string, diff --git a/packages/argentina/tienda-nube/src/index.ts b/packages/argentina/tienda-nube/src/index.ts index 705a798e..bfafe442 100644 --- a/packages/argentina/tienda-nube/src/index.ts +++ b/packages/argentina/tienda-nube/src/index.ts @@ -45,7 +45,7 @@ import { const ACCESS_TOKEN = process.env.TIENDANUBE_ACCESS_TOKEN || ""; const STORE_ID = process.env.TIENDANUBE_STORE_ID || ""; -const BASE_URL = `https://api.tiendanube.com/v1/${STORE_ID}`; +const BASE_URL = `${process.env.TIENDANUBE_BASE_URL || "https://api.tiendanube.com/v1"}/${STORE_ID}`; async function tiendaNubeRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { diff --git a/packages/banking/banco-do-brasil/README.md b/packages/banking/banco-do-brasil/README.md index 29c46a1c..9d7b75e8 100644 --- a/packages/banking/banco-do-brasil/README.md +++ b/packages/banking/banco-do-brasil/README.md @@ -41,6 +41,8 @@ BB_DEVELOPER_APP_KEY="..." # gw-dev-app-key — required on most calls BB_CERT_PATH="/abs/path/client.crt" # mTLS cert (production only) BB_KEY_PATH="/abs/path/client.key" # mTLS key (production only) BB_ENV="sandbox" # or "production" (default: sandbox) +BB_BASE_URL="..." # optional; default api.hm.bb.com.br (sandbox) / api.bb.com.br +BB_AUTH_URL="..." # optional; default https://oauth.hm.bb.com.br/oauth/token (sandbox) / oauth.bb.com.br ``` ## Authentication diff --git a/packages/banking/banco-do-brasil/package.json b/packages/banking/banco-do-brasil/package.json index a054ed66..57a271ac 100644 --- a/packages/banking/banco-do-brasil/package.json +++ b/packages/banking/banco-do-brasil/package.json @@ -1,6 +1,6 @@ { "name": "@codespar/mcp-banco-do-brasil", - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "description": "MCP server for Banco do Brasil — Brazil's top public bank. Pix, Cobrança (boleto), Conta-Corrente, and Arrecadação via BB's Developer Portal APIs (OAuth2 + mTLS).", "type": "module", "main": "./dist/index.js", diff --git a/packages/banking/banco-do-brasil/server.json b/packages/banking/banco-do-brasil/server.json index 498a1635..dbd4eeb1 100644 --- a/packages/banking/banco-do-brasil/server.json +++ b/packages/banking/banco-do-brasil/server.json @@ -7,12 +7,12 @@ "source": "github", "subfolder": "packages/banking/banco-do-brasil" }, - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-banco-do-brasil", - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "transport": { "type": "stdio" }, diff --git a/packages/banking/banco-do-brasil/src/index.ts b/packages/banking/banco-do-brasil/src/index.ts index e9ff73a9..1682ed24 100644 --- a/packages/banking/banco-do-brasil/src/index.ts +++ b/packages/banking/banco-do-brasil/src/index.ts @@ -46,6 +46,10 @@ * BB_CERT_PATH path to mTLS client cert (production) * BB_KEY_PATH path to mTLS private key (production) * BB_ENV "sandbox" | "production" (default: sandbox) + * BB_BASE_URL API host override (default: api.hm.bb.com.br in + * sandbox, api.bb.com.br in production) + * BB_AUTH_URL token URL override (default: oauth.hm.bb.com.br + * in sandbox, oauth.bb.com.br in production) * * Docs: https://developers.bb.com.br */ @@ -68,12 +72,15 @@ const BB_ENV = (process.env.BB_ENV || "sandbox").toLowerCase(); const IS_PROD = BB_ENV === "production"; // TODO(verify): production base hostnames. BB documents distinct hosts per -// product family (api.bb.com.br for some, api-pix.bb.com.br for Pix). The -// sandbox subdomain is api.sandbox.bb.com.br for most products. -const BASE_URL = IS_PROD ? "https://api.bb.com.br" : "https://api.sandbox.bb.com.br"; -const OAUTH_URL = IS_PROD +// product family (api.bb.com.br for some, api-pix.bb.com.br for Pix). +// The test environment is *.hm.bb.com.br (developers.bb.com.br guides and the +// oauth.hm.bb.com.br OIDC discovery document). Up to 0.1.0-alpha.4 the +// sandbox defaults were api.sandbox.bb.com.br / oauth.sandbox.bb.com.br, +// which time out or serve a certificate for another name. +const BASE_URL = process.env.BB_BASE_URL || (IS_PROD ? "https://api.bb.com.br" : "https://api.hm.bb.com.br"); +const OAUTH_URL = process.env.BB_AUTH_URL || (IS_PROD ? "https://oauth.bb.com.br/oauth/token" - : "https://oauth.sandbox.bb.com.br/oauth/token"; + : "https://oauth.hm.bb.com.br/oauth/token"); // Lazy-load the mTLS agent so `--help` / schema introspection doesn't crash // when certs are missing. mTLS is required by BACEN in production but BB diff --git a/packages/banking/bradesco/src/index.ts b/packages/banking/bradesco/src/index.ts index cf8ef2e7..f77de014 100644 --- a/packages/banking/bradesco/src/index.ts +++ b/packages/banking/bradesco/src/index.ts @@ -86,9 +86,9 @@ const BRADESCO_ENV = (process.env.BRADESCO_ENV || "sandbox").toLowerCase(); // the .prebanco.com.br domain) for homologação. Exact host + basePath are // contract-gated — override via forked build if your portal provisioning // differs. -const BASE_URL = BRADESCO_ENV === "production" +const BASE_URL = process.env.BRADESCO_BASE_URL || (BRADESCO_ENV === "production" ? "https://proxy.api.prebanco.com.br" - : "https://apihom-bradescorip.bradesco.com.br"; + : "https://apihom-bradescorip.bradesco.com.br"); // Lazy-load the mTLS agent so `--help` / schema introspection doesn't crash // when certs are missing. Banking ops that actually hit the wire will fail diff --git a/packages/banking/btg/src/index.ts b/packages/banking/btg/src/index.ts index e2c7b5f9..254c1061 100644 --- a/packages/banking/btg/src/index.ts +++ b/packages/banking/btg/src/index.ts @@ -71,9 +71,9 @@ const BTG_ENV = (process.env.BTG_ENV || "sandbox").toLowerCase(); // TODO(verify): sandbox base URL. BTG publishes a separate sandbox subdomain // to onboarded counterparties; the exact host is contract-gated. -const BASE_URL = BTG_ENV === "production" +const BASE_URL = process.env.BTG_BASE_URL || (BTG_ENV === "production" ? "https://api.btgpactual.com" - : "https://sandbox.api.btgpactual.com"; + : "https://sandbox.api.btgpactual.com"); // Lazy-load the mTLS agent so `--help` / schema introspection doesn't crash // when certs are missing. Banking ops that actually hit the wire will fail diff --git a/packages/banking/c6/README.md b/packages/banking/c6/README.md index 2a040070..90f1761f 100644 --- a/packages/banking/c6/README.md +++ b/packages/banking/c6/README.md @@ -1,5 +1,7 @@ # @codespar/mcp-c6 +> **Deprecated: no live endpoint.** Measured on 2026-09-27 against two public DNS resolvers (8.8.8.8 and 1.1.1.1): `baas.c6bank.com.br` (production) and `baas-sandbox.c6bank.com.br` (sandbox) do not resolve in DNS. C6's developer portal now documents `baas-api.c6bank.info` (production) and `baas-api-sandbox.c6bank.info` (sandbox), both behind mTLS; this server's paths and auth were not written against them and have not been checked. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with `C6_BASE_URL`. To bring the package back, open an issue in [mcp-dev-latam](https://github.com/codespar/mcp-dev-latam/issues) with the provider's documented base URL. + MCP server for [C6 Bank](https://developers.c6bank.com.br) — a top Brazilian digital bank, JPMorgan-backed. C6 ranks among the largest Brazilian digital banks by retail account base and has expanded aggressively into SMB and corporate banking. Merchants integrate directly for Pix, boleto, and account-data flows. diff --git a/packages/banking/c6/package.json b/packages/banking/c6/package.json index 50e3474f..807aae57 100644 --- a/packages/banking/c6/package.json +++ b/packages/banking/c6/package.json @@ -1,7 +1,7 @@ { "name": "@codespar/mcp-c6", - "version": "0.1.0-alpha.3", - "description": "MCP server for C6 Bank — top Brazilian digital bank backed by JPMorgan. Pix (cob/cobv), DICT keys, Boleto, account balance, and statement via C6's Developer Portal APIs (OAuth2 + mTLS).", + "version": "0.1.0-alpha.4", + "description": "DEPRECATED: no live endpoint (baas.c6bank.com.br does not resolve). MCP server for C6 Bank — top Brazilian digital bank backed by JPMorgan. Pix (cob/cobv), DICT keys, Boleto, account balance, and statement via C6's Developer Portal APIs (OAuth2 + mTLS).", "type": "module", "main": "./dist/index.js", "bin": { diff --git a/packages/banking/c6/server.json b/packages/banking/c6/server.json index 3e348907..58eec72c 100644 --- a/packages/banking/c6/server.json +++ b/packages/banking/c6/server.json @@ -1,18 +1,18 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.codespar/mcp-c6", - "description": "MCP server for C6 Bank — Pix (cob/cobv), DICT keys, Boleto, balance, statement (OAuth2 + mTLS)", + "description": "DEPRECATED: no live endpoint (baas.c6bank.com.br does not resolve)", "repository": { "url": "https://github.com/codespar/mcp-dev-latam", "source": "github", "subfolder": "packages/banking/c6" }, - "version": "0.1.0-alpha.3", + "version": "0.1.0-alpha.4", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-c6", - "version": "0.1.0-alpha.3", + "version": "0.1.0-alpha.4", "transport": { "type": "stdio" }, diff --git a/packages/banking/c6/src/index.ts b/packages/banking/c6/src/index.ts index 91fae3bd..040aa3a4 100644 --- a/packages/banking/c6/src/index.ts +++ b/packages/banking/c6/src/index.ts @@ -1,6 +1,10 @@ #!/usr/bin/env node /** + * DEPRECATED (2026-09-27): no live endpoint. baas.c6bank.com.br does not resolve. + * No tool reaches a service. Override the host with + * C6_BASE_URL if you have a working endpoint. + * * MCP Server for C6 Bank — top Brazilian digital bank, JPMorgan-backed. * * C6 ranks among the largest Brazilian digital banks by retail account base @@ -68,9 +72,9 @@ const C6_ENV = (process.env.C6_ENV || "sandbox").toLowerCase(); // TODO(verify): sandbox + production base URLs. C6 publishes a separate // sandbox subdomain to onboarded merchants; the exact host is contract-gated. -const BASE_URL = C6_ENV === "production" +const BASE_URL = process.env.C6_BASE_URL || (C6_ENV === "production" ? "https://baas.c6bank.com.br" - : "https://baas-sandbox.c6bank.com.br"; + : "https://baas-sandbox.c6bank.com.br"); // Lazy-load the mTLS agent so `--help` / schema introspection doesn't crash // when certs are missing. Banking ops that actually hit the wire will fail diff --git a/packages/banking/caixa/src/index.ts b/packages/banking/caixa/src/index.ts index 24c9b478..740a37d9 100644 --- a/packages/banking/caixa/src/index.ts +++ b/packages/banking/caixa/src/index.ts @@ -84,9 +84,9 @@ const CAIXA_ENV = (process.env.CAIXA_ENV || "sandbox").toLowerCase(); // the homologação host is commonly prefixed with `hom-` or provisioned per // merchant under the same apex. Exact host + basePath are contract-gated — // override via forked build if your portal provisioning differs. -const BASE_URL = CAIXA_ENV === "production" +const BASE_URL = process.env.CAIXA_BASE_URL || (CAIXA_ENV === "production" ? "https://api.caixa.gov.br" - : "https://apihom.caixa.gov.br"; + : "https://apihom.caixa.gov.br"); // Lazy-load the mTLS agent so `--help` / schema introspection doesn't crash // when certs are missing. Banking ops that actually hit the wire will fail diff --git a/packages/banking/dock/README.md b/packages/banking/dock/README.md index 6fd3008a..4fd03885 100644 --- a/packages/banking/dock/README.md +++ b/packages/banking/dock/README.md @@ -1,5 +1,7 @@ # @codespar/mcp-dock +> **Deprecated: no live endpoint.** Measured on 2026-09-27 against two public DNS resolvers (8.8.8.8 and 1.1.1.1): `api.dock.tech` (production) and `sandbox.api.dock.tech` (sandbox) do not resolve in DNS. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with `DOCK_BASE_URL`. To bring the package back, open an issue in [mcp-dev-latam](https://github.com/codespar/mcp-dev-latam/issues) with the provider's documented base URL. + > MCP server for **Dock** — Brazilian Banking-as-a-Service (accounts, Pix, card issuing) for fintechs and embedded-finance products [![npm](https://img.shields.io/npm/v/@codespar/mcp-dock)](https://www.npmjs.com/package/@codespar/mcp-dock) diff --git a/packages/banking/dock/package.json b/packages/banking/dock/package.json index 608d2258..3fe0f919 100644 --- a/packages/banking/dock/package.json +++ b/packages/banking/dock/package.json @@ -1,7 +1,7 @@ { "name": "@codespar/mcp-dock", - "version": "0.2.0-alpha.3", - "description": "MCP server for Dock — Brazilian Banking-as-a-Service (accounts, Pix, card issuing) for fintechs and embedded-finance products", + "version": "0.2.0-alpha.4", + "description": "DEPRECATED: no live endpoint (api.dock.tech does not resolve). MCP server for Dock — Brazilian Banking-as-a-Service (accounts, Pix, card issuing) for fintechs and embedded-finance products", "type": "module", "main": "./dist/index.js", "bin": { diff --git a/packages/banking/dock/server.json b/packages/banking/dock/server.json index bfac77bc..08423a43 100644 --- a/packages/banking/dock/server.json +++ b/packages/banking/dock/server.json @@ -1,18 +1,18 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.codespar/mcp-dock", - "description": "MCP server for Dock — Brazilian Banking-as-a-Service: accounts, Pix, card issuing for fintechs", + "description": "DEPRECATED: no live endpoint (api.dock.tech does not resolve)", "repository": { "url": "https://github.com/codespar/mcp-dev-latam", "source": "github", "subfolder": "packages/banking/dock" }, - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-dock", - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "transport": { "type": "stdio" }, diff --git a/packages/banking/dock/src/index.ts b/packages/banking/dock/src/index.ts index 3e78cda5..e8162a39 100644 --- a/packages/banking/dock/src/index.ts +++ b/packages/banking/dock/src/index.ts @@ -1,5 +1,9 @@ #!/usr/bin/env node /** + * DEPRECATED (2026-09-27): no live endpoint. api.dock.tech does not resolve. + * No tool reaches a service. Override the host with + * DOCK_BASE_URL if you have a working endpoint. + * * MCP Server for Dock — Brazilian Banking-as-a-Service (BaaS). * * Dock is Matera's main competitor in BR BaaS. Together they power most @@ -68,9 +72,10 @@ const CLIENT_ID = process.env.DOCK_CLIENT_ID || ""; const CLIENT_SECRET = process.env.DOCK_CLIENT_SECRET || ""; const DOCK_ENV = (process.env.DOCK_ENV || "sandbox").toLowerCase(); const BASE_URL = - DOCK_ENV === "production" + process.env.DOCK_BASE_URL || + (DOCK_ENV === "production" ? "https://api.dock.tech" - : "https://sandbox.api.dock.tech"; + : "https://sandbox.api.dock.tech"); let tokenCache: { accessToken: string; expiresAt: number } | null = null; diff --git a/packages/banking/iniciador/src/index.ts b/packages/banking/iniciador/src/index.ts index c31449f0..0b178ad3 100644 --- a/packages/banking/iniciador/src/index.ts +++ b/packages/banking/iniciador/src/index.ts @@ -25,7 +25,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js" import { z } from "zod"; const API_KEY = process.env.INICIADOR_API_KEY; -const BASE_URL = process.env.INICIADOR_API_BASE ?? "https://api.iniciador.com.br"; +const BASE_URL = process.env.INICIADOR_BASE_URL || process.env.INICIADOR_API_BASE || "https://api.iniciador.com.br"; if (!API_KEY) { console.error("[mcp-iniciador] missing INICIADOR_API_KEY — refusing to start."); diff --git a/packages/banking/itau/src/index.ts b/packages/banking/itau/src/index.ts index 96a7462e..459db97d 100644 --- a/packages/banking/itau/src/index.ts +++ b/packages/banking/itau/src/index.ts @@ -79,9 +79,9 @@ const ITAU_ENV = (process.env.ITAU_ENV || "sandbox").toLowerCase(); // TODO(verify): sandbox base URL. Itaú publishes a separate sandbox subdomain // to onboarded merchants; the exact host is contract-gated. -const BASE_URL = ITAU_ENV === "production" +const BASE_URL = process.env.ITAU_BASE_URL || (ITAU_ENV === "production" ? "https://api.itau.com.br" - : "https://sandbox.api.itau.com.br"; + : "https://sandbox.api.itau.com.br"); // Lazy-load the mTLS agent so `--help` / schema introspection doesn't crash // when certs are missing. Banking ops that actually hit the wire will fail diff --git a/packages/banking/matera/README.md b/packages/banking/matera/README.md index 32f97b2f..bdfb1a35 100644 --- a/packages/banking/matera/README.md +++ b/packages/banking/matera/README.md @@ -1,5 +1,7 @@ # @codespar/mcp-matera +> **Deprecated: no live endpoint.** Measured on 2026-09-27 against two public DNS resolvers (8.8.8.8 and 1.1.1.1): `api.matera.com`, the host this server calls, does not resolve in DNS. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with `MATERA_BASE_URL`. To bring the package back, open an issue in [mcp-dev-latam](https://github.com/codespar/mcp-dev-latam/issues) with the provider's documented base URL. + > MCP server for **Matera** — Brazilian core-banking infrastructure (BaaS) for fintechs building on top of Pix, DICT, and Pix Automático [![npm](https://img.shields.io/npm/v/@codespar/mcp-matera)](https://www.npmjs.com/package/@codespar/mcp-matera) diff --git a/packages/banking/matera/package.json b/packages/banking/matera/package.json index a46db93d..3162e159 100644 --- a/packages/banking/matera/package.json +++ b/packages/banking/matera/package.json @@ -1,7 +1,7 @@ { "name": "@codespar/mcp-matera", - "version": "0.2.0-alpha.3", - "description": "MCP server for Matera — Brazilian core-banking infrastructure (BaaS) for fintechs building on top of Pix, DICT, and Pix Automático", + "version": "0.2.0-alpha.4", + "description": "DEPRECATED: no live endpoint (api.matera.com does not resolve). MCP server for Matera — Brazilian core-banking infrastructure (BaaS) for fintechs building on top of Pix, DICT, and Pix Automático", "type": "module", "main": "./dist/index.js", "bin": { diff --git a/packages/banking/matera/server.json b/packages/banking/matera/server.json index 5e4f6f97..47e5afa3 100644 --- a/packages/banking/matera/server.json +++ b/packages/banking/matera/server.json @@ -1,18 +1,18 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.codespar/mcp-matera", - "description": "MCP server for Matera — Brazilian core-banking BaaS over Pix, DICT, and Pix Automático", + "description": "DEPRECATED: no live endpoint (api.matera.com does not resolve)", "repository": { "url": "https://github.com/codespar/mcp-dev-latam", "source": "github", "subfolder": "packages/banking/matera" }, - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-matera", - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "transport": { "type": "stdio" }, diff --git a/packages/banking/matera/src/index.ts b/packages/banking/matera/src/index.ts index 24fd627a..3f0ffdbe 100644 --- a/packages/banking/matera/src/index.ts +++ b/packages/banking/matera/src/index.ts @@ -1,5 +1,9 @@ #!/usr/bin/env node /** + * DEPRECATED (2026-09-27): no live endpoint. api.matera.com does not resolve. + * No tool reaches a service. Override the host with + * MATERA_BASE_URL if you have a working endpoint. + * * MCP Server for Matera — Brazilian core-banking infrastructure (BaaS). * * Matera is core-banking rails underneath fintechs, not a PSP. Per vendor diff --git a/packages/banking/pluggy/src/index.ts b/packages/banking/pluggy/src/index.ts index dedf36fb..4b8e2a32 100644 --- a/packages/banking/pluggy/src/index.ts +++ b/packages/banking/pluggy/src/index.ts @@ -25,7 +25,7 @@ import { z } from "zod"; const CLIENT_ID = process.env.PLUGGY_CLIENT_ID; const CLIENT_SECRET = process.env.PLUGGY_CLIENT_SECRET; -const BASE_URL = process.env.PLUGGY_API_BASE ?? "https://api.pluggy.ai"; +const BASE_URL = process.env.PLUGGY_BASE_URL || process.env.PLUGGY_API_BASE || "https://api.pluggy.ai"; if (!CLIENT_ID || !CLIENT_SECRET) { console.error( diff --git a/packages/banking/pomelo/README.md b/packages/banking/pomelo/README.md index 6b40f5d6..58a792bc 100644 --- a/packages/banking/pomelo/README.md +++ b/packages/banking/pomelo/README.md @@ -60,8 +60,8 @@ Add to `.cursor/mcp.json` or `.vscode/mcp.json`: | `POMELO_CLIENT_ID` | yes | OAuth2 client id | | `POMELO_CLIENT_SECRET` | yes | OAuth2 client secret | | `POMELO_ENV` | no | `sandbox` (default) or `production` | -| `POMELO_BASE_URL` | no | API base override (defaults per env) | -| `POMELO_AUTH_URL` | no | Auth base override (defaults per env) | +| `POMELO_BASE_URL` | no | API base override (default `https://api-stage.pomelo.la` in sandbox, `https://api.pomelo.la` in production) | +| `POMELO_AUTH_URL` | no | Auth base override; the token call is `{AUTH_URL}/oauth/token` (default: the same host as the API, per Pomelo's docs) | | `POMELO_AUDIENCE` | no | OAuth2 audience override (defaults per env) | Authentication is OAuth2 client-credentials; the server exchanges and caches the Bearer token automatically. diff --git a/packages/banking/pomelo/package.json b/packages/banking/pomelo/package.json index 0fae8494..cfc9400c 100644 --- a/packages/banking/pomelo/package.json +++ b/packages/banking/pomelo/package.json @@ -1,6 +1,6 @@ { "name": "@codespar/mcp-pomelo", - "version": "0.1.0", + "version": "0.1.1", "description": "MCP server for Pomelo — pan-LATAM card issuing as a service: users, virtual/physical cards, lifecycle, transactions", "type": "module", "main": "./dist/index.js", diff --git a/packages/banking/pomelo/server.json b/packages/banking/pomelo/server.json index 0843f881..10721386 100644 --- a/packages/banking/pomelo/server.json +++ b/packages/banking/pomelo/server.json @@ -7,12 +7,12 @@ "source": "github", "subfolder": "packages/banking/pomelo" }, - "version": "0.1.0", + "version": "0.1.1", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-pomelo", - "version": "0.1.0", + "version": "0.1.1", "transport": { "type": "stdio" }, diff --git a/packages/banking/pomelo/src/index.ts b/packages/banking/pomelo/src/index.ts index 96b2847a..c6783335 100644 --- a/packages/banking/pomelo/src/index.ts +++ b/packages/banking/pomelo/src/index.ts @@ -49,15 +49,20 @@ const CLIENT_ID = process.env.POMELO_CLIENT_ID || ""; const CLIENT_SECRET = process.env.POMELO_CLIENT_SECRET || ""; const ENV = (process.env.POMELO_ENV || "sandbox").toLowerCase(); +// Hosts per developers.pomelo.la ("Stage: https://api-stage.pomelo.la / +// Produccion: https://api.pomelo.la"); the token call is {API host}/oauth/token. +// Up to 0.1.0 the sandbox defaults were api-dev / auth-dev.pomelo.la, +// which do not resolve. const BASE_URL = process.env.POMELO_BASE_URL || - (ENV === "production" ? "https://api.pomelo.la" : "https://api-dev.pomelo.la"); + (ENV === "production" ? "https://api.pomelo.la" : "https://api-stage.pomelo.la"); const AUTH_URL = process.env.POMELO_AUTH_URL || - (ENV === "production" ? "https://auth.pomelo.la" : "https://auth-dev.pomelo.la"); + (ENV === "production" ? "https://api.pomelo.la" : "https://api-stage.pomelo.la"); +// The audience is a JWT claim value, not a host the server connects to. const AUDIENCE = process.env.POMELO_AUDIENCE || - (ENV === "production" ? "https://auth.pomelo.la" : "https://auth-dev.pomelo.la"); + (ENV === "production" ? "https://auth.pomelo.la" : "https://auth-dev.pomelo.la"); // catalog-hosts: not-a-host let cachedToken: { token: string; expiresAt: number } | null = null; diff --git a/packages/banking/santander/src/index.ts b/packages/banking/santander/src/index.ts index e36160d9..eea92cda 100644 --- a/packages/banking/santander/src/index.ts +++ b/packages/banking/santander/src/index.ts @@ -88,9 +88,9 @@ const SANTANDER_ENV = (process.env.SANTANDER_ENV || "sandbox").toLowerCase(); // Verified via Santander's public Cobrança v2 integration guide and // community integrations: production traffic goes through the trust-open // gateway, sandbox through trust-sandbox. Both enforce mTLS. -const BASE_URL = SANTANDER_ENV === "production" +const BASE_URL = process.env.SANTANDER_BASE_URL || (SANTANDER_ENV === "production" ? "https://trust-open.api.santander.com.br" - : "https://trust-sandbox.api.santander.com.br"; + : "https://trust-sandbox.api.santander.com.br"); // Lazy-load the mTLS agent so `--help` / schema introspection doesn't crash // when certs are missing. Banking ops that actually hit the wire will fail diff --git a/packages/banking/sicoob/src/index.ts b/packages/banking/sicoob/src/index.ts index f6653b38..4fcfd62c 100644 --- a/packages/banking/sicoob/src/index.ts +++ b/packages/banking/sicoob/src/index.ts @@ -72,9 +72,9 @@ const SICOOB_ENV = (process.env.SICOOB_ENV || "sandbox").toLowerCase(); // to onboarded cooperatives; the exact subdomain is contract-gated. The // production hostname commonly seen in Sicoob's public materials is // api.sicoob.com.br; sandbox.sicoob.com.br is a reasonable guess. -const BASE_URL = SICOOB_ENV === "production" +const BASE_URL = process.env.SICOOB_BASE_URL || (SICOOB_ENV === "production" ? "https://api.sicoob.com.br" - : "https://sandbox.sicoob.com.br"; + : "https://sandbox.sicoob.com.br"); // Lazy-load the mTLS agent so `--help` / schema introspection doesn't crash // when certs are missing. Banking ops that actually hit the wire will fail diff --git a/packages/banking/stark-bank/src/index.ts b/packages/banking/stark-bank/src/index.ts index eee2981b..040019d5 100644 --- a/packages/banking/stark-bank/src/index.ts +++ b/packages/banking/stark-bank/src/index.ts @@ -41,9 +41,9 @@ const DEMO_RESPONSES: Record = { }; const ACCESS_TOKEN = process.env.STARK_BANK_ACCESS_TOKEN || ""; -const BASE_URL = process.env.STARK_BANK_SANDBOX === "true" +const BASE_URL = process.env.STARK_BANK_BASE_URL || (process.env.STARK_BANK_SANDBOX === "true" ? "https://sandbox.api.starkbank.com/v2" - : "https://api.starkbank.com/v2"; + : "https://api.starkbank.com/v2"); async function starkBankRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/colombia/alegra/src/index.ts b/packages/colombia/alegra/src/index.ts index 651fc371..fc6b9263 100644 --- a/packages/colombia/alegra/src/index.ts +++ b/packages/colombia/alegra/src/index.ts @@ -41,7 +41,7 @@ import { const EMAIL = process.env.ALEGRA_EMAIL || ""; const API_TOKEN = process.env.ALEGRA_API_TOKEN || ""; -const BASE_URL = "https://api.alegra.com/api/v1"; +const BASE_URL = process.env.ALEGRA_BASE_URL || "https://api.alegra.com/api/v1"; async function alegraRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { diff --git a/packages/colombia/bold-co/src/index.ts b/packages/colombia/bold-co/src/index.ts index 52acba19..d459debe 100644 --- a/packages/colombia/bold-co/src/index.ts +++ b/packages/colombia/bold-co/src/index.ts @@ -45,7 +45,7 @@ import { createHash, createHmac, timingSafeEqual } from "node:crypto"; const API_KEY = process.env.BOLD_API_KEY || ""; const SECRET_KEY = process.env.BOLD_SECRET_KEY || ""; -const BASE_URL = "https://integrations.api.bold.co"; +const BASE_URL = process.env.BOLD_BASE_URL || "https://integrations.api.bold.co"; async function boldRequest( method: string, diff --git a/packages/colombia/coordinadora/src/index.ts b/packages/colombia/coordinadora/src/index.ts index 2056d508..4e32ac47 100644 --- a/packages/colombia/coordinadora/src/index.ts +++ b/packages/colombia/coordinadora/src/index.ts @@ -40,7 +40,7 @@ import { const API_KEY = process.env.COORDINADORA_API_KEY || ""; const NIT = process.env.COORDINADORA_NIT || ""; -const BASE_URL = "https://api.coordinadora.com/v1"; +const BASE_URL = process.env.COORDINADORA_BASE_URL || "https://api.coordinadora.com/v1"; async function coordinadoraRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { diff --git a/packages/colombia/epayco/src/index.ts b/packages/colombia/epayco/src/index.ts index 356509ae..da4d5719 100644 --- a/packages/colombia/epayco/src/index.ts +++ b/packages/colombia/epayco/src/index.ts @@ -45,9 +45,9 @@ const PUBLIC_KEY = process.env.EPAYCO_PUBLIC_KEY || ""; const PRIVATE_KEY = process.env.EPAYCO_PRIVATE_KEY || ""; const IS_TEST = (process.env.EPAYCO_TEST || "true").toLowerCase() !== "false"; -const API_URL = "https://api.secure.payco.co"; -const REST_URL = "https://secure.payco.co"; -const VALIDATION_URL = "https://secure.epayco.co"; +const API_URL = process.env.EPAYCO_BASE_URL || "https://api.secure.payco.co"; +const REST_URL = process.env.EPAYCO_REST_URL || "https://secure.payco.co"; +const VALIDATION_URL = process.env.EPAYCO_VALIDATION_URL || "https://secure.epayco.co"; /** Card/token API — Basic auth with the key pair (SDK convention). */ async function apiRequest(method: string, path: string, body?: unknown): Promise { diff --git a/packages/colombia/nequi/src/index.ts b/packages/colombia/nequi/src/index.ts index b91640e1..7b4d4dcb 100644 --- a/packages/colombia/nequi/src/index.ts +++ b/packages/colombia/nequi/src/index.ts @@ -41,9 +41,9 @@ const API_KEY = process.env.NEQUI_API_KEY || ""; const CLIENT_ID = process.env.NEQUI_CLIENT_ID || ""; const CLIENT_SECRET = process.env.NEQUI_CLIENT_SECRET || ""; const NEQUI_ENV = process.env.NEQUI_ENV || "sandbox"; -const BASE_URL = NEQUI_ENV === "production" +const BASE_URL = process.env.NEQUI_BASE_URL || (NEQUI_ENV === "production" ? "https://api.nequi.com" - : "https://api.sandbox.nequi.com"; + : "https://api.sandbox.nequi.com"); let cachedToken: string | null = null; let tokenExpiry = 0; diff --git a/packages/colombia/siigo/src/index.ts b/packages/colombia/siigo/src/index.ts index 21f7b9d4..93039b1e 100644 --- a/packages/colombia/siigo/src/index.ts +++ b/packages/colombia/siigo/src/index.ts @@ -42,7 +42,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const ACCESS_TOKEN = process.env.SIIGO_ACCESS_TOKEN || ""; -const BASE_URL = "https://api.siigo.com/v1"; +const BASE_URL = process.env.SIIGO_BASE_URL || "https://api.siigo.com/v1"; async function siigoRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { diff --git a/packages/colombia/wompi/src/index.ts b/packages/colombia/wompi/src/index.ts index dfd962a2..0614e62b 100644 --- a/packages/colombia/wompi/src/index.ts +++ b/packages/colombia/wompi/src/index.ts @@ -48,9 +48,9 @@ const PUBLIC_KEY = process.env.WOMPI_PUBLIC_KEY || ""; const PRIVATE_KEY = process.env.WOMPI_PRIVATE_KEY || ""; const EVENTS_SECRET = process.env.WOMPI_EVENTS_SECRET || ""; const IS_SANDBOX = process.env.WOMPI_SANDBOX === "true"; -const BASE_URL = IS_SANDBOX +const BASE_URL = process.env.WOMPI_BASE_URL || (IS_SANDBOX ? "https://sandbox.wompi.co/v1" - : "https://production.wompi.co/v1"; + : "https://production.wompi.co/v1"); async function wompiRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { diff --git a/packages/communication/rd-station/src/index.ts b/packages/communication/rd-station/src/index.ts index 1924cb37..43bc16e2 100644 --- a/packages/communication/rd-station/src/index.ts +++ b/packages/communication/rd-station/src/index.ts @@ -37,7 +37,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const TOKEN = process.env.RD_STATION_TOKEN || ""; -const BASE_URL = "https://api.rd.services"; +const BASE_URL = process.env.RD_STATION_BASE_URL || "https://api.rd.services"; async function rdStationRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/communication/sendgrid/src/index.ts b/packages/communication/sendgrid/src/index.ts index 06834047..eb7e23ae 100644 --- a/packages/communication/sendgrid/src/index.ts +++ b/packages/communication/sendgrid/src/index.ts @@ -62,7 +62,7 @@ import { const API_KEY = process.env.SENDGRID_API_KEY || ""; const DEFAULT_FROM_EMAIL = process.env.SENDGRID_FROM_EMAIL || ""; -const BASE_URL = "https://api.sendgrid.com/v3"; +const BASE_URL = process.env.SENDGRID_BASE_URL || "https://api.sendgrid.com/v3"; async function sendgridRequest( method: string, diff --git a/packages/communication/take-blip/src/index.ts b/packages/communication/take-blip/src/index.ts index 99e3bcaf..239df0b1 100644 --- a/packages/communication/take-blip/src/index.ts +++ b/packages/communication/take-blip/src/index.ts @@ -42,7 +42,7 @@ import { const BOT_ID = process.env.TAKE_BLIP_BOT_ID || ""; const ACCESS_KEY = process.env.TAKE_BLIP_ACCESS_KEY || ""; -const BASE_URL = "https://msging.net"; +const BASE_URL = process.env.TAKE_BLIP_BASE_URL || "https://msging.net"; function getAuthKey(): string { const raw = `${BOT_ID}:${ACCESS_KEY}`; diff --git a/packages/communication/twilio/src/index.ts b/packages/communication/twilio/src/index.ts index cd660fb1..69f59874 100644 --- a/packages/communication/twilio/src/index.ts +++ b/packages/communication/twilio/src/index.ts @@ -72,14 +72,21 @@ import { const ACCOUNT_SID = process.env.TWILIO_ACCOUNT_SID || ""; const AUTH_TOKEN = process.env.TWILIO_AUTH_TOKEN || ""; const DEFAULT_MESSAGING_SERVICE_SID = process.env.TWILIO_MESSAGING_SERVICE_SID || ""; -const ACCOUNTS_BASE = `https://api.twilio.com/2010-04-01/Accounts/${ACCOUNT_SID}`; +const BASE_URL = process.env.TWILIO_BASE_URL || "https://api.twilio.com"; +const VERIFY_URL = process.env.TWILIO_VERIFY_URL || "https://verify.twilio.com"; +const LOOKUPS_URL = process.env.TWILIO_LOOKUPS_URL || "https://lookups.twilio.com"; +const CONVERSATIONS_URL = process.env.TWILIO_CONVERSATIONS_URL || "https://conversations.twilio.com"; +const MESSAGING_URL = process.env.TWILIO_MESSAGING_URL || "https://messaging.twilio.com"; +const STUDIO_URL = process.env.TWILIO_STUDIO_URL || "https://studio.twilio.com"; +const TASKROUTER_URL = process.env.TWILIO_TASKROUTER_URL || "https://taskrouter.twilio.com"; +const ACCOUNTS_BASE = `${BASE_URL}/2010-04-01/Accounts/${ACCOUNT_SID}`; async function twilioRequest( method: string, fullUrlOrPath: string, body?: Record ): Promise { - const url = fullUrlOrPath.startsWith("https://") + const url = /^https?:\/\//.test(fullUrlOrPath) ? fullUrlOrPath : `${ACCOUNTS_BASE}${fullUrlOrPath}`; @@ -495,19 +502,19 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { Channel: a.Channel, }; if (a.Locale) body.Locale = a.Locale; - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `https://verify.twilio.com/v2/Services/${a.ServiceSid}/Verifications`, body), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `${VERIFY_URL}/v2/Services/${a.ServiceSid}/Verifications`, body), null, 2) }] }; } case "check_verification": { const body: Record = { To: a.To, Code: a.Code, }; - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `https://verify.twilio.com/v2/Services/${a.ServiceSid}/VerificationCheck`, body), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `${VERIFY_URL}/v2/Services/${a.ServiceSid}/VerificationCheck`, body), null, 2) }] }; } case "lookup_phone": { const q = buildQuery({ Fields: a.Fields, CountryCode: a.CountryCode }); const number = encodeURIComponent(String(a.PhoneNumber ?? "")); - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("GET", `https://lookups.twilio.com/v2/PhoneNumbers/${number}${q}`), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("GET", `${LOOKUPS_URL}/v2/PhoneNumbers/${number}${q}`), null, 2) }] }; } case "list_incoming_numbers": { const q = buildQuery({ @@ -541,7 +548,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { if (a.CodeLength !== undefined) body.CodeLength = a.CodeLength; if (a.LookupEnabled !== undefined) body.LookupEnabled = a.LookupEnabled; if (a.DefaultTemplateSid) body.DefaultTemplateSid = a.DefaultTemplateSid; - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", "https://verify.twilio.com/v2/Services", body), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `${VERIFY_URL}/v2/Services`, body), null, 2) }] }; } case "create_conversation": { const body: Record = {}; @@ -549,7 +556,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { if (a.UniqueName) body.UniqueName = a.UniqueName; if (a.MessagingServiceSid) body.MessagingServiceSid = a.MessagingServiceSid; if (a.Attributes) body.Attributes = a.Attributes; - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", "https://conversations.twilio.com/v1/Conversations", body), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `${CONVERSATIONS_URL}/v1/Conversations`, body), null, 2) }] }; } case "list_conversations": { const q = buildQuery({ @@ -558,7 +565,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { State: a.State, PageSize: a.PageSize, }); - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("GET", `https://conversations.twilio.com/v1/Conversations${q}`), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("GET", `${CONVERSATIONS_URL}/v1/Conversations${q}`), null, 2) }] }; } case "add_conversation_participant": { const body: Record = {}; @@ -566,7 +573,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { if (a["MessagingBinding.Address"]) body["MessagingBinding.Address"] = a["MessagingBinding.Address"]; if (a["MessagingBinding.ProxyAddress"]) body["MessagingBinding.ProxyAddress"] = a["MessagingBinding.ProxyAddress"]; if (a.Attributes) body.Attributes = a.Attributes; - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `https://conversations.twilio.com/v1/Conversations/${a.ConversationSid}/Participants`, body), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `${CONVERSATIONS_URL}/v1/Conversations/${a.ConversationSid}/Participants`, body), null, 2) }] }; } case "send_conversation_message": { const body: Record = {}; @@ -574,11 +581,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { if (a.Author) body.Author = a.Author; if (a.MediaSid) body.MediaSid = a.MediaSid; if (a.Attributes) body.Attributes = a.Attributes; - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `https://conversations.twilio.com/v1/Conversations/${a.ConversationSid}/Messages`, body), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `${CONVERSATIONS_URL}/v1/Conversations/${a.ConversationSid}/Messages`, body), null, 2) }] }; } case "list_messaging_services": { const q = buildQuery({ PageSize: a.PageSize }); - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("GET", `https://messaging.twilio.com/v1/Services${q}`), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("GET", `${MESSAGING_URL}/v1/Services${q}`), null, 2) }] }; } case "execute_studio_flow": { const body: Record = { @@ -586,7 +593,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { From: a.From, }; if (a.Parameters) body.Parameters = a.Parameters; - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `https://studio.twilio.com/v2/Flows/${a.FlowSid}/Executions`, body), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `${STUDIO_URL}/v2/Flows/${a.FlowSid}/Executions`, body), null, 2) }] }; } case "create_taskrouter_task": { const body: Record = {}; @@ -595,7 +602,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { if (a.TaskChannel) body.TaskChannel = a.TaskChannel; if (a.Priority !== undefined) body.Priority = a.Priority; if (a.Timeout !== undefined) body.Timeout = a.Timeout; - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `https://taskrouter.twilio.com/v1/Workspaces/${a.WorkspaceSid}/Tasks`, body), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("POST", `${TASKROUTER_URL}/v1/Workspaces/${a.WorkspaceSid}/Tasks`, body), null, 2) }] }; } case "list_taskrouter_workers": { const q = buildQuery({ @@ -604,7 +611,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { TargetWorkersExpression: a.TargetWorkersExpression, PageSize: a.PageSize, }); - return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("GET", `https://taskrouter.twilio.com/v1/Workspaces/${a.WorkspaceSid}/Workers${q}`), null, 2) }] }; + return { content: [{ type: "text", text: JSON.stringify(await twilioRequest("GET", `${TASKROUTER_URL}/v1/Workspaces/${a.WorkspaceSid}/Workers${q}`), null, 2) }] }; } default: return { content: [{ type: "text", text: `Unknown tool: ${name}` }], isError: true }; diff --git a/packages/communication/whatsapp-cloud/src/index.ts b/packages/communication/whatsapp-cloud/src/index.ts index 42a0142a..36fd1a20 100644 --- a/packages/communication/whatsapp-cloud/src/index.ts +++ b/packages/communication/whatsapp-cloud/src/index.ts @@ -63,7 +63,7 @@ const ACCESS_TOKEN = process.env.WHATSAPP_ACCESS_TOKEN || ""; const PHONE_NUMBER_ID = process.env.WHATSAPP_PHONE_NUMBER_ID || ""; const BUSINESS_ACCOUNT_ID = process.env.WHATSAPP_BUSINESS_ACCOUNT_ID || ""; const GRAPH_VERSION = process.env.WHATSAPP_GRAPH_VERSION || "v21.0"; -const BASE_URL = `https://graph.facebook.com/${GRAPH_VERSION}`; +const BASE_URL = `${process.env.WHATSAPP_BASE_URL || "https://graph.facebook.com"}/${GRAPH_VERSION}`; interface RequestOptions { multipart?: boolean; diff --git a/packages/communication/z-api/src/index.ts b/packages/communication/z-api/src/index.ts index d2daeedc..aba48399 100644 --- a/packages/communication/z-api/src/index.ts +++ b/packages/communication/z-api/src/index.ts @@ -69,7 +69,7 @@ const DEMO_RESPONSES: Record = { const INSTANCE_ID = process.env.ZAPI_INSTANCE_ID || ""; const TOKEN = process.env.ZAPI_TOKEN || ""; -const BASE_URL = `https://api.z-api.io/instances/${INSTANCE_ID}/token/${TOKEN}`; +const BASE_URL = `${process.env.ZAPI_BASE_URL || "https://api.z-api.io"}/instances/${INSTANCE_ID}/token/${TOKEN}`; async function zapiRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/communication/zenvia/src/index.ts b/packages/communication/zenvia/src/index.ts index bda9e6fe..02c01dd2 100644 --- a/packages/communication/zenvia/src/index.ts +++ b/packages/communication/zenvia/src/index.ts @@ -37,7 +37,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const API_TOKEN = process.env.ZENVIA_API_TOKEN || ""; -const BASE_URL = "https://api.zenvia.com/v2"; +const BASE_URL = process.env.ZENVIA_BASE_URL || "https://api.zenvia.com/v2"; async function zenviaRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/crypto/bitso/src/index.ts b/packages/crypto/bitso/src/index.ts index dd9ad9ed..da50c596 100644 --- a/packages/crypto/bitso/src/index.ts +++ b/packages/crypto/bitso/src/index.ts @@ -42,7 +42,7 @@ import * as crypto from "node:crypto"; const API_KEY = process.env.BITSO_API_KEY || ""; const API_SECRET = process.env.BITSO_API_SECRET || ""; -const BASE_URL = "https://api.bitso.com/v3"; +const BASE_URL = process.env.BITSO_BASE_URL || "https://api.bitso.com/v3"; function generateAuthHeader(method: string, path: string, body?: string): string { const nonce = Date.now().toString(); diff --git a/packages/crypto/circle/src/index.ts b/packages/crypto/circle/src/index.ts index abe67bf9..817cee7d 100644 --- a/packages/crypto/circle/src/index.ts +++ b/packages/crypto/circle/src/index.ts @@ -42,7 +42,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const API_KEY = process.env.CIRCLE_API_KEY || ""; -const BASE_URL = "https://api.circle.com/v1"; +const BASE_URL = process.env.CIRCLE_BASE_URL || "https://api.circle.com/v1"; async function circleRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/crypto/coinbase-cdp/src/index.ts b/packages/crypto/coinbase-cdp/src/index.ts index 0a18808d..92334cc8 100644 --- a/packages/crypto/coinbase-cdp/src/index.ts +++ b/packages/crypto/coinbase-cdp/src/index.ts @@ -55,7 +55,7 @@ import { SignJWT, importPKCS8, type KeyLike } from "jose"; const KEY_NAME = process.env.COINBASE_CDP_KEY_NAME || ""; const PRIVATE_KEY_PEM = process.env.COINBASE_CDP_PRIVATE_KEY || ""; -const BASE_URL = "https://api.cdp.coinbase.com"; +const BASE_URL = process.env.COINBASE_CDP_BASE_URL || "https://api.cdp.coinbase.com"; const HOST = "api.cdp.coinbase.com"; if (!KEY_NAME || !PRIVATE_KEY_PEM) { diff --git a/packages/crypto/coinbase-commerce/src/index.ts b/packages/crypto/coinbase-commerce/src/index.ts index 487cc88b..064fe89b 100644 --- a/packages/crypto/coinbase-commerce/src/index.ts +++ b/packages/crypto/coinbase-commerce/src/index.ts @@ -62,7 +62,7 @@ import { createHmac, timingSafeEqual } from "node:crypto"; const API_KEY = process.env.COINBASE_COMMERCE_API_KEY || ""; const API_VERSION = process.env.COINBASE_COMMERCE_API_VERSION || "2018-03-22"; const WEBHOOK_SECRET = process.env.COINBASE_COMMERCE_WEBHOOK_SECRET || ""; -const BASE_URL = "https://api.commerce.coinbase.com"; +const BASE_URL = process.env.COINBASE_COMMERCE_BASE_URL || "https://api.commerce.coinbase.com"; async function coinbaseRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/crypto/foxbit/src/index.ts b/packages/crypto/foxbit/src/index.ts index f457e958..3b8fe9d4 100644 --- a/packages/crypto/foxbit/src/index.ts +++ b/packages/crypto/foxbit/src/index.ts @@ -35,7 +35,7 @@ import * as crypto from "node:crypto"; const API_KEY = process.env.FOXBIT_API_KEY || ""; const API_SECRET = process.env.FOXBIT_API_SECRET || ""; -const BASE_URL = "https://api.foxbit.com.br"; +const BASE_URL = process.env.FOXBIT_BASE_URL || "https://api.foxbit.com.br"; const PATH_PREFIX = "/rest/v3"; async function foxbitRequest( diff --git a/packages/crypto/mercado-bitcoin/src/index.ts b/packages/crypto/mercado-bitcoin/src/index.ts index 8210a9c5..db3113ed 100644 --- a/packages/crypto/mercado-bitcoin/src/index.ts +++ b/packages/crypto/mercado-bitcoin/src/index.ts @@ -41,7 +41,7 @@ import { const API_KEY = process.env.MB_API_KEY || ""; const API_SECRET = process.env.MB_API_SECRET || ""; -const BASE_URL = "https://api.mercadobitcoin.net/api/v4"; +const BASE_URL = process.env.MB_BASE_URL || "https://api.mercadobitcoin.net/api/v4"; async function mbRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/crypto/transak/src/index.ts b/packages/crypto/transak/src/index.ts index 14e06e70..37a36e5b 100644 --- a/packages/crypto/transak/src/index.ts +++ b/packages/crypto/transak/src/index.ts @@ -79,7 +79,7 @@ const API_KEY = process.env.TRANSAK_API_KEY || ""; const API_SECRET = process.env.TRANSAK_API_SECRET || ""; const ACCESS_TOKEN = process.env.TRANSAK_ACCESS_TOKEN || ""; const ENV = (process.env.TRANSAK_ENV || "staging").toLowerCase(); -const BASE_URL = ENV === "production" ? "https://api.transak.com" : "https://api-stg.transak.com"; +const BASE_URL = process.env.TRANSAK_BASE_URL || (ENV === "production" ? "https://api.transak.com" : "https://api-stg.transak.com"); type TransakRequestOpts = { requiresAuth?: boolean }; diff --git a/packages/crypto/x402/README.md b/packages/crypto/x402/README.md index 0487a96c..0234c82f 100644 --- a/packages/crypto/x402/README.md +++ b/packages/crypto/x402/README.md @@ -1,5 +1,7 @@ # @codespar/mcp-x402 +> **Deprecated: no live endpoint.** Measured on 2026-09-27 against two public DNS resolvers (8.8.8.8 and 1.1.1.1): `api.x402.org`, the only host this server calls, does not resolve in DNS. x402 has no central API: it is an HTTP 402 protocol, and each seller picks the facilitator that verifies payment. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with `X402_BASE_URL`. To bring the package back, open an issue in [mcp-dev-latam](https://github.com/codespar/mcp-dev-latam/issues) with the provider's documented base URL. + > MCP server for **x402** — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana) [![npm](https://img.shields.io/npm/v/@codespar/mcp-x402)](https://www.npmjs.com/package/@codespar/mcp-x402) diff --git a/packages/crypto/x402/package.json b/packages/crypto/x402/package.json index e7adcbf5..3fdb350a 100644 --- a/packages/crypto/x402/package.json +++ b/packages/crypto/x402/package.json @@ -1,7 +1,7 @@ { "name": "@codespar/mcp-x402", - "version": "0.1.4", - "description": "MCP server for x402 — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)", + "version": "0.1.5", + "description": "DEPRECATED: no live endpoint (api.x402.org does not resolve). MCP server for x402 — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)", "type": "module", "main": "./dist/index.js", "bin": { diff --git a/packages/crypto/x402/server.json b/packages/crypto/x402/server.json index 1662230b..e2d829fc 100644 --- a/packages/crypto/x402/server.json +++ b/packages/crypto/x402/server.json @@ -1,18 +1,18 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.codespar/mcp-x402", - "description": "MCP server for x402 — HTTP-native micropayments protocol by Coinbase (USDC on Base/Solana)", + "description": "DEPRECATED: no live endpoint (api.x402.org does not resolve)", "repository": { "url": "https://github.com/codespar/mcp-dev-latam", "source": "github", "subfolder": "packages/crypto/x402" }, - "version": "0.1.4", + "version": "0.1.5", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-x402", - "version": "0.1.4", + "version": "0.1.5", "transport": { "type": "stdio" }, diff --git a/packages/crypto/x402/src/index.ts b/packages/crypto/x402/src/index.ts index 29a2579f..83cb945d 100644 --- a/packages/crypto/x402/src/index.ts +++ b/packages/crypto/x402/src/index.ts @@ -1,6 +1,10 @@ #!/usr/bin/env node /** + * DEPRECATED (2026-09-27): no live endpoint. api.x402.org does not resolve. + * No tool reaches a service. Override the host with + * X402_BASE_URL if you have a working endpoint. + * * MCP Server for x402 — HTTP-native micropayments protocol by Coinbase. * * x402 enables machine-to-machine payments at the HTTP layer. @@ -37,7 +41,7 @@ import { const API_KEY = process.env.X402_API_KEY || ""; const NETWORK = process.env.X402_NETWORK || "base"; const WALLET_ADDRESS = process.env.X402_WALLET_ADDRESS || ""; -const BASE_URL = "https://api.x402.org/v1"; +const BASE_URL = process.env.X402_BASE_URL || "https://api.x402.org/v1"; async function x402Request(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/ecommerce/amazon/src/index.ts b/packages/ecommerce/amazon/src/index.ts index 075a0a56..5cbdd9f8 100644 --- a/packages/ecommerce/amazon/src/index.ts +++ b/packages/ecommerce/amazon/src/index.ts @@ -70,13 +70,13 @@ const MARKETPLACE_ID = process.env.AMAZON_MARKETPLACE_ID || ""; const REGION = (process.env.AMAZON_REGION || "na").toLowerCase(); const SELLER_ID = process.env.AMAZON_SELLER_ID || ""; -const LWA_TOKEN_URL = "https://api.amazon.com/auth/o2/token"; +const LWA_TOKEN_URL = process.env.AMAZON_AUTH_URL || "https://api.amazon.com/auth/o2/token"; const REGIONAL_BASE_URLS: Record = { na: "https://sellingpartnerapi-na.amazon.com", eu: "https://sellingpartnerapi-eu.amazon.com", fe: "https://sellingpartnerapi-fe.amazon.com", }; -const BASE_URL = REGIONAL_BASE_URLS[REGION] ?? REGIONAL_BASE_URLS.na; +const BASE_URL = process.env.AMAZON_BASE_URL || (REGIONAL_BASE_URLS[REGION] ?? REGIONAL_BASE_URLS.na); interface TokenCache { accessToken: string; diff --git a/packages/ecommerce/correios/src/index.ts b/packages/ecommerce/correios/src/index.ts index 08360d33..afbf8680 100644 --- a/packages/ecommerce/correios/src/index.ts +++ b/packages/ecommerce/correios/src/index.ts @@ -42,7 +42,7 @@ import { const USER = process.env.CORREIOS_USER || ""; const TOKEN = process.env.CORREIOS_TOKEN || ""; -const BASE_URL = "https://api.correios.com.br"; +const BASE_URL = process.env.CORREIOS_BASE_URL || "https://api.correios.com.br"; let authToken = ""; let tokenExpiry = 0; diff --git a/packages/ecommerce/melhor-envio/src/index.ts b/packages/ecommerce/melhor-envio/src/index.ts index 152ddfd2..4508a5c1 100644 --- a/packages/ecommerce/melhor-envio/src/index.ts +++ b/packages/ecommerce/melhor-envio/src/index.ts @@ -60,9 +60,9 @@ const DEMO_RESPONSES: Record = { }; const TOKEN = process.env.MELHOR_ENVIO_TOKEN || ""; -const BASE_URL = process.env.MELHOR_ENVIO_SANDBOX === "true" +const BASE_URL = process.env.MELHOR_ENVIO_BASE_URL || (process.env.MELHOR_ENVIO_SANDBOX === "true" ? "https://sandbox.melhorenvio.com.br/api/v2" - : "https://melhorenvio.com.br/api/v2"; + : "https://melhorenvio.com.br/api/v2"); async function melhorEnvioRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/ecommerce/shopee/src/index.ts b/packages/ecommerce/shopee/src/index.ts index 2ae54390..99d6a18c 100644 --- a/packages/ecommerce/shopee/src/index.ts +++ b/packages/ecommerce/shopee/src/index.ts @@ -68,9 +68,9 @@ const PARTNER_KEY = process.env.SHOPEE_PARTNER_KEY || ""; const ACCESS_TOKEN = process.env.SHOPEE_ACCESS_TOKEN || ""; const SHOP_ID = process.env.SHOPEE_SHOP_ID || ""; const ENV = (process.env.SHOPEE_ENV || "production").toLowerCase(); -const BASE_URL = ENV === "sandbox" +const BASE_URL = process.env.SHOPEE_BASE_URL || (ENV === "sandbox" ? "https://partner.test-stable.shopeemobile.com" - : "https://partner.shopeemobile.com"; + : "https://partner.shopeemobile.com"); const API_PREFIX = "/api/v2"; function sign(apiPath: string, timestamp: number): string { diff --git a/packages/ecommerce/shopify/src/index.ts b/packages/ecommerce/shopify/src/index.ts index d88b677b..ec508ca3 100644 --- a/packages/ecommerce/shopify/src/index.ts +++ b/packages/ecommerce/shopify/src/index.ts @@ -62,7 +62,7 @@ import { const SHOP = process.env.SHOPIFY_SHOP || ""; const ACCESS_TOKEN = process.env.SHOPIFY_ACCESS_TOKEN || ""; const API_VERSION = process.env.SHOPIFY_API_VERSION || "2024-01"; -const BASE_URL = `https://${SHOP}.myshopify.com/admin/api/${API_VERSION}`; +const BASE_URL = process.env.SHOPIFY_BASE_URL || `https://${SHOP}.myshopify.com/admin/api/${API_VERSION}`; async function shopifyRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/ecommerce/superfrete/src/index.ts b/packages/ecommerce/superfrete/src/index.ts index a228517a..0f7a195f 100644 --- a/packages/ecommerce/superfrete/src/index.ts +++ b/packages/ecommerce/superfrete/src/index.ts @@ -29,9 +29,9 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const TOKEN = process.env.SUPERFRETE_TOKEN || ""; -const BASE_URL = process.env.SUPERFRETE_SANDBOX === "true" +const BASE_URL = process.env.SUPERFRETE_BASE_URL || (process.env.SUPERFRETE_SANDBOX === "true" ? "https://sandbox.superfrete.com/" - : "https://api.superfrete.com/"; + : "https://api.superfrete.com/"); async function superfreteRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/ecommerce/vtex/src/index.ts b/packages/ecommerce/vtex/src/index.ts index 410b2b3d..7129b126 100644 --- a/packages/ecommerce/vtex/src/index.ts +++ b/packages/ecommerce/vtex/src/index.ts @@ -36,9 +36,9 @@ const ACCOUNT_NAME = process.env.VTEX_ACCOUNT_NAME || ""; const APP_KEY = process.env.VTEX_APP_KEY || ""; const APP_TOKEN = process.env.VTEX_APP_TOKEN || ""; const ENVIRONMENT = process.env.VTEX_ENVIRONMENT || "vtexcommercestable"; -const BASE_URL = `https://${ACCOUNT_NAME}.${ENVIRONMENT}.com.br/api`; +const BASE_URL = process.env.VTEX_BASE_URL || `https://${ACCOUNT_NAME}.${ENVIRONMENT}.com.br/api`; // Pricing API lives on the cross-account host api.vtex.com/{account} -const PRICING_BASE_URL = `https://api.vtex.com/${ACCOUNT_NAME}`; +const PRICING_BASE_URL = `${process.env.VTEX_PRICING_URL || "https://api.vtex.com"}/${ACCOUNT_NAME}`; async function vtexRequest(method: string, path: string, body?: unknown): Promise { return vtexRequestAbs(method, `${BASE_URL}${path}`, body); diff --git a/packages/erp/bling/src/index.ts b/packages/erp/bling/src/index.ts index 0bc33141..f3b42093 100644 --- a/packages/erp/bling/src/index.ts +++ b/packages/erp/bling/src/index.ts @@ -44,7 +44,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const ACCESS_TOKEN = process.env.BLING_ACCESS_TOKEN || ""; -const BASE_URL = "https://www.bling.com.br/Api/v3"; +const BASE_URL = process.env.BLING_BASE_URL || "https://www.bling.com.br/Api/v3"; // Bling order `situacao.valor` code for a canceled order. const CANCELED_STATUS = 2; diff --git a/packages/erp/omie/src/index.ts b/packages/erp/omie/src/index.ts index d242198c..2ba7944a 100644 --- a/packages/erp/omie/src/index.ts +++ b/packages/erp/omie/src/index.ts @@ -66,7 +66,7 @@ const DEMO_RESPONSES: Record = { const APP_KEY = process.env.OMIE_APP_KEY || ""; const APP_SECRET = process.env.OMIE_APP_SECRET || ""; -const BASE_URL = "https://app.omie.com.br/api/v1"; +const BASE_URL = process.env.OMIE_BASE_URL || "https://app.omie.com.br/api/v1"; async function omieRequest(path: string, call: string, param: unknown[]): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/erp/quickbooks/src/index.ts b/packages/erp/quickbooks/src/index.ts index 07598074..d612294d 100644 --- a/packages/erp/quickbooks/src/index.ts +++ b/packages/erp/quickbooks/src/index.ts @@ -63,9 +63,10 @@ const QB_ENV = (process.env.QB_ENV || "sandbox").toLowerCase(); const MINOR_VERSION = process.env.QB_MINOR_VERSION || "70"; const BASE_URL = - QB_ENV === "production" + process.env.QB_BASE_URL || + (QB_ENV === "production" ? "https://quickbooks.api.intuit.com" - : "https://sandbox-quickbooks.api.intuit.com"; + : "https://sandbox-quickbooks.api.intuit.com"); async function qbRequest( method: string, diff --git a/packages/erp/tiny/src/index.ts b/packages/erp/tiny/src/index.ts index 624a1d78..39af52b6 100644 --- a/packages/erp/tiny/src/index.ts +++ b/packages/erp/tiny/src/index.ts @@ -42,7 +42,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const API_TOKEN = process.env.TINY_API_TOKEN || ""; -const BASE_URL = "https://api.tiny.com.br/api2"; +const BASE_URL = process.env.TINY_BASE_URL || "https://api.tiny.com.br/api2"; async function tinyRequest(endpoint: string, extraParams?: Record): Promise { const params = new URLSearchParams({ diff --git a/packages/erp/xero/src/index.ts b/packages/erp/xero/src/index.ts index b7d669f5..03014fce 100644 --- a/packages/erp/xero/src/index.ts +++ b/packages/erp/xero/src/index.ts @@ -65,7 +65,7 @@ import { const ACCESS_TOKEN = process.env.XERO_ACCESS_TOKEN || ""; const TENANT_ID = process.env.XERO_TENANT_ID || ""; -const BASE_URL = "https://api.xero.com/api.xro/2.0"; +const BASE_URL = process.env.XERO_BASE_URL || "https://api.xero.com/api.xro/2.0"; async function xeroRequest( method: string, diff --git a/packages/fiscal/conta-azul/src/index.ts b/packages/fiscal/conta-azul/src/index.ts index 99acebc2..0e4b4a38 100644 --- a/packages/fiscal/conta-azul/src/index.ts +++ b/packages/fiscal/conta-azul/src/index.ts @@ -39,7 +39,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const ACCESS_TOKEN = process.env.CONTA_AZUL_ACCESS_TOKEN || ""; -const BASE_URL = "https://api.contaazul.com/v1"; +const BASE_URL = process.env.CONTA_AZUL_BASE_URL || "https://api.contaazul.com/v1"; async function contaAzulRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/fiscal/focus-nfe/src/index.ts b/packages/fiscal/focus-nfe/src/index.ts index 355d5969..3f6d117d 100644 --- a/packages/fiscal/focus-nfe/src/index.ts +++ b/packages/fiscal/focus-nfe/src/index.ts @@ -45,9 +45,9 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const TOKEN = process.env.FOCUS_NFE_TOKEN || ""; -const BASE_URL = process.env.FOCUS_NFE_SANDBOX === "true" +const BASE_URL = process.env.FOCUS_NFE_BASE_URL || (process.env.FOCUS_NFE_SANDBOX === "true" ? "https://homologacao.focusnfe.com.br/v2" - : "https://api.focusnfe.com.br/v2"; + : "https://api.focusnfe.com.br/v2"); async function focusNfeRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/fiscal/nfe-io/src/index.ts b/packages/fiscal/nfe-io/src/index.ts index 264bddbc..629f2d97 100644 --- a/packages/fiscal/nfe-io/src/index.ts +++ b/packages/fiscal/nfe-io/src/index.ts @@ -62,9 +62,9 @@ const DEMO_MODE = process.argv.includes("--demo") || process.env.MCP_DEMO === "t const API_KEY = process.env.NFEIO_API_KEY || ""; const DEFAULT_COMPANY_ID = process.env.NFEIO_COMPANY_ID || ""; -const NFSE_BASE = "https://api.nfe.io"; -const NFE_BASE = "https://api.nfse.io"; -const QUERY_BASE = "https://nfe.api.nfe.io"; +const NFSE_BASE = process.env.NFEIO_BASE_URL || "https://api.nfe.io"; +const NFE_BASE = process.env.NFEIO_NFE_URL || "https://api.nfse.io"; +const QUERY_BASE = process.env.NFEIO_QUERY_URL || "https://nfe.api.nfe.io"; const DEMO_RESPONSES: Record = { create_nfse: { diff --git a/packages/fiscal/nuvem-fiscal/src/index.ts b/packages/fiscal/nuvem-fiscal/src/index.ts index bb5e73c8..35dfbc2c 100644 --- a/packages/fiscal/nuvem-fiscal/src/index.ts +++ b/packages/fiscal/nuvem-fiscal/src/index.ts @@ -95,7 +95,7 @@ export function createNfseDemoResponse(args: any): { const CLIENT_ID = process.env.NUVEM_FISCAL_CLIENT_ID || ""; const CLIENT_SECRET = process.env.NUVEM_FISCAL_CLIENT_SECRET || ""; -const BASE_URL = "https://api.nuvemfiscal.com.br"; +const BASE_URL = process.env.NUVEM_FISCAL_BASE_URL || "https://api.nuvemfiscal.com.br"; let cachedToken: { access_token: string; expires_at: number } | null = null; diff --git a/packages/fraud/legiti/README.md b/packages/fraud/legiti/README.md index 4990d737..4be7540e 100644 --- a/packages/fraud/legiti/README.md +++ b/packages/fraud/legiti/README.md @@ -1,5 +1,7 @@ # @codespar/mcp-legiti +> **Deprecated: no live endpoint.** Measured on 2026-09-27 against two public DNS resolvers (8.8.8.8 and 1.1.1.1): `collection-prod.inspcdn.net`, the host this server calls, does not resolve in DNS. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with `LEGITI_BASE_URL`. To bring the package back, open an issue in [mcp-dev-latam](https://github.com/codespar/mcp-dev-latam/issues) with the provider's documented base URL. + MCP server for [Legiti](https://legiti.com) — Brazilian fraud prevention, ticketing-native with a simple synchronous evaluation API. Fourth entry in the CodeSpar `fraud` category, after [`@codespar/mcp-clearsale`](../clearsale), [`@codespar/mcp-konduto`](../konduto), and [`@codespar/mcp-sift`](../sift). Legiti (formerly Inspetor, São Paulo) occupies the mid-size BR tier: smaller public footprint than ClearSale, more vertical depth than Konduto for ticketing / events, and a simpler API surface than Sift. diff --git a/packages/fraud/legiti/package.json b/packages/fraud/legiti/package.json index 14c660c9..56033f68 100644 --- a/packages/fraud/legiti/package.json +++ b/packages/fraud/legiti/package.json @@ -1,7 +1,7 @@ { "name": "@codespar/mcp-legiti", - "version": "0.2.0-alpha.3", - "description": "MCP server for Legiti — Brazilian fraud prevention (ticketing + ecommerce), real-time order evaluation, chargeback feedback, and account/event/sale collection", + "version": "0.2.0-alpha.4", + "description": "DEPRECATED: no live endpoint (collection-prod.inspcdn.net does not resolve). MCP server for Legiti — Brazilian fraud prevention (ticketing + ecommerce), real-time order evaluation, chargeback feedback, and account/event/sale collection", "type": "module", "main": "./dist/index.js", "bin": { diff --git a/packages/fraud/legiti/server.json b/packages/fraud/legiti/server.json index 5e64f568..deb50f43 100644 --- a/packages/fraud/legiti/server.json +++ b/packages/fraud/legiti/server.json @@ -1,18 +1,18 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.codespar/mcp-legiti", - "description": "MCP server for Legiti — Brazilian fraud prevention: real-time order evaluation, chargeback feedback", + "description": "DEPRECATED: no live endpoint (collection-prod.inspcdn.net does not resolve)", "repository": { "url": "https://github.com/codespar/mcp-dev-latam", "source": "github", "subfolder": "packages/fraud/legiti" }, - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-legiti", - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "transport": { "type": "stdio" }, diff --git a/packages/fraud/legiti/src/index.ts b/packages/fraud/legiti/src/index.ts index 2b428789..0557f9d4 100644 --- a/packages/fraud/legiti/src/index.ts +++ b/packages/fraud/legiti/src/index.ts @@ -1,6 +1,10 @@ #!/usr/bin/env node /** + * DEPRECATED (2026-09-27): no live endpoint. collection-prod.inspcdn.net does not resolve. + * No tool reaches a service. Override the host with + * LEGITI_BASE_URL if you have a working endpoint. + * * MCP Server for Legiti — Brazilian fraud prevention (ticketing + ecommerce). * * Fourth entry in the CodeSpar `fraud` category. Legiti (formerly Inspetor, diff --git a/packages/identity/bigdatacorp/src/index.ts b/packages/identity/bigdatacorp/src/index.ts index 0b38ed0a..a866c181 100644 --- a/packages/identity/bigdatacorp/src/index.ts +++ b/packages/identity/bigdatacorp/src/index.ts @@ -28,7 +28,7 @@ import { z } from "zod"; const ACCESS_TOKEN = process.env.BIGDATACORP_ACCESS_TOKEN; const TOKEN_ID = process.env.BIGDATACORP_TOKEN_ID; -const BASE_URL = process.env.BIGDATACORP_API_BASE ?? "https://plataforma.bigdatacorp.com.br"; +const BASE_URL = process.env.BIGDATACORP_BASE_URL || process.env.BIGDATACORP_API_BASE || "https://plataforma.bigdatacorp.com.br"; if (!ACCESS_TOKEN) { console.error("[mcp-bigdatacorp] missing BIGDATACORP_ACCESS_TOKEN — refusing to start."); diff --git a/packages/identity/brasil-api/src/index.ts b/packages/identity/brasil-api/src/index.ts index 55720814..8c32d798 100644 --- a/packages/identity/brasil-api/src/index.ts +++ b/packages/identity/brasil-api/src/index.ts @@ -50,7 +50,7 @@ function validationError(msg: string) { return { content: [{ type: "text" as const, text: `Validation error: ${msg}` }], isError: true as const }; } -const BASE_URL = "https://brasilapi.com.br/api"; +const BASE_URL = process.env.BRASIL_API_BASE_URL || "https://brasilapi.com.br/api"; // Every request must identify itself. Node's fetch (undici) supplies // "User-Agent: node" when the caller leaves the header out, and BrasilAPI's diff --git a/packages/identity/caf/README.md b/packages/identity/caf/README.md index 847a0850..ce6d549c 100644 --- a/packages/identity/caf/README.md +++ b/packages/identity/caf/README.md @@ -1,5 +1,7 @@ # @codespar/mcp-caf +> **Deprecated: no live endpoint.** Measured on 2026-09-27 against two public DNS resolvers (8.8.8.8 and 1.1.1.1): `api.caf.io`, the host this server calls, does not resolve in DNS. CAF's docs (now branded Certta) name `api.combateafraude.com/v1` for the Core API, which they no longer recommend for new integrations, and `api.us.prd.caf.io` for the newer Connect API; this server was not written against either and has not been checked. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with `CAF_BASE_URL`. To bring the package back, open an issue in [mcp-dev-latam](https://github.com/codespar/mcp-dev-latam/issues) with the provider's documented base URL. + MCP server for **Caf** — Brazilian identity + Trust Platform. KYC/KYB, face authentication + liveness, document validation + OCR, and orchestrated onboarding flows. Direct competitor to Unico / IDwall / Certta; their Trust Platform chains multi-step identity verifications with policy rules. ## Quick Start diff --git a/packages/identity/caf/package.json b/packages/identity/caf/package.json index 41de42a5..9e698492 100644 --- a/packages/identity/caf/package.json +++ b/packages/identity/caf/package.json @@ -1,7 +1,7 @@ { "name": "@codespar/mcp-caf", - "version": "0.1.2", - "description": "MCP server for Caf — Brazilian identity + Trust Platform (KYC/KYB, face authentication + liveness, document validation + OCR, orchestrated onboarding)", + "version": "0.1.3", + "description": "DEPRECATED: no live endpoint (api.caf.io does not resolve). MCP server for Caf — Brazilian identity + Trust Platform (KYC/KYB, face authentication + liveness, document validation + OCR, orchestrated onboarding)", "type": "module", "main": "dist/index.js", "bin": { diff --git a/packages/identity/caf/server.json b/packages/identity/caf/server.json index 22a1cedb..6f8bd6b5 100644 --- a/packages/identity/caf/server.json +++ b/packages/identity/caf/server.json @@ -1,18 +1,18 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.codespar/mcp-caf", - "description": "MCP server for Caf — Brazilian KYC/KYB: face auth + liveness, document OCR, orchestrated onboarding", + "description": "DEPRECATED: no live endpoint (api.caf.io does not resolve)", "repository": { "url": "https://github.com/codespar/mcp-dev-latam", "source": "github", "subfolder": "packages/identity/caf" }, - "version": "0.1.2", + "version": "0.1.3", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-caf", - "version": "0.1.2", + "version": "0.1.3", "transport": { "type": "stdio" }, diff --git a/packages/identity/caf/src/index.ts b/packages/identity/caf/src/index.ts index c2cf4a9f..bbe721a9 100644 --- a/packages/identity/caf/src/index.ts +++ b/packages/identity/caf/src/index.ts @@ -1,6 +1,10 @@ #!/usr/bin/env node /** + * DEPRECATED (2026-09-27): no live endpoint. api.caf.io does not resolve. + * No tool reaches a service. Override the host with + * CAF_BASE_URL if you have a working endpoint. + * * MCP Server for Caf — Brazilian identity + Trust Platform. * * KYC/KYB, face authentication + liveness, document validation + OCR, @@ -22,7 +26,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js" import { z } from "zod"; const API_KEY = process.env.CAF_API_KEY; -const BASE_URL = process.env.CAF_API_BASE ?? "https://api.caf.io"; +const BASE_URL = process.env.CAF_BASE_URL || process.env.CAF_API_BASE || "https://api.caf.io"; if (!API_KEY) { console.error("[mcp-caf] missing CAF_API_KEY — refusing to start."); diff --git a/packages/identity/certta/README.md b/packages/identity/certta/README.md index be614085..7e069bda 100644 --- a/packages/identity/certta/README.md +++ b/packages/identity/certta/README.md @@ -1,5 +1,7 @@ # @codespar/mcp-certta +> **Deprecated: no live endpoint.** Measured on 2026-09-27 against two public DNS resolvers (8.8.8.8 and 1.1.1.1): `api.certta.com.br`, the host this server calls, does not resolve in DNS. `docs.certta.ai` redirects to CAF's documentation (Certta is CAF's current brand), which names `api.combateafraude.com/v1` (Core API, not recommended for new integrations) and `api.us.prd.caf.io` (Connect API); this server was not written against either and has not been checked. See also `@codespar/mcp-caf`. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with `CERTTA_BASE_URL`. To bring the package back, open an issue in [mcp-dev-latam](https://github.com/codespar/mcp-dev-latam/issues) with the provider's documented base URL. + MCP server for **Certta** — Brazilian identity + signature platform. KYC/KYB (CPF / CNPJ via Receita Federal + SPC / Serasa), face match + liveness, OCR of RG / CNH / comprovantes, antifraud score, ICP-Brasil digital signature + GoCertta electronic signature, and orchestrated onboarding pipelines that chain KYC + biometrics + signature in one process. ## Quick Start diff --git a/packages/identity/certta/package.json b/packages/identity/certta/package.json index 6580b7a1..f4746261 100644 --- a/packages/identity/certta/package.json +++ b/packages/identity/certta/package.json @@ -1,7 +1,7 @@ { "name": "@codespar/mcp-certta", - "version": "0.1.2", - "description": "MCP server for Certta — Brazilian identity + signature platform (KYC/KYB, biometrics, OCR, ICP-Brasil + electronic signature, onboarding pipelines)", + "version": "0.1.3", + "description": "DEPRECATED: no live endpoint (api.certta.com.br does not resolve). MCP server for Certta — Brazilian identity + signature platform (KYC/KYB, biometrics, OCR, ICP-Brasil + electronic signature, onboarding pipelines)", "type": "module", "main": "dist/index.js", "bin": { diff --git a/packages/identity/certta/server.json b/packages/identity/certta/server.json index ef05a8c8..b651458b 100644 --- a/packages/identity/certta/server.json +++ b/packages/identity/certta/server.json @@ -1,18 +1,18 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.codespar/mcp-certta", - "description": "MCP server for Certta — Brazilian KYC/KYB: biometrics, OCR, ICP-Brasil e-signature, onboarding", + "description": "DEPRECATED: no live endpoint (api.certta.com.br does not resolve)", "repository": { "url": "https://github.com/codespar/mcp-dev-latam", "source": "github", "subfolder": "packages/identity/certta" }, - "version": "0.1.2", + "version": "0.1.3", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-certta", - "version": "0.1.2", + "version": "0.1.3", "transport": { "type": "stdio" }, diff --git a/packages/identity/certta/src/index.ts b/packages/identity/certta/src/index.ts index 71f53824..48180975 100644 --- a/packages/identity/certta/src/index.ts +++ b/packages/identity/certta/src/index.ts @@ -1,6 +1,10 @@ #!/usr/bin/env node /** + * DEPRECATED (2026-09-27): no live endpoint. api.certta.com.br does not resolve. + * No tool reaches a service. Override the host with + * CERTTA_BASE_URL if you have a working endpoint. + * * MCP Server for Certta — Brazilian identity + signature platform. * * KYC/KYB (CPF / CNPJ via Receita Federal + SPC / Serasa), face match + @@ -22,7 +26,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js" import { z } from "zod"; const API_KEY = process.env.CERTTA_API_KEY; -const BASE_URL = process.env.CERTTA_API_BASE ?? "https://api.certta.com.br"; +const BASE_URL = process.env.CERTTA_BASE_URL || process.env.CERTTA_API_BASE || "https://api.certta.com.br"; if (!API_KEY) { console.error("[mcp-certta] missing CERTTA_API_KEY — refusing to start."); diff --git a/packages/identity/jumio/src/index.ts b/packages/identity/jumio/src/index.ts index 48d5bcf0..96e99622 100644 --- a/packages/identity/jumio/src/index.ts +++ b/packages/identity/jumio/src/index.ts @@ -75,7 +75,7 @@ function regionHost(r: string): string { default: return "https://api.amer-1.jumio.ai"; } } -const BASE_URL = regionHost(REGION); +const BASE_URL = process.env.JUMIO_BASE_URL || regionHost(REGION); async function jumioRequest( method: string, diff --git a/packages/identity/onfido/src/index.ts b/packages/identity/onfido/src/index.ts index b47b3911..211eb4af 100644 --- a/packages/identity/onfido/src/index.ts +++ b/packages/identity/onfido/src/index.ts @@ -61,7 +61,7 @@ function regionHost(r: string): string { default: return "https://api.onfido.com"; } } -const BASE_URL = `${regionHost(REGION)}/v3.6`; +const BASE_URL = `${process.env.ONFIDO_BASE_URL || regionHost(REGION)}/v3.6`; type RequestOpts = { multipart?: boolean; raw?: boolean }; diff --git a/packages/identity/persona/src/index.ts b/packages/identity/persona/src/index.ts index f9906148..c6b3a102 100644 --- a/packages/identity/persona/src/index.ts +++ b/packages/identity/persona/src/index.ts @@ -61,7 +61,7 @@ import { const API_KEY = process.env.PERSONA_API_KEY || ""; const API_VERSION = process.env.PERSONA_API_VERSION || "2023-01-05"; -const BASE_URL = "https://api.withpersona.com/api/v1"; +const BASE_URL = process.env.PERSONA_BASE_URL || "https://api.withpersona.com/api/v1"; type RequestOpts = { query?: Record }; diff --git a/packages/identity/unico/README.md b/packages/identity/unico/README.md index a9e3e722..f8037247 100644 --- a/packages/identity/unico/README.md +++ b/packages/identity/unico/README.md @@ -1,5 +1,7 @@ # @codespar/mcp-unico +> **Deprecated: no live endpoint.** Measured on 2026-09-27 against two public DNS resolvers (8.8.8.8 and 1.1.1.1): `api.unico.co` (API) and `auth.unico.co` (token) do not resolve in DNS. Unico's developer docs now name `api.id.unico.app` / `api.id.uat.unico.app` for the API and `identity.acesso.io` / `identityhomolog.acesso.io` for OAuth; this server's paths and auth were not written against them and have not been checked. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with `UNICO_BASE_URL` and `UNICO_AUTH_URL`. To bring the package back, open an issue in [mcp-dev-latam](https://github.com/codespar/mcp-dev-latam/issues) with the provider's documented base URL. + MCP server for [Unico](https://unico.io) — the Brazilian identity verification leader. CPF/CNPJ validation, document OCR, face biometrics, liveness, PEP / watchlist / court-records screening. First entry in the CodeSpar `identity` category. Commerce agents onboarding sellers (marketplaces), running high-value transactions, or operating KYC-regulated flows need identity verification — Unico is the BR standard. Paired with [`@codespar/mcp-onfido`](../onfido) for BR-first + global coverage. diff --git a/packages/identity/unico/package.json b/packages/identity/unico/package.json index 6cedd254..d0707a96 100644 --- a/packages/identity/unico/package.json +++ b/packages/identity/unico/package.json @@ -1,7 +1,7 @@ { "name": "@codespar/mcp-unico", - "version": "0.2.0-alpha.3", - "description": "MCP server for Unico — Brazilian identity verification & KYC (IDCloud, IDPay, IDCheck, Sign). CPF/CNPJ, document OCR, face match, liveness, PEP/watchlists, processes, webhooks, Unico Score.", + "version": "0.2.0-alpha.4", + "description": "DEPRECATED: no live endpoint (api.unico.co does not resolve). MCP server for Unico — Brazilian identity verification & KYC (IDCloud, IDPay, IDCheck, Sign). CPF/CNPJ, document OCR, face match, liveness, PEP/watchlists, processes, webhooks, Unico Score.", "type": "module", "main": "./dist/index.js", "bin": { diff --git a/packages/identity/unico/server.json b/packages/identity/unico/server.json index a517f575..3f8ce4b0 100644 --- a/packages/identity/unico/server.json +++ b/packages/identity/unico/server.json @@ -1,18 +1,18 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.codespar/mcp-unico", - "description": "MCP server for Unico — Brazilian identity + KYC: CPF/CNPJ, OCR, face match, liveness, PEP/watchlists", + "description": "DEPRECATED: no live endpoint (api.unico.co does not resolve)", "repository": { "url": "https://github.com/codespar/mcp-dev-latam", "source": "github", "subfolder": "packages/identity/unico" }, - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-unico", - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "transport": { "type": "stdio" }, diff --git a/packages/identity/unico/src/index.ts b/packages/identity/unico/src/index.ts index bacec8ea..6889bc9b 100644 --- a/packages/identity/unico/src/index.ts +++ b/packages/identity/unico/src/index.ts @@ -1,6 +1,10 @@ #!/usr/bin/env node /** + * DEPRECATED (2026-09-27): no live endpoint. api.unico.co does not resolve. + * No tool reaches a service. Override the host with + * UNICO_BASE_URL, UNICO_AUTH_URL if you have a working endpoint. + * * MCP Server for Unico — the Brazilian identity verification leader. * * Unico offers three separately-contracted products: diff --git a/packages/mexico/belvo/src/index.ts b/packages/mexico/belvo/src/index.ts index 511f1646..81032cd8 100644 --- a/packages/mexico/belvo/src/index.ts +++ b/packages/mexico/belvo/src/index.ts @@ -47,7 +47,7 @@ import { const SECRET_ID = process.env.BELVO_SECRET_ID || ""; const SECRET_PASSWORD = process.env.BELVO_SECRET_PASSWORD || ""; const IS_SANDBOX = process.env.BELVO_SANDBOX === "true"; -const BASE_URL = IS_SANDBOX ? "https://sandbox.belvo.com" : "https://api.belvo.com"; +const BASE_URL = process.env.BELVO_BASE_URL || (IS_SANDBOX ? "https://sandbox.belvo.com" : "https://api.belvo.com"); async function belvoRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { "Content-Type": "application/json" }; diff --git a/packages/mexico/bind-erp/src/index.ts b/packages/mexico/bind-erp/src/index.ts index 16856747..6d403648 100644 --- a/packages/mexico/bind-erp/src/index.ts +++ b/packages/mexico/bind-erp/src/index.ts @@ -39,7 +39,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const API_KEY = process.env.BIND_API_KEY || ""; -const BASE_URL = "https://api.bind.com.mx/api/v1"; +const BASE_URL = process.env.BIND_BASE_URL || "https://api.bind.com.mx/api/v1"; async function bindRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { "Content-Type": "application/json" }; diff --git a/packages/mexico/conekta/src/index.ts b/packages/mexico/conekta/src/index.ts index a9fb75fe..dbe13f22 100644 --- a/packages/mexico/conekta/src/index.ts +++ b/packages/mexico/conekta/src/index.ts @@ -25,7 +25,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const API_KEY = process.env.CONEKTA_API_KEY || ""; -const BASE_URL = "https://api.conekta.io"; +const BASE_URL = process.env.CONEKTA_BASE_URL || "https://api.conekta.io"; async function conektaRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { diff --git a/packages/mexico/facturapi/src/index.ts b/packages/mexico/facturapi/src/index.ts index 29ca5d1e..f90d235a 100644 --- a/packages/mexico/facturapi/src/index.ts +++ b/packages/mexico/facturapi/src/index.ts @@ -25,7 +25,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const API_KEY = process.env.FACTURAPI_API_KEY || ""; -const BASE_URL = "https://www.facturapi.io/v2"; +const BASE_URL = process.env.FACTURAPI_BASE_URL || "https://www.facturapi.io/v2"; async function facturRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { "Content-Type": "application/json" }; diff --git a/packages/mexico/skydropx/src/index.ts b/packages/mexico/skydropx/src/index.ts index 9e8df4ed..f2635616 100644 --- a/packages/mexico/skydropx/src/index.ts +++ b/packages/mexico/skydropx/src/index.ts @@ -43,7 +43,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const API_TOKEN = process.env.SKYDROPX_API_TOKEN || ""; -const BASE_URL = "https://api.skydropx.com/v1"; +const BASE_URL = process.env.SKYDROPX_BASE_URL || "https://api.skydropx.com/v1"; async function skyRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { "Content-Type": "application/json" }; diff --git a/packages/mexico/stp-spei/src/index.ts b/packages/mexico/stp-spei/src/index.ts index cbc0d3d0..3813d0bc 100644 --- a/packages/mexico/stp-spei/src/index.ts +++ b/packages/mexico/stp-spei/src/index.ts @@ -39,7 +39,7 @@ import { const API_KEY = process.env.STP_API_KEY || ""; const COMPANY = process.env.STP_COMPANY || ""; -const BASE_URL = "https://demo.stpmex.com:7024/speiws/rest"; +const BASE_URL = process.env.STP_BASE_URL || "https://demo.stpmex.com:7024/speiws/rest"; async function stpRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { "Content-Type": "application/json" }; diff --git a/packages/payments/adyen/src/index.ts b/packages/payments/adyen/src/index.ts index 18f000c6..5e2165f3 100644 --- a/packages/payments/adyen/src/index.ts +++ b/packages/payments/adyen/src/index.ts @@ -89,6 +89,7 @@ const ENV = (process.env.ADYEN_ENV || "test").toLowerCase(); const LIVE_URL_PREFIX = process.env.ADYEN_LIVE_URL_PREFIX || ""; function checkoutBaseUrl(): string { + if (process.env.ADYEN_BASE_URL) return process.env.ADYEN_BASE_URL; if (ENV === "live") { if (!LIVE_URL_PREFIX) { throw new Error("ADYEN_ENV=live requires ADYEN_LIVE_URL_PREFIX to be set"); @@ -100,6 +101,7 @@ function checkoutBaseUrl(): string { /** Classic Dispute Service v30 base (same host family as Pay / BIN lookup). */ function disputesBaseUrl(): string { + if (process.env.ADYEN_DISPUTE_URL) return process.env.ADYEN_DISPUTE_URL; return ENV === "live" ? "https://ca-live.adyen.com/ca/services/DisputeService/v30" : "https://ca-test.adyen.com/ca/services/DisputeService/v30"; @@ -107,6 +109,7 @@ function disputesBaseUrl(): string { /** Balance Platform — BCL v2 (balance accounts, account holders). */ function balancePlatformBaseUrl(): string { + if (process.env.ADYEN_BALANCE_PLATFORM_URL) return process.env.ADYEN_BALANCE_PLATFORM_URL; return ENV === "live" ? "https://balanceplatform-api-live.adyen.com/bcl/v2" : "https://balanceplatform-api-test.adyen.com/bcl/v2"; @@ -114,6 +117,7 @@ function balancePlatformBaseUrl(): string { /** Transfers API — BTL v4. */ function transfersBaseUrl(): string { + if (process.env.ADYEN_TRANSFERS_URL) return process.env.ADYEN_TRANSFERS_URL; return ENV === "live" ? "https://balanceplatform-api-live.adyen.com/btl/v4" : "https://balanceplatform-api-test.adyen.com/btl/v4"; @@ -121,6 +125,7 @@ function transfersBaseUrl(): string { /** Management API v3 (merchants, stores, API credentials). */ function managementBaseUrl(): string { + if (process.env.ADYEN_MANAGEMENT_URL) return process.env.ADYEN_MANAGEMENT_URL; return ENV === "live" ? "https://management-live.adyen.com/v3" : "https://management-test.adyen.com/v3"; diff --git a/packages/payments/airwallex/src/index.ts b/packages/payments/airwallex/src/index.ts index 5152bfa6..e78d86dd 100644 --- a/packages/payments/airwallex/src/index.ts +++ b/packages/payments/airwallex/src/index.ts @@ -59,9 +59,10 @@ const CLIENT_ID = process.env.AIRWALLEX_CLIENT_ID || ""; const API_KEY = process.env.AIRWALLEX_API_KEY || ""; const ENV = (process.env.AIRWALLEX_ENV || "demo").toLowerCase(); const BASE_URL = - ENV === "production" + process.env.AIRWALLEX_BASE_URL || + (ENV === "production" ? "https://api.airwallex.com/api/v1" - : "https://api-demo.airwallex.com/api/v1"; + : "https://api-demo.airwallex.com/api/v1"); interface TokenCache { token: string; diff --git a/packages/payments/ap2/README.md b/packages/payments/ap2/README.md index e7952c06..1e1d3e5d 100644 --- a/packages/payments/ap2/README.md +++ b/packages/payments/ap2/README.md @@ -1,5 +1,6 @@ # @codespar/mcp-ap2 +> **Deprecated: no live endpoint.** Measured on 2026-09-27: `ap2.googleapis.com` answers every path with Google's generic `Error 404 (Not Found)` page, and `sandbox.ap2.googleapis.com` (used with `AP2_SANDBOX=true`) fails the TLS handshake, because the certificate served there covers `*.googleapis.com` and not the extra label. AP2 is an open specification, not an API Google hosts. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with `AP2_BASE_URL`. To bring the package back, open an issue in [mcp-dev-latam](https://github.com/codespar/mcp-dev-latam/issues) with the provider's documented base URL. > **Alpha release** — published under the `alpha` npm dist-tag. Pin exact versions during `0.x.x-alpha`. Install with `npm install @alpha`. @@ -8,8 +9,6 @@ [![npm](https://img.shields.io/npm/v/@codespar/mcp-ap2)](https://www.npmjs.com/package/@codespar/mcp-ap2) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) -> **No live endpoint.** Checked on 2026-08-27. This server's `BASE_URL` (`src/index.ts:62-64`) is `https://ap2.googleapis.com/v1`, which answers HTTP 404 with Google's generic `Error 404 (Not Found)` HTML page instead of an API response. With `AP2_SANDBOX=true` the address becomes `https://sandbox.ap2.googleapis.com/v1`, which fails the TLS handshake, because the certificate served there covers `*.googleapis.com` and not the extra label. AP2 is a published specification and this package ships tool definitions written for it; we have not checked them against a conforming implementation, and no call made through this server currently reaches a service. - ## What is AP2? AP2 (Agent-to-Agent Payment Protocol) is Google's open framework for **authorization, audit, and trust** in agentic payments. It answers the critical questions: *Who authorized this payment? What limits apply? What's the full audit trail?* diff --git a/packages/payments/ap2/package.json b/packages/payments/ap2/package.json index b8e0dee4..bfe55b22 100644 --- a/packages/payments/ap2/package.json +++ b/packages/payments/ap2/package.json @@ -1,7 +1,7 @@ { "name": "@codespar/mcp-ap2", - "version": "0.2.0-alpha.3", - "description": "MCP server for AP2 — Google's Agent-to-Agent Payment Protocol (authorization, audit, trust)", + "version": "0.2.0-alpha.4", + "description": "DEPRECATED: no live endpoint (AP2 is a spec; ap2.googleapis.com serves no API). MCP server for AP2 — Google's Agent-to-Agent Payment Protocol (authorization, audit, trust)", "type": "module", "main": "./dist/index.js", "bin": { diff --git a/packages/payments/ap2/server.json b/packages/payments/ap2/server.json index ccdcb2f0..a7e3e3df 100644 --- a/packages/payments/ap2/server.json +++ b/packages/payments/ap2/server.json @@ -1,18 +1,18 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.codespar/mcp-ap2", - "description": "MCP server for AP2 — Google's Agent-to-Agent Payment Protocol (authorization, audit, trust)", + "description": "DEPRECATED: no live endpoint (AP2 is a spec; ap2.googleapis.com serves no API)", "repository": { "url": "https://github.com/codespar/mcp-dev-latam", "source": "github", "subfolder": "packages/payments/ap2" }, - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-ap2", - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "transport": { "type": "stdio" }, diff --git a/packages/payments/ap2/src/index.ts b/packages/payments/ap2/src/index.ts index 31ee058a..29b654a8 100644 --- a/packages/payments/ap2/src/index.ts +++ b/packages/payments/ap2/src/index.ts @@ -1,6 +1,10 @@ #!/usr/bin/env node /** + * DEPRECATED (2026-09-27): no live endpoint. AP2 is a spec; ap2.googleapis.com serves no API. + * No tool reaches a service. Override the host with + * AP2_BASE_URL if you have a working endpoint. + * * MCP Server for AP2 — Google's Agent-to-Agent Payment Protocol. * * AP2 provides authorization, audit trails, and trust frameworks @@ -57,9 +61,9 @@ import { const API_KEY = process.env.AP2_API_KEY || ""; const AGENT_ID = process.env.AP2_AGENT_ID || ""; const SANDBOX = process.env.AP2_SANDBOX === "true"; -const BASE_URL = SANDBOX +const BASE_URL = process.env.AP2_BASE_URL || (SANDBOX ? "https://sandbox.ap2.googleapis.com/v1" - : "https://ap2.googleapis.com/v1"; + : "https://ap2.googleapis.com/v1"); async function ap2Request(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/payments/asaas/src/index.ts b/packages/payments/asaas/src/index.ts index 4c5332b2..eba45bc8 100644 --- a/packages/payments/asaas/src/index.ts +++ b/packages/payments/asaas/src/index.ts @@ -203,9 +203,9 @@ export function getInstallmentsDemoResponse(args: any): Record } const API_KEY = process.env.ASAAS_API_KEY || ""; -const BASE_URL = process.env.ASAAS_SANDBOX === "true" +const BASE_URL = process.env.ASAAS_BASE_URL || (process.env.ASAAS_SANDBOX === "true" ? "https://sandbox.asaas.com/api/v3" - : "https://api.asaas.com/v3"; + : "https://api.asaas.com/v3"); async function asaasRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/payments/braintree/src/index.ts b/packages/payments/braintree/src/index.ts index 63102ece..1efee2fc 100644 --- a/packages/payments/braintree/src/index.ts +++ b/packages/payments/braintree/src/index.ts @@ -64,9 +64,10 @@ const PRIVATE_KEY = process.env.BRAINTREE_PRIVATE_KEY || ""; const ENV = (process.env.BRAINTREE_ENV || "sandbox").toLowerCase(); const API_VERSION = process.env.BRAINTREE_API_VERSION || "2019-01-01"; const ENDPOINT = - ENV === "production" + process.env.BRAINTREE_BASE_URL || + (ENV === "production" ? "https://payments.braintree-api.com/graphql" - : "https://payments.sandbox.braintree-api.com/graphql"; + : "https://payments.sandbox.braintree-api.com/graphql"); void MERCHANT_ID; // not sent as header, included for parity with Control Panel docs & future scoping diff --git a/packages/payments/braspag/src/index.ts b/packages/payments/braspag/src/index.ts index 163b47b2..b0692aff 100644 --- a/packages/payments/braspag/src/index.ts +++ b/packages/payments/braspag/src/index.ts @@ -68,12 +68,12 @@ const MERCHANT_ID = process.env.BRASPAG_MERCHANT_ID || ""; const MERCHANT_KEY = process.env.BRASPAG_MERCHANT_KEY || ""; const ENV = (process.env.BRASPAG_ENV || "sandbox").toLowerCase(); -const TRANSACTION_URL = ENV === "production" +const TRANSACTION_URL = process.env.BRASPAG_BASE_URL || (ENV === "production" ? "https://api.braspag.com.br/v2" - : "https://apisandbox.braspag.com.br/v2"; -const QUERY_URL = ENV === "production" + : "https://apisandbox.braspag.com.br/v2"); +const QUERY_URL = process.env.BRASPAG_QUERY_URL || (ENV === "production" ? "https://apiquery.braspag.com.br/v2" - : "https://apiquerysandbox.braspag.com.br/v2"; + : "https://apiquerysandbox.braspag.com.br/v2"); async function braspagRequest( method: string, diff --git a/packages/payments/celcoin/README.md b/packages/payments/celcoin/README.md index 5c8b315e..f3d06326 100644 --- a/packages/payments/celcoin/README.md +++ b/packages/payments/celcoin/README.md @@ -84,6 +84,8 @@ Celcoin uses OAuth2 client credentials. The server automatically manages token r Celcoin provides a sandbox at `sandbox.openfinance.celcoin.dev`. Set `CELCOIN_SANDBOX=true` to use it. +Without `CELCOIN_SANDBOX`, the server calls Celcoin production at `api.openfinance.celcoin.com.br` (up to 0.2.3 the default was `api-sec.celcoin.com.br`, a host that does not exist). Celcoin accepts production calls only over mTLS, with a certificate Celcoin issues, and only from IPs you registered with them in advance ([Celcoin docs](https://developers.celcoin.com.br/docs/obtendo-acesso-%C3%A0s-apis)). From any other IP the token call answers `401 "O seu IP ou certificado digital nao foi reconhecido"`. This server does not present a client certificate, so in production point `CELCOIN_BASE_URL` at a proxy that holds the certificate and terminates the mTLS; called directly, production answers that 401. + ### Get your credentials 1. Go to [Celcoin Documentation](https://docs.celcoin.com.br) @@ -98,6 +100,7 @@ Celcoin provides a sandbox at `sandbox.openfinance.celcoin.dev`. Set `CELCOIN_SA | `CELCOIN_CLIENT_ID` | Yes | OAuth2 client ID | | `CELCOIN_CLIENT_SECRET` | Yes | OAuth2 client secret | | `CELCOIN_SANDBOX` | No | Set to `"true"` for sandbox mode | +| `CELCOIN_BASE_URL` | No | Override the API host. Defaults: `https://api.openfinance.celcoin.com.br` (production), `https://sandbox.openfinance.celcoin.dev` (sandbox) | ## Roadmap diff --git a/packages/payments/celcoin/package.json b/packages/payments/celcoin/package.json index a7f027df..43aae3a7 100644 --- a/packages/payments/celcoin/package.json +++ b/packages/payments/celcoin/package.json @@ -1,6 +1,6 @@ { "name": "@codespar/mcp-celcoin", - "version": "0.2.3", + "version": "0.2.4", "description": "MCP server for Celcoin — Pix, boleto, transfers, bill payments, top-ups", "type": "module", "main": "./dist/index.js", diff --git a/packages/payments/celcoin/server.json b/packages/payments/celcoin/server.json index 85ffd4cf..b21a9108 100644 --- a/packages/payments/celcoin/server.json +++ b/packages/payments/celcoin/server.json @@ -7,12 +7,12 @@ "source": "github", "subfolder": "packages/payments/celcoin" }, - "version": "0.2.3", + "version": "0.2.4", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-celcoin", - "version": "0.2.3", + "version": "0.2.4", "transport": { "type": "stdio" }, diff --git a/packages/payments/celcoin/src/__tests__/index.test.ts b/packages/payments/celcoin/src/__tests__/index.test.ts index 1243c6b0..49b87116 100644 --- a/packages/payments/celcoin/src/__tests__/index.test.ts +++ b/packages/payments/celcoin/src/__tests__/index.test.ts @@ -197,15 +197,35 @@ describe("mcp-celcoin", () => { expect(url).not.toContain("sandbox-api.celcoin.com.br"); }); - it("uses the production host when CELCOIN_SANDBOX is unset", async () => { + it("uses api.openfinance.celcoin.com.br (not the dead api-sec host) when CELCOIN_SANDBOX is unset", async () => { mockFetch.mockReset(); mockFetch.mockResolvedValueOnce(tokenResponse()).mockResolvedValueOnce(okJson({ balance: 1 })); await callToolHandler({ params: { name: "get_balance", arguments: {} } }); + // Both calls, token and endpoint, go to the production host. + const [tokenUrl] = mockFetch.mock.calls[0]; const url = lastCall()[0]; - expect(url).toContain("api-sec.celcoin.com.br"); - expect(url).not.toContain("sandbox"); + expect(tokenUrl).toBe("https://api.openfinance.celcoin.com.br/v5/token"); + expect(url.startsWith("https://api.openfinance.celcoin.com.br/")).toBe(true); + expect(url).not.toContain("api-sec.celcoin.com.br"); + }); + + it("CELCOIN_BASE_URL overrides the host in both modes", async () => { + process.env.CELCOIN_BASE_URL = "https://celcoin-proxy.internal.test"; + process.env.CELCOIN_SANDBOX = "true"; + try { + await loadServer(); + mockFetch.mockReset(); + mockFetch.mockResolvedValueOnce(tokenResponse()).mockResolvedValueOnce(okJson({ balance: 1 })); + + await callToolHandler({ params: { name: "get_balance", arguments: {} } }); + + expect(mockFetch.mock.calls[0][0]).toBe("https://celcoin-proxy.internal.test/v5/token"); + expect(lastCall()[0].startsWith("https://celcoin-proxy.internal.test/")).toBe(true); + } finally { + delete process.env.CELCOIN_BASE_URL; + } }); }); diff --git a/packages/payments/celcoin/src/index.ts b/packages/payments/celcoin/src/index.ts index 89486e2e..eb2df70c 100644 --- a/packages/payments/celcoin/src/index.ts +++ b/packages/payments/celcoin/src/index.ts @@ -27,6 +27,12 @@ * CELCOIN_CLIENT_ID — OAuth2 client ID * CELCOIN_CLIENT_SECRET — OAuth2 client secret * CELCOIN_SANDBOX — "true" to use sandbox (default: false) + * CELCOIN_BASE_URL — override the API host (default: production + * https://api.openfinance.celcoin.com.br, sandbox + * https://sandbox.openfinance.celcoin.dev). Celcoin only accepts + * production calls over mTLS from IPs registered with them in advance, + * and this server does not present a client certificate: in production, + * point CELCOIN_BASE_URL at a proxy that terminates the mTLS. */ import { Server } from "@modelcontextprotocol/sdk/server/index.js"; @@ -40,9 +46,9 @@ import { const CLIENT_ID = process.env.CELCOIN_CLIENT_ID || ""; const CLIENT_SECRET = process.env.CELCOIN_CLIENT_SECRET || ""; -const BASE_URL = process.env.CELCOIN_SANDBOX === "true" +const BASE_URL = process.env.CELCOIN_BASE_URL || (process.env.CELCOIN_SANDBOX === "true" ? "https://sandbox.openfinance.celcoin.dev" - : "https://api-sec.celcoin.com.br"; + : "https://api.openfinance.celcoin.com.br"); let accessToken = ""; let tokenExpiry = 0; diff --git a/packages/payments/chargebee/src/index.ts b/packages/payments/chargebee/src/index.ts index e260b9c8..a807767d 100644 --- a/packages/payments/chargebee/src/index.ts +++ b/packages/payments/chargebee/src/index.ts @@ -32,7 +32,7 @@ import { const SITE = process.env.CHARGEBEE_SITE || ""; const API_KEY = process.env.CHARGEBEE_API_KEY || ""; -const BASE_URL = `https://${SITE}.chargebee.com/api/v2`; +const BASE_URL = process.env.CHARGEBEE_BASE_URL || `https://${SITE}.chargebee.com/api/v2`; /** * Flatten a nested object into Chargebee's form-encoded convention. diff --git a/packages/payments/cielo/src/index.ts b/packages/payments/cielo/src/index.ts index c1e748e9..0a26f708 100644 --- a/packages/payments/cielo/src/index.ts +++ b/packages/payments/cielo/src/index.ts @@ -44,12 +44,12 @@ import { const MERCHANT_ID = process.env.CIELO_MERCHANT_ID || ""; const MERCHANT_KEY = process.env.CIELO_MERCHANT_KEY || ""; -const BASE_URL = process.env.CIELO_SANDBOX === "true" +const BASE_URL = process.env.CIELO_BASE_URL || (process.env.CIELO_SANDBOX === "true" ? "https://apisandbox.cieloecommerce.cielo.com.br/1" - : "https://api.cieloecommerce.cielo.com.br/1"; -const QUERY_URL = process.env.CIELO_SANDBOX === "true" + : "https://api.cieloecommerce.cielo.com.br/1"); +const QUERY_URL = process.env.CIELO_QUERY_URL || (process.env.CIELO_SANDBOX === "true" ? "https://apiquerysandbox.cieloecommerce.cielo.com.br/1" - : "https://apiquery.cieloecommerce.cielo.com.br/1"; + : "https://apiquery.cieloecommerce.cielo.com.br/1"); async function cieloRequest(method: string, path: string, body?: unknown, useQueryUrl = false): Promise { const baseUrl = useQueryUrl ? QUERY_URL : BASE_URL; diff --git a/packages/payments/culqi/src/index.ts b/packages/payments/culqi/src/index.ts index a4d99bed..976c1b46 100644 --- a/packages/payments/culqi/src/index.ts +++ b/packages/payments/culqi/src/index.ts @@ -51,7 +51,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const SECRET_KEY = process.env.CULQI_SECRET_KEY || ""; -const BASE_URL = "https://api.culqi.com/v2"; +const BASE_URL = process.env.CULQI_BASE_URL || "https://api.culqi.com/v2"; async function culqiRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/payments/ebanx/src/index.ts b/packages/payments/ebanx/src/index.ts index 7e5dc954..d263fcc9 100644 --- a/packages/payments/ebanx/src/index.ts +++ b/packages/payments/ebanx/src/index.ts @@ -28,9 +28,9 @@ import { import { createHmac, timingSafeEqual } from "node:crypto"; const INTEGRATION_KEY = process.env.EBANX_INTEGRATION_KEY || ""; -const BASE_URL = process.env.EBANX_SANDBOX === "true" +const BASE_URL = process.env.EBANX_BASE_URL || (process.env.EBANX_SANDBOX === "true" ? "https://sandbox.ebanx.com/ws" - : "https://api.ebanx.com/ws"; + : "https://api.ebanx.com/ws"); async function ebanxRequest(method: string, path: string, body?: unknown): Promise { const payload = method === "POST" diff --git a/packages/payments/efi/src/index.ts b/packages/payments/efi/src/index.ts index 66f3756e..01a74287 100644 --- a/packages/payments/efi/src/index.ts +++ b/packages/payments/efi/src/index.ts @@ -40,9 +40,9 @@ import { const CLIENT_ID = process.env.EFI_CLIENT_ID || ""; const CLIENT_SECRET = process.env.EFI_CLIENT_SECRET || ""; -const BASE_URL = process.env.EFI_SANDBOX === "true" +const BASE_URL = process.env.EFI_BASE_URL || (process.env.EFI_SANDBOX === "true" ? "https://pix-h.api.efipay.com.br" - : "https://pix.api.efipay.com.br"; + : "https://pix.api.efipay.com.br"); let accessToken = ""; let tokenExpiry = 0; diff --git a/packages/payments/flow-cl/src/index.ts b/packages/payments/flow-cl/src/index.ts index 4b815526..104d215f 100644 --- a/packages/payments/flow-cl/src/index.ts +++ b/packages/payments/flow-cl/src/index.ts @@ -50,9 +50,9 @@ const API_KEY = process.env.FLOW_API_KEY || ""; const SECRET_KEY = process.env.FLOW_SECRET_KEY || ""; const ENV = (process.env.FLOW_ENV || "sandbox").toLowerCase(); -const BASE_URL = ENV === "production" +const BASE_URL = process.env.FLOW_BASE_URL || (ENV === "production" ? "https://www.flow.cl/api" - : "https://sandbox.flow.cl/api"; + : "https://sandbox.flow.cl/api"); /** Flow signature: sort params alphabetically by name, concatenate as * name+value (no separators), HMAC-SHA256 hex with the secretKey. */ diff --git a/packages/payments/inter-bank/src/index.ts b/packages/payments/inter-bank/src/index.ts index e40c3fb9..094cfe3f 100644 --- a/packages/payments/inter-bank/src/index.ts +++ b/packages/payments/inter-bank/src/index.ts @@ -43,7 +43,7 @@ import { const CLIENT_ID = process.env.INTER_CLIENT_ID || ""; const CLIENT_SECRET = process.env.INTER_CLIENT_SECRET || ""; -const BASE_URL = "https://cdpj.partners.bancointer.com.br"; +const BASE_URL = process.env.INTER_BASE_URL || "https://cdpj.partners.bancointer.com.br"; const TOKEN_URL = `${BASE_URL}/oauth/v2/token`; let cachedToken: string | null = null; diff --git a/packages/payments/iugu/src/index.ts b/packages/payments/iugu/src/index.ts index 7e85be38..fa1427c2 100644 --- a/packages/payments/iugu/src/index.ts +++ b/packages/payments/iugu/src/index.ts @@ -44,7 +44,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const API_TOKEN = process.env.IUGU_API_TOKEN || ""; -const BASE_URL = "https://api.iugu.com/v1"; +const BASE_URL = process.env.IUGU_BASE_URL || "https://api.iugu.com/v1"; async function iuguRequest(method: string, path: string, body?: unknown): Promise { const credentials = btoa(`${API_TOKEN}:`); diff --git a/packages/payments/kushki/src/index.ts b/packages/payments/kushki/src/index.ts index 39b72bd8..61d1e321 100644 --- a/packages/payments/kushki/src/index.ts +++ b/packages/payments/kushki/src/index.ts @@ -47,9 +47,9 @@ const PUBLIC_MERCHANT_ID = process.env.KUSHKI_PUBLIC_MERCHANT_ID || ""; const PRIVATE_MERCHANT_ID = process.env.KUSHKI_PRIVATE_MERCHANT_ID || ""; const ENV = (process.env.KUSHKI_ENV || "sandbox").toLowerCase(); -const BASE_URL = ENV === "production" +const BASE_URL = process.env.KUSHKI_BASE_URL || (ENV === "production" ? "https://api.kushkipagos.com" - : "https://api-uat.kushkipagos.com"; + : "https://api-uat.kushkipagos.com"); async function kushkiRequest( method: string, diff --git a/packages/payments/malga/src/index.ts b/packages/payments/malga/src/index.ts index 4e830434..09a8843a 100644 --- a/packages/payments/malga/src/index.ts +++ b/packages/payments/malga/src/index.ts @@ -57,9 +57,9 @@ import { ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js"; -const BASE_URL = process.env.MALGA_SANDBOX === "false" +const BASE_URL = process.env.MALGA_BASE_URL || (process.env.MALGA_SANDBOX === "false" ? "https://api.malga.io" - : "https://sandbox-api.malga.io"; + : "https://sandbox-api.malga.io"); const CLIENT_ID = process.env.MALGA_CLIENT_ID ?? ""; const API_KEY = process.env.MALGA_API_KEY ?? ""; const USER_AGENT = "codespar-mcp-dev-latam/mcp-malga/0.1.0"; diff --git a/packages/payments/mercado-libre/src/index.ts b/packages/payments/mercado-libre/src/index.ts index 979b7198..332ed39c 100644 --- a/packages/payments/mercado-libre/src/index.ts +++ b/packages/payments/mercado-libre/src/index.ts @@ -49,7 +49,7 @@ import { const ACCESS_TOKEN = process.env.MELI_ACCESS_TOKEN || ""; const SITE_ID = process.env.MELI_SITE_ID || "MLB"; -const BASE_URL = "https://api.mercadolibre.com"; +const BASE_URL = process.env.MELI_BASE_URL || "https://api.mercadolibre.com"; async function meliRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { "Content-Type": "application/json" }; diff --git a/packages/payments/mercado-pago/src/index.ts b/packages/payments/mercado-pago/src/index.ts index 581b6f0c..62f22f16 100644 --- a/packages/payments/mercado-pago/src/index.ts +++ b/packages/payments/mercado-pago/src/index.ts @@ -41,7 +41,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const ACCESS_TOKEN = process.env.MERCADO_PAGO_ACCESS_TOKEN || ""; -const BASE_URL = "https://api.mercadopago.com"; +const BASE_URL = process.env.MERCADO_PAGO_BASE_URL || "https://api.mercadopago.com"; async function mpRequest(method: string, path: string, body?: unknown): Promise { const headers: Record = { "Content-Type": "application/json" }; diff --git a/packages/payments/niubiz/src/index.ts b/packages/payments/niubiz/src/index.ts index 648cd143..88a65b51 100644 --- a/packages/payments/niubiz/src/index.ts +++ b/packages/payments/niubiz/src/index.ts @@ -47,9 +47,9 @@ const PASSWORD = process.env.NIUBIZ_PASSWORD || ""; const MERCHANT_ID = process.env.NIUBIZ_MERCHANT_ID || ""; const ENV = (process.env.NIUBIZ_ENV || "sandbox").toLowerCase(); -const BASE_URL = ENV === "production" +const BASE_URL = process.env.NIUBIZ_BASE_URL || (ENV === "production" ? "https://apiprod.vnforapps.com" - : "https://apisandbox.vnforappstest.com"; + : "https://apisandbox.vnforappstest.com"); /** Security tokens are valid for a limited window; cache and reuse, * refetch when older than 20 minutes. */ diff --git a/packages/payments/nubank/README.md b/packages/payments/nubank/README.md index d02ceb0d..cdbef22c 100644 --- a/packages/payments/nubank/README.md +++ b/packages/payments/nubank/README.md @@ -1,5 +1,7 @@ # @codespar/mcp-nubank +> **Deprecated: no live endpoint.** Measured on 2026-09-27 against two public DNS resolvers (8.8.8.8 and 1.1.1.1): `api.nubank.com.br`, the host this server calls, does not resolve in DNS. Nubank's only public API we found is NuPay for Business (`api.spinpay.com.br`), which [`@codespar/mcp-nupay`](https://github.com/codespar/mcp-dev-latam/tree/main/packages/payments/nupay) already covers. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with `NUBANK_BASE_URL`. To bring the package back, open an issue in [mcp-dev-latam](https://github.com/codespar/mcp-dev-latam/issues) with the provider's documented base URL. + > MCP server for **Nubank**, Brazil's largest digital bank, using the Open Finance Brasil standard [![npm](https://img.shields.io/npm/v/@codespar/mcp-nubank)](https://www.npmjs.com/package/@codespar/mcp-nubank) diff --git a/packages/payments/nubank/package.json b/packages/payments/nubank/package.json index 897c8213..6c8c55d6 100644 --- a/packages/payments/nubank/package.json +++ b/packages/payments/nubank/package.json @@ -1,7 +1,7 @@ { "name": "@codespar/mcp-nubank", - "version": "0.2.0-alpha.3", - "description": "MCP server for Nubank — Brazilian neobank via Open Finance, accounts, PIX, transfers", + "version": "0.2.0-alpha.4", + "description": "DEPRECATED: no live endpoint (api.nubank.com.br does not resolve). MCP server for Nubank — Brazilian neobank via Open Finance, accounts, PIX, transfers", "type": "module", "main": "dist/index.js", "bin": { diff --git a/packages/payments/nubank/server.json b/packages/payments/nubank/server.json index 3f79e146..406b7186 100644 --- a/packages/payments/nubank/server.json +++ b/packages/payments/nubank/server.json @@ -1,18 +1,18 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.codespar/mcp-nubank", - "description": "Nubank — Brazilian neobank via Open Finance, accounts, PIX, transfers", + "description": "DEPRECATED: no live endpoint (api.nubank.com.br does not resolve)", "repository": { "url": "https://github.com/codespar/mcp-dev-latam", "source": "github", "subfolder": "packages/payments/nubank" }, - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-nubank", - "version": "0.2.0-alpha.3", + "version": "0.2.0-alpha.4", "transport": { "type": "stdio" }, diff --git a/packages/payments/nubank/src/index.ts b/packages/payments/nubank/src/index.ts index f339a217..92f617a6 100644 --- a/packages/payments/nubank/src/index.ts +++ b/packages/payments/nubank/src/index.ts @@ -1,6 +1,10 @@ #!/usr/bin/env node /** + * DEPRECATED (2026-09-27): no live endpoint. api.nubank.com.br does not resolve. + * No tool reaches a service. Override the host with + * NUBANK_BASE_URL if you have a working endpoint. + * * MCP Server for Nubank — via Open Finance Brasil standard. * * Tools: @@ -45,7 +49,7 @@ import { const CLIENT_ID = process.env.NUBANK_CLIENT_ID || ""; const CLIENT_SECRET = process.env.NUBANK_CLIENT_SECRET || ""; const CERT_PATH = process.env.NUBANK_CERT_PATH || ""; -const BASE_URL = "https://api.nubank.com.br"; +const BASE_URL = process.env.NUBANK_BASE_URL || "https://api.nubank.com.br"; let cachedToken: string | null = null; let tokenExpiry = 0; diff --git a/packages/payments/nupay/src/index.ts b/packages/payments/nupay/src/index.ts index aa33c0b5..24c023b2 100644 --- a/packages/payments/nupay/src/index.ts +++ b/packages/payments/nupay/src/index.ts @@ -75,13 +75,13 @@ const MERCHANT_KEY = process.env.NUPAY_MERCHANT_KEY || ""; const MERCHANT_TOKEN = process.env.NUPAY_MERCHANT_TOKEN || ""; const ENV = (process.env.NUPAY_ENV || "sandbox").toLowerCase(); -const API_BASE = ENV === "production" +const API_BASE = process.env.NUPAY_BASE_URL || (ENV === "production" ? "https://api.spinpay.com.br" - : "https://sandbox-api.spinpay.com.br"; + : "https://sandbox-api.spinpay.com.br"); -const AUTH_BASE = ENV === "production" +const AUTH_BASE = process.env.NUPAY_AUTH_URL || (ENV === "production" ? "https://authentication.spinpay.com.br/api" - : "https://sandbox-authentication.spinpay.com.br/api"; + : "https://sandbox-authentication.spinpay.com.br/api"); type Json = Record; diff --git a/packages/payments/openpay/src/index.ts b/packages/payments/openpay/src/index.ts index 00a9bc0d..a494ef5f 100644 --- a/packages/payments/openpay/src/index.ts +++ b/packages/payments/openpay/src/index.ts @@ -65,9 +65,10 @@ const PRIVATE_KEY = process.env.OPENPAY_PRIVATE_KEY || ""; const ENV = (process.env.OPENPAY_ENV || "sandbox").toLowerCase(); const HOST = - ENV === "production" + process.env.OPENPAY_BASE_URL || + (ENV === "production" ? "https://api.openpay.mx" - : "https://sandbox-api.openpay.mx"; + : "https://sandbox-api.openpay.mx"); const BASE_URL = `${HOST}/v1/${MERCHANT_ID}`; async function openpayRequest(method: string, path: string, body?: unknown): Promise { diff --git a/packages/payments/pagar-me/src/index.ts b/packages/payments/pagar-me/src/index.ts index da7925b2..880cf4a2 100644 --- a/packages/payments/pagar-me/src/index.ts +++ b/packages/payments/pagar-me/src/index.ts @@ -30,7 +30,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const API_KEY = process.env.PAGARME_API_KEY || ""; -const BASE_URL = "https://api.pagar.me/core/v5"; +const BASE_URL = process.env.PAGARME_BASE_URL || "https://api.pagar.me/core/v5"; async function pagarmeRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/payments/pagseguro/src/index.ts b/packages/payments/pagseguro/src/index.ts index ecba6647..f762dcba 100644 --- a/packages/payments/pagseguro/src/index.ts +++ b/packages/payments/pagseguro/src/index.ts @@ -44,9 +44,9 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const TOKEN = process.env.PAGSEGURO_TOKEN || ""; -const BASE_URL = process.env.PAGSEGURO_SANDBOX === "true" +const BASE_URL = process.env.PAGSEGURO_BASE_URL || (process.env.PAGSEGURO_SANDBOX === "true" ? "https://sandbox.api.pagseguro.com" - : "https://api.pagseguro.com"; + : "https://api.pagseguro.com"); async function pagseguroRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/payments/paypal/src/index.ts b/packages/payments/paypal/src/index.ts index c4997d2a..67e4996e 100644 --- a/packages/payments/paypal/src/index.ts +++ b/packages/payments/paypal/src/index.ts @@ -54,9 +54,10 @@ const CLIENT_ID = process.env.PAYPAL_CLIENT_ID || ""; const CLIENT_SECRET = process.env.PAYPAL_CLIENT_SECRET || ""; const ENV = (process.env.PAYPAL_ENV || "sandbox").toLowerCase(); const BASE_URL = - ENV === "live" + process.env.PAYPAL_BASE_URL || + (ENV === "live" ? "https://api-m.paypal.com" - : "https://api-m.sandbox.paypal.com"; + : "https://api-m.sandbox.paypal.com"); let cachedToken: { value: string; expiresAt: number } | null = null; diff --git a/packages/payments/rapyd/src/index.ts b/packages/payments/rapyd/src/index.ts index 36e07be3..ef0803f6 100644 --- a/packages/payments/rapyd/src/index.ts +++ b/packages/payments/rapyd/src/index.ts @@ -73,9 +73,9 @@ import { const ACCESS_KEY = process.env.RAPYD_ACCESS_KEY || ""; const SECRET_KEY = process.env.RAPYD_SECRET_KEY || ""; const RAPYD_ENV = (process.env.RAPYD_ENV || "sandbox").toLowerCase(); -const BASE_URL = RAPYD_ENV === "production" +const BASE_URL = process.env.RAPYD_BASE_URL || (RAPYD_ENV === "production" ? "https://api.rapyd.net" - : "https://sandboxapi.rapyd.net"; + : "https://sandboxapi.rapyd.net"); async function rapydRequest(method: string, path: string, body?: unknown): Promise { const httpMethod = method.toLowerCase(); diff --git a/packages/payments/rede/src/index.ts b/packages/payments/rede/src/index.ts index 0f5231f0..d433b037 100644 --- a/packages/payments/rede/src/index.ts +++ b/packages/payments/rede/src/index.ts @@ -56,9 +56,9 @@ import { const PV = process.env.REDE_PV || ""; const TOKEN = process.env.REDE_TOKEN || ""; const ENV = (process.env.REDE_ENV || "sandbox").toLowerCase(); -const BASE_URL = ENV === "production" +const BASE_URL = process.env.REDE_BASE_URL || (ENV === "production" ? "https://api.userede.com.br/erede/v1" - : "https://sandbox-erede.useredecloud.com.br/v1"; + : "https://sandbox-erede.useredecloud.com.br/v1"); async function redeRequest(method: string, path: string, body?: unknown): Promise { const basic = Buffer.from(`${PV}:${TOKEN}`).toString("base64"); diff --git a/packages/payments/rinne/src/index.ts b/packages/payments/rinne/src/index.ts index 302fe1d0..981f57ed 100644 --- a/packages/payments/rinne/src/index.ts +++ b/packages/payments/rinne/src/index.ts @@ -66,9 +66,9 @@ import { ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js"; -const BASE_URL = process.env.RINNE_SANDBOX === "false" +const BASE_URL = process.env.RINNE_BASE_URL || (process.env.RINNE_SANDBOX === "false" ? "https://api.rinne.com.br/core" - : "https://api-sandbox.rinne.com.br/core"; + : "https://api-sandbox.rinne.com.br/core"); const API_KEY = process.env.RINNE_API_KEY ?? ""; const AUTH_EMAIL = process.env.RINNE_EMAIL; const AUTH_PASSWORD = process.env.RINNE_PASSWORD; diff --git a/packages/payments/safrapay/src/index.ts b/packages/payments/safrapay/src/index.ts index d0abe0af..d9626b37 100644 --- a/packages/payments/safrapay/src/index.ts +++ b/packages/payments/safrapay/src/index.ts @@ -73,7 +73,7 @@ const CLIENT_SECRET = process.env.SAFRAPAY_CLIENT_SECRET || ""; // MerchantToken const MERCHANT_ID = process.env.SAFRAPAY_MERCHANT_ID || ""; const ENV = (process.env.SAFRAPAY_ENV || "sandbox").toLowerCase(); -const HOSTS = ENV === "production" +const DEFAULT_HOSTS = ENV === "production" ? { gateway: "https://payment.aditum.com.br", portal: "https://portal-api.aditum.com.br", @@ -87,6 +87,14 @@ const HOSTS = ENV === "production" webhook: "https://webhook-dev.aditum.com.br", }; +// Each host can be overridden on its own (proxy, mock, a moved endpoint). +const HOSTS = { + gateway: process.env.SAFRAPAY_BASE_URL || DEFAULT_HOSTS.gateway, + portal: process.env.SAFRAPAY_PORTAL_URL || DEFAULT_HOSTS.portal, + reconciliation: process.env.SAFRAPAY_RECONCILIATION_URL || DEFAULT_HOSTS.reconciliation, + webhook: process.env.SAFRAPAY_WEBHOOK_URL || DEFAULT_HOSTS.webhook, +}; + type HostKey = keyof typeof HOSTS; interface TokenCache { diff --git a/packages/payments/stone/README.md b/packages/payments/stone/README.md index a64f4366..6eb8cc58 100644 --- a/packages/payments/stone/README.md +++ b/packages/payments/stone/README.md @@ -98,7 +98,8 @@ Stone provides a sandbox via the developer portal. |----------|----------|-------------| | `STONE_CLIENT_ID` | Yes | OAuth2 client ID | | `STONE_CLIENT_SECRET` | Yes | OAuth2 client secret | -| `STONE_BASE_URL` | No | Override base URL (default `https://api.openbank.stone.com.br/api/v1`) | +| `STONE_BASE_URL` | No | Override base URL (default `https://api.openbank.stone.com.br/api/v1`; sandbox `https://sandbox-api.openbank.stone.com.br/api/v1`) | +| `STONE_AUTH_URL` | No | Override the OAuth2 token URL (default `https://accounts.openbank.stone.com.br/auth/realms/stone_bank/protocol/openid-connect/token`; sandbox `https://sandbox-accounts.openbank.stone.com.br/auth/realms/stone_bank/protocol/openid-connect/token`). Up to 0.2.2 the token call went to `login.openbank.stone.com.br`, which does not exist, so every tool failed at authentication. | ## Roadmap diff --git a/packages/payments/stone/package.json b/packages/payments/stone/package.json index 33fefdb3..e167c814 100644 --- a/packages/payments/stone/package.json +++ b/packages/payments/stone/package.json @@ -1,6 +1,6 @@ { "name": "@codespar/mcp-stone", - "version": "0.2.2", + "version": "0.2.3", "description": "MCP server for Stone — acquiring (charges, card, Pix, boleto), anticipations, receivables, terminals, open banking", "type": "module", "main": "./dist/index.js", diff --git a/packages/payments/stone/server.json b/packages/payments/stone/server.json index b211e140..5bcca18e 100644 --- a/packages/payments/stone/server.json +++ b/packages/payments/stone/server.json @@ -7,12 +7,12 @@ "source": "github", "subfolder": "packages/payments/stone" }, - "version": "0.2.2", + "version": "0.2.3", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-stone", - "version": "0.2.2", + "version": "0.2.3", "transport": { "type": "stdio" }, diff --git a/packages/payments/stone/src/__tests__/index.test.ts b/packages/payments/stone/src/__tests__/index.test.ts index ff2aa2a9..b60feef9 100644 --- a/packages/payments/stone/src/__tests__/index.test.ts +++ b/packages/payments/stone/src/__tests__/index.test.ts @@ -49,4 +49,35 @@ describe("mcp-stone", () => { const lastCall = mockFetch.mock.calls[mockFetch.mock.calls.length - 1]; expect(lastCall[0]).toContain("/accounts/acc_123/balance"); }); + + it("gets the token from accounts.openbank.stone.com.br (not the dead login host)", async () => { + mockFetch + .mockResolvedValueOnce({ ok: true, json: () => Promise.resolve({ access_token: "tok", expires_in: 3600 }) }) + .mockResolvedValueOnce({ ok: true, json: () => Promise.resolve({ balance: 5000 }) }); + + await callToolHandler({ params: { name: "get_balance", arguments: { account_id: "acc_123" } } }); + + const [tokenUrl, tokenOpts] = mockFetch.mock.calls[0]; + expect(tokenOpts.method).toBe("POST"); + expect(tokenUrl).toBe("https://accounts.openbank.stone.com.br/auth/realms/stone_bank/protocol/openid-connect/token"); + expect(mockFetch.mock.calls[1][0]).toBe("https://api.openbank.stone.com.br/api/v1/accounts/acc_123/balance"); + }); + + it("STONE_AUTH_URL overrides the token URL", async () => { + process.env.STONE_AUTH_URL = "https://sandbox-accounts.openbank.stone.com.br/auth/realms/stone_bank/protocol/openid-connect/token"; + try { + vi.resetModules(); + await import("../index.js"); + mockFetch.mockReset(); + mockFetch + .mockResolvedValueOnce({ ok: true, json: () => Promise.resolve({ access_token: "tok", expires_in: 3600 }) }) + .mockResolvedValueOnce({ ok: true, json: () => Promise.resolve({ balance: 5000 }) }); + + await callToolHandler({ params: { name: "get_balance", arguments: { account_id: "acc_123" } } }); + + expect(mockFetch.mock.calls[0][0]).toBe(process.env.STONE_AUTH_URL); + } finally { + delete process.env.STONE_AUTH_URL; + } + }); }); diff --git a/packages/payments/stone/src/index.ts b/packages/payments/stone/src/index.ts index 6a02453a..0cdbc93c 100644 --- a/packages/payments/stone/src/index.ts +++ b/packages/payments/stone/src/index.ts @@ -40,6 +40,10 @@ * STONE_CLIENT_ID — OAuth2 client ID * STONE_CLIENT_SECRET — OAuth2 client secret * STONE_BASE_URL — override base URL (default https://api.openbank.stone.com.br/api/v1) + * STONE_AUTH_URL — override the OAuth2 token URL (default + * https://accounts.openbank.stone.com.br/auth/realms/stone_bank/protocol/openid-connect/token; + * sandbox: https://sandbox-accounts.openbank.stone.com.br/..., with + * STONE_BASE_URL=https://sandbox-api.openbank.stone.com.br/api/v1) */ import { Server } from "@modelcontextprotocol/sdk/server/index.js"; @@ -54,6 +58,12 @@ import { const CLIENT_ID = process.env.STONE_CLIENT_ID || ""; const CLIENT_SECRET = process.env.STONE_CLIENT_SECRET || ""; const BASE_URL = process.env.STONE_BASE_URL || "https://api.openbank.stone.com.br/api/v1"; +// Token endpoint per Stone's docs and the realm's OIDC discovery document +// (accounts.openbank.stone.com.br/auth/realms/stone_bank/.well-known/openid-configuration). +// Up to 0.2.2 this was login.openbank.stone.com.br, which does not resolve. +const AUTH_URL = + process.env.STONE_AUTH_URL || + "https://accounts.openbank.stone.com.br/auth/realms/stone_bank/protocol/openid-connect/token"; let accessToken = ""; let tokenExpiry = 0; @@ -61,7 +71,7 @@ let tokenExpiry = 0; async function getAccessToken(): Promise { if (accessToken && Date.now() < tokenExpiry) return accessToken; - const res = await fetch("https://login.openbank.stone.com.br/auth/realms/stone_bank/protocol/openid-connect/token", { + const res = await fetch(AUTH_URL, { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ diff --git a/packages/payments/stripe-acp/src/index.ts b/packages/payments/stripe-acp/src/index.ts index 88feea8a..81de443d 100644 --- a/packages/payments/stripe-acp/src/index.ts +++ b/packages/payments/stripe-acp/src/index.ts @@ -54,7 +54,7 @@ import { const API_KEY = process.env.STRIPE_API_KEY || ""; const ACP_BASE = process.env.STRIPE_ACP_BASE || ""; -const STRIPE_BASE = "https://api.stripe.com/v1"; +const STRIPE_BASE = process.env.STRIPE_BASE_URL || "https://api.stripe.com/v1"; async function stripeRequest(method: string, path: string, body?: Record): Promise { const res = await fetch(`${STRIPE_BASE}${path}`, { diff --git a/packages/payments/stripe/src/index.ts b/packages/payments/stripe/src/index.ts index 488fe006..29f3c120 100644 --- a/packages/payments/stripe/src/index.ts +++ b/packages/payments/stripe/src/index.ts @@ -80,7 +80,7 @@ import { const SECRET_KEY = process.env.STRIPE_SECRET_KEY || ""; const API_VERSION = process.env.STRIPE_API_VERSION || ""; -const BASE_URL = "https://api.stripe.com/v1"; +const BASE_URL = process.env.STRIPE_BASE_URL || "https://api.stripe.com/v1"; /** * Flatten a nested object into Stripe's form-encoded convention. diff --git a/packages/payments/transbank/src/index.ts b/packages/payments/transbank/src/index.ts index 5e7f4e84..1c6bc862 100644 --- a/packages/payments/transbank/src/index.ts +++ b/packages/payments/transbank/src/index.ts @@ -69,9 +69,9 @@ import { const COMMERCE_CODE = process.env.TRANSBANK_COMMERCE_CODE || ""; const API_KEY_SECRET = process.env.TRANSBANK_API_KEY_SECRET || ""; const ENV = (process.env.TRANSBANK_ENV || "integration").toLowerCase(); -const BASE_URL = ENV === "production" +const BASE_URL = process.env.TRANSBANK_BASE_URL || (ENV === "production" ? "https://webpay3g.transbank.cl" - : "https://webpay3gint.transbank.cl"; + : "https://webpay3gint.transbank.cl"); async function transbankRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/payments/ucp/README.md b/packages/payments/ucp/README.md index f17f988a..234c3466 100644 --- a/packages/payments/ucp/README.md +++ b/packages/payments/ucp/README.md @@ -1,12 +1,12 @@ # @codespar/mcp-ucp +> **Deprecated: no live endpoint.** Measured on 2026-09-27: `commerce.googleapis.com` answers every path with Google's generic `Error 404 (Not Found)` page, and `sandbox.commerce.googleapis.com` (used with `UCP_SANDBOX=true`) fails the TLS handshake, because the certificate served there covers `*.googleapis.com` and not the extra label. UCP is an open specification, not an API Google hosts. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with `UCP_BASE_URL`. To bring the package back, open an issue in [mcp-dev-latam](https://github.com/codespar/mcp-dev-latam/issues) with the provider's documented base URL. + > MCP server for **Google UCP** — Universal Commerce Protocol for agentic shopping, cart, checkout, orders, and delivery [![npm](https://img.shields.io/npm/v/@codespar/mcp-ucp)](https://www.npmjs.com/package/@codespar/mcp-ucp) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) -> **No live endpoint.** Checked on 2026-08-27. This server's `BASE_URL` (`src/index.ts:71-73`) is `https://commerce.googleapis.com/ucp/v1`, which answers HTTP 404 with Google's generic `Error 404 (Not Found)` HTML page instead of an API response. With `UCP_SANDBOX=true` the address becomes `https://sandbox.commerce.googleapis.com/ucp/v1`, which fails the TLS handshake, because the certificate served there covers `*.googleapis.com` and not the extra label. UCP is a published specification and this package ships tool definitions written for it; we have not checked them against a conforming implementation, and no call made through this server currently reaches a service. - ## What is UCP? **Universal Commerce Protocol (UCP)** is Google's open standard for agentic commerce. It enables AI agents to autonomously discover products, build carts, checkout, manage orders, and track deliveries — without screen-scraping or bespoke merchant integrations. diff --git a/packages/payments/ucp/package.json b/packages/payments/ucp/package.json index bfadc6c0..0ce4df4a 100644 --- a/packages/payments/ucp/package.json +++ b/packages/payments/ucp/package.json @@ -1,7 +1,7 @@ { "name": "@codespar/mcp-ucp", - "version": "0.1.4", - "description": "MCP server for Google UCP — Universal Commerce Protocol for agentic shopping, cart, checkout, orders, and delivery", + "version": "0.1.5", + "description": "DEPRECATED: no live endpoint (UCP is a spec; commerce.googleapis.com serves no API). MCP server for Google UCP — Universal Commerce Protocol for agentic shopping, cart, checkout, orders, and delivery", "type": "module", "main": "dist/index.js", "bin": { diff --git a/packages/payments/ucp/server.json b/packages/payments/ucp/server.json index 46632a74..ab851234 100644 --- a/packages/payments/ucp/server.json +++ b/packages/payments/ucp/server.json @@ -1,18 +1,18 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.codespar/mcp-ucp", - "description": "Google UCP — agentic shopping, cart, checkout, orders, delivery", + "description": "DEPRECATED: no live endpoint (UCP is a spec; commerce.googleapis.com serves no API)", "repository": { "url": "https://github.com/codespar/mcp-dev-latam", "source": "github", "subfolder": "packages/payments/ucp" }, - "version": "0.1.4", + "version": "0.1.5", "packages": [ { "registryType": "npm", "identifier": "@codespar/mcp-ucp", - "version": "0.1.4", + "version": "0.1.5", "transport": { "type": "stdio" }, diff --git a/packages/payments/ucp/src/index.ts b/packages/payments/ucp/src/index.ts index 086900e0..8829d2a5 100644 --- a/packages/payments/ucp/src/index.ts +++ b/packages/payments/ucp/src/index.ts @@ -1,6 +1,10 @@ #!/usr/bin/env node /** + * DEPRECATED (2026-09-27): no live endpoint. UCP is a spec; commerce.googleapis.com serves no API. + * No tool reaches a service. Override the host with + * UCP_BASE_URL if you have a working endpoint. + * * MCP Server for Google UCP — Universal Commerce Protocol. * * UCP is Google's open standard for agentic commerce. It enables @@ -67,9 +71,9 @@ import { const API_KEY = process.env.UCP_API_KEY || ""; const MERCHANT_ID = process.env.UCP_MERCHANT_ID || ""; const SANDBOX = process.env.UCP_SANDBOX === "true"; -const BASE_URL = SANDBOX +const BASE_URL = process.env.UCP_BASE_URL || (SANDBOX ? "https://sandbox.commerce.googleapis.com/ucp/v1" - : "https://commerce.googleapis.com/ucp/v1"; + : "https://commerce.googleapis.com/ucp/v1"); async function ucpRequest(method: string, path: string, body?: unknown): Promise { const res = await fetch(`${BASE_URL}${path}`, { diff --git a/packages/payments/vindi/src/index.ts b/packages/payments/vindi/src/index.ts index 243b9c4a..18f55784 100644 --- a/packages/payments/vindi/src/index.ts +++ b/packages/payments/vindi/src/index.ts @@ -27,7 +27,7 @@ import { } from "@modelcontextprotocol/sdk/types.js"; const API_KEY = process.env.VINDI_API_KEY || ""; -const BASE_URL = "https://app.vindi.com.br/api/v1"; +const BASE_URL = process.env.VINDI_BASE_URL || "https://app.vindi.com.br/api/v1"; async function vindiRequest(method: string, path: string, body?: unknown): Promise { const credentials = btoa(`${API_KEY}:`); diff --git a/packages/payments/wise/src/index.ts b/packages/payments/wise/src/index.ts index f947f35c..d8a9c18c 100644 --- a/packages/payments/wise/src/index.ts +++ b/packages/payments/wise/src/index.ts @@ -49,9 +49,10 @@ import { randomUUID } from "node:crypto"; const API_TOKEN = process.env.WISE_API_TOKEN || ""; const ENV = (process.env.WISE_ENV || "sandbox").toLowerCase(); const BASE_URL = - ENV === "live" + process.env.WISE_BASE_URL || + (ENV === "live" ? "https://api.transferwise.com" - : "https://api.sandbox.transferwise.tech"; + : "https://api.sandbox.transferwise.tech"); function buildQuery(params?: Record): string { if (!params) return ""; diff --git a/packages/payments/worldpay/src/index.ts b/packages/payments/worldpay/src/index.ts index dd95999d..23888ac1 100644 --- a/packages/payments/worldpay/src/index.ts +++ b/packages/payments/worldpay/src/index.ts @@ -92,6 +92,7 @@ const ENV = (process.env.WORLDPAY_ENV || "sandbox").toLowerCase(); const API_VERSION = process.env.WORLDPAY_API_VERSION || "v7"; function baseUrl(): string { + if (process.env.WORLDPAY_BASE_URL) return process.env.WORLDPAY_BASE_URL; return ENV === "production" ? "https://access.worldpay.com" : "https://try.access.worldpay.com"; diff --git a/packages/payments/zoop/src/index.ts b/packages/payments/zoop/src/index.ts index 3cd075bf..22f77a24 100644 --- a/packages/payments/zoop/src/index.ts +++ b/packages/payments/zoop/src/index.ts @@ -63,7 +63,7 @@ function validationError(msg: string) { const API_KEY = process.env.ZOOP_API_KEY || ""; const MARKETPLACE_ID = process.env.ZOOP_MARKETPLACE_ID || ""; -const BASE_URL = `https://api.zoop.ws/v1/marketplaces/${MARKETPLACE_ID}`; +const BASE_URL = `${process.env.ZOOP_BASE_URL || "https://api.zoop.ws/v1"}/marketplaces/${MARKETPLACE_ID}`; async function zoopRequest(method: string, path: string, body?: unknown): Promise { const credentials = btoa(`${API_KEY}:`); diff --git a/scripts/catalog-hosts-known-dead.json b/scripts/catalog-hosts-known-dead.json new file mode 100644 index 00000000..db0500c5 --- /dev/null +++ b/scripts/catalog-hosts-known-dead.json @@ -0,0 +1,30 @@ +{ + "why": "Default hosts that do not resolve today, in servers that are NOT deprecated because their other host (production) exists. Each is waiting on a decision: fixing the host alone would not make the server work, because the provider's documented API also differs in auth or paths. check-catalog-hosts.py fails if an entry's host comes back to life or leaves the source, so this list cannot go stale silently. Measured 2026-09-27.", + "hosts": [ + { + "server": "banking/btg", + "host": "sandbox.api.btgpactual.com", + "why": "BTG documents api.sandbox.empresas.btgpactual.com, with tokens from id.sandbox.btgpactual.com/oauth2/token, not /auth/oauth/v2/token on the API host" + }, + { + "server": "banking/caixa", + "host": "apihom.caixa.gov.br", + "why": "Caixa's sandbox is a path on the production host (api.caixa.gov.br:8443/sandbox/...) with login on logindes.caixa.gov.br" + }, + { + "server": "banking/itau", + "host": "sandbox.api.itau.com.br", + "why": "no Itau-hosted doc names a sandbox API host; production tokens come from sts.itau.com.br" + }, + { + "server": "banking/bradesco", + "host": "apihom-bradescorip.bradesco.com.br", + "why": "Bradesco's API docs are behind a login; no public source names the homologation host" + }, + { + "server": "payments/izipay", + "host": "sandbox-api.izipay.pe", + "why": "Izipay documents sandbox-api-pw.izipay.pe with tokens at /security/v1/Token/Generate, not /auth/login" + } + ] +} diff --git a/scripts/check-catalog-hosts.py b/scripts/check-catalog-hosts.py new file mode 100644 index 00000000..ca24dd9a --- /dev/null +++ b/scripts/check-catalog-hosts.py @@ -0,0 +1,595 @@ +#!/usr/bin/env python3 +""" +Catalog host check: every default URL a server calls must exist. + +Walks every packages///src/index.ts, pulls out each string +literal that IS a URL (the literal starts with https://), and for every host: + + 1. resolves it in DNS (getaddrinfo), and + 2. opens TCP 443 and completes a TLS handshake that verifies the + certificate against that host name. + +Verdicts per host: + + ok resolved and the handshake verified + DEAD NXDOMAIN / no address, or the certificate does not verify for + this name (wrong name, expired, self-signed). These are + properties of the host, not of the network path, so they fail + the run. + UNREACHABLE resolved, but the connection or handshake timed out or was + reset. This depends on where the check runs from (geo-fenced + government hosts, mTLS-only bank gateways), so it is reported + as a warning and does not fail the run. + +Two carve-outs, both policed: + + - Deprecated packages (package.json `description` starting with + "DEPRECATED"): their dead hosts are expected. A deprecated package with NO + dead host fails, because the mark is then stale. + - scripts/catalog-hosts-known-dead.json: (server, host, why) for a dead host + in a package that is not deprecated. An entry whose host is alive again, + or that the source no longer calls, fails. + +Every server must also let an env var named *_URL choose its host +(NO-OVERRIDE otherwise). A literal that is an identifier rather than a host +(an OAuth audience) is skipped when its line carries the comment +`catalog-hosts: not-a-host`; those are counted and listed in the report. + +The URL set is computed from the source on every run, never listed by hand. +The extractor skips comments, prose that merely mentions a URL (the literal +must start with https://), hosts built from a template expression (reported +as "templated"), and the RFC 2606 example domains. + +Usage: + python3 scripts/check-catalog-hosts.py # check the catalog + python3 scripts/check-catalog-hosts.py --list # print the URL set, no network + python3 scripts/check-catalog-hosts.py --self-test # plant dead/live hosts in a + # temp tree and assert verdicts + python3 scripts/check-catalog-hosts.py --root DIR # check another packages/ tree + +Exit code: 0 when there is no unexpected DEAD host, no stale carve-out and +no server without an env override; 1 otherwise. +""" +from __future__ import annotations + +import argparse +import concurrent.futures as cf +import json +import re +import shutil +import socket +import ssl +import subprocess +import sys +import tempfile +import time +from dataclasses import dataclass, field +from pathlib import Path + +ROOT = Path(__file__).resolve().parent.parent +TIMEOUT_S = 10.0 +RETRIES = 3 +RETRY_SLEEP_S = 2.0 +EXAMPLE_HOST_RE = re.compile(r"(^|\.)example\.(com|net|org)$") +# A URL literal that is an identifier, not a host the server connects to +# (an OAuth `audience`, a JSON-schema id). Put this comment on the literal's line. +NOT_A_HOST_MARK = "catalog-hosts: not-a-host" +KNOWN_DEAD_FILE = "catalog-hosts-known-dead.json" +DEPRECATED_PREFIX = "DEPRECATED" + + +# -------------------------------------------------------------------------- +# Extraction +# -------------------------------------------------------------------------- + +@dataclass +class UrlRef: + server: str # e.g. payments/celcoin + line: int + url: str + host: str # "" when templated + + +def _lex_strings(src: str) -> list[tuple[int, str]]: + """Return (offset, content) for every string literal in a TS source, + skipping comments. Template literals are returned with their static text + and `${...}` kept verbatim; string literals nested inside a `${...}` + expression are returned too (that is where an env override's default + lives: `${process.env.X_BASE_URL || "https://..."}`).""" + out: list[tuple[int, str]] = [] + i, n = 0, len(src) + + def lex_expr(i: int, stop_at_brace: bool) -> int: + depth = 0 + while i < n: + c = src[i] + nxt = src[i + 1] if i + 1 < n else "" + if c == "/" and nxt == "/": + j = src.find("\n", i) + i = n if j < 0 else j + continue + if c == "/" and nxt == "*": + j = src.find("*/", i + 2) + i = n if j < 0 else j + 2 + continue + if c in ("'", '"'): + start = i + i += 1 + buf = [] + while i < n and src[i] != c: + if src[i] == "\\": + buf.append(src[i:i + 2]) + i += 2 + continue + if src[i] == "\n": + break + buf.append(src[i]) + i += 1 + out.append((start, "".join(buf))) + i += 1 + continue + if c == "`": + i = lex_template(i) + continue + if stop_at_brace: + if c == "{": + depth += 1 + elif c == "}": + if depth == 0: + return i + 1 + depth -= 1 + i += 1 + return i + + def lex_template(i: int) -> int: + start = i + i += 1 + buf = [] + while i < n and src[i] != "`": + if src[i] == "\\": + buf.append(src[i:i + 2]) + i += 2 + continue + if src[i] == "$" and i + 1 < n and src[i + 1] == "{": + j = lex_expr(i + 2, stop_at_brace=True) + buf.append(src[i:j]) + i = j + continue + buf.append(src[i]) + i += 1 + out.append((start, "".join(buf))) + return i + 1 + + lex_expr(0, stop_at_brace=False) + return out + + +def _host_of(url: str) -> str | None: + """Host of a URL literal; "" when the host is built from a template + expression; None when there is no host at all (e.g. a bare "https://" + prefix used in a startsWith check).""" + rest = url[len("https://"):] + m = re.match(r"[^/?#]*", rest) + host = m.group(0) if m else "" + if "${" in host: + return "" + host = host.split("@")[-1].lower() + if host.endswith(":443"): + host = host[:-4] + return host or None + + +def discover(packages_dir: Path) -> list[Path]: + return sorted( + d for d in packages_dir.glob("*/*") + if (d / "src" / "index.ts").exists() and "node_modules" not in d.parts + ) + + +def extract(pkg_dir: Path) -> list[UrlRef]: + server = f"{pkg_dir.parent.name}/{pkg_dir.name}" + src = (pkg_dir / "src" / "index.ts").read_text(encoding="utf-8") + lines = src.split("\n") + refs: list[UrlRef] = [] + for off, content in _lex_strings(src): + if not content.startswith("https://"): + continue + host = _host_of(content) + if host is None: + continue + if host and EXAMPLE_HOST_RE.search(host): + continue + line = src.count("\n", 0, off) + 1 + ref = UrlRef(server, line, content, host) + if NOT_A_HOST_MARK in lines[line - 1]: + _NOT_A_HOST.append(ref) + continue + refs.append(ref) + return refs + + +_NOT_A_HOST: list[UrlRef] = [] + + +ENV_URL_RE = re.compile(r"process\.env\.[A-Z0-9_]+_URL\b") + + +def reads_env_url(pkg_dir: Path) -> bool: + """True when the server lets an env var named *_URL pick the host (the + catalog convention is _BASE_URL, plus __URL for a + second host such as the token endpoint).""" + src = (pkg_dir / "src" / "index.ts").read_text(encoding="utf-8") + return bool(ENV_URL_RE.search(src)) + + +def is_deprecated(pkg_dir: Path) -> bool: + try: + pkg = json.loads((pkg_dir / "package.json").read_text(encoding="utf-8")) + except Exception: + return False + return str(pkg.get("description", "")).startswith(DEPRECATED_PREFIX) + + +# -------------------------------------------------------------------------- +# Probing +# -------------------------------------------------------------------------- + +@dataclass +class Probe: + host: str + verdict: str # ok | DEAD | UNREACHABLE + detail: str + + +def probe(host: str) -> Probe: + """`host` may carry a port (demo.stpmex.com:7024); 443 otherwise.""" + name, _, port_s = host.partition(":") + port = int(port_s) if port_s else 443 + infos = None + for attempt in range(RETRIES): + try: + infos = socket.getaddrinfo(name, port, type=socket.SOCK_STREAM) + break + except socket.gaierror as e: + # EAI_AGAIN is the resolver failing, not the name: retry, and if + # it persists call it UNREACHABLE rather than DEAD. + if e.errno == socket.EAI_AGAIN: + if attempt + 1 < RETRIES: + time.sleep(RETRY_SLEEP_S) + continue + return Probe(host, "UNREACHABLE", f"dns: temporary failure: {e.strerror or e}") + return Probe(host, "DEAD", f"dns: {e.strerror or e}") + if not infos: + return Probe(host, "DEAD", "dns: no address") + + ctx = ssl.create_default_context() + last = "" + for _ in range(RETRIES): + try: + with socket.create_connection((name, port), timeout=TIMEOUT_S) as sock: + with ctx.wrap_socket(sock, server_hostname=name) as tls: + return Probe(host, "ok", f"{tls.version()}") + except ssl.SSLCertVerificationError as e: + return Probe(host, "DEAD", f"tls: {e.verify_message or e.reason}") + except (ssl.SSLError, OSError) as e: + last = f"{type(e).__name__}: {e}" + time.sleep(RETRY_SLEEP_S) + return Probe(host, "UNREACHABLE", last) + + +# -------------------------------------------------------------------------- +# Run +# -------------------------------------------------------------------------- + +@dataclass +class Report: + servers: int = 0 + refs: list[UrlRef] = field(default_factory=list) + templated: list[UrlRef] = field(default_factory=list) + probes: dict[str, Probe] = field(default_factory=dict) + deprecated: set[str] = field(default_factory=set) + no_override: list[str] = field(default_factory=list) + failures: list[str] = field(default_factory=list) + warnings: list[str] = field(default_factory=list) + expected_dead: list[str] = field(default_factory=list) + not_a_host: list[UrlRef] = field(default_factory=list) + known_dead: dict[tuple[str, str], str] = field(default_factory=dict) + + +def load_known_dead(path: Path) -> dict[tuple[str, str], str]: + """(server, host) -> reason. Hosts that are dead today in a package that is + NOT deprecated, each waiting on a decision (see the file's `why`).""" + if not path.exists(): + return {} + data = json.loads(path.read_text(encoding="utf-8")) + return {(e["server"], e["host"]): e["why"] for e in data["hosts"]} + + +def collect(packages_dir: Path, known_dead_path: Path | None = None) -> Report: + rep = Report() + if known_dead_path is None: + known_dead_path = packages_dir.parent / "scripts" / KNOWN_DEAD_FILE + rep.known_dead = load_known_dead(known_dead_path) + _NOT_A_HOST.clear() + for d in discover(packages_dir): + rep.servers += 1 + if is_deprecated(d): + rep.deprecated.add(f"{d.parent.name}/{d.name}") + refs = extract(d) + for r in refs: + (rep.refs if r.host else rep.templated).append(r) + if refs and not reads_env_url(d): + rep.no_override.append(f"{d.parent.name}/{d.name}") + rep.not_a_host = list(_NOT_A_HOST) + return rep + + +def override_failures(rep: Report) -> list[str]: + return [ + f"NO-OVERRIDE {s}: calls a default URL but reads no process.env.*_URL, " + f"so a user cannot point it at another host (convention: _BASE_URL)" + for s in rep.no_override + ] + + +def run(packages_dir: Path, workers: int = 24, quiet: bool = False, + known_dead_path: Path | None = None) -> Report: + rep = collect(packages_dir, known_dead_path) + hosts = sorted({r.host for r in rep.refs}) + with cf.ThreadPoolExecutor(max_workers=workers) as ex: + for p in ex.map(probe, hosts): + rep.probes[p.host] = p + + by_server: dict[str, list[UrlRef]] = {} + for r in rep.refs: + by_server.setdefault(r.server, []).append(r) + + for server in sorted(by_server): + seen: set[str] = set() + dead_here = 0 + for r in by_server[server]: + if r.host in seen: + continue + seen.add(r.host) + p = rep.probes[r.host] + where = f"{server} (src/index.ts:{r.line}) {r.host}" + listed = (server, r.host) in rep.known_dead + if p.verdict == "DEAD": + dead_here += 1 + if server in rep.deprecated: + rep.expected_dead.append(f"{where}: {p.detail}") + elif listed: + rep.expected_dead.append(f"{where}: {p.detail} [known-dead: {rep.known_dead[(server, r.host)]}]") + else: + rep.failures.append(f"DEAD {where}: {p.detail}") + else: + if listed: + rep.failures.append( + f"STALE-KNOWN-DEAD {where}: listed in {KNOWN_DEAD_FILE} but it is " + f"{p.verdict} now; remove the entry") + if p.verdict == "UNREACHABLE": + rep.warnings.append(f"UNREACHABLE {where}: {p.detail}") + if server in rep.deprecated and dead_here == 0: + rep.failures.append( + f"STALE-DEPRECATION {server}: package.json says DEPRECATED but every " + f"host it calls resolved and verified; re-check the provider and " + f"remove the mark (or record why it stays)" + ) + rep.failures.extend(override_failures(rep)) + present = {(r.server, r.host) for r in rep.refs} + for server, host in sorted(set(rep.known_dead) - present): + rep.failures.append( + f"STALE-KNOWN-DEAD {server} {host}: listed in {KNOWN_DEAD_FILE} but the " + f"source no longer calls it; remove the entry") + for server in sorted(rep.deprecated - set(by_server)): + rep.failures.append( + f"STALE-DEPRECATION {server}: marked DEPRECATED but no URL was extracted " + f"from its source, so the mark cannot be checked" + ) + + if not quiet: + print_report(rep) + return rep + + +def print_report(rep: Report) -> None: + hosts = rep.probes + ok = sum(1 for p in hosts.values() if p.verdict == "ok") + dead = sum(1 for p in hosts.values() if p.verdict == "DEAD") + unr = sum(1 for p in hosts.values() if p.verdict == "UNREACHABLE") + print(f"servers scanned: {rep.servers}") + print(f"URL literals extracted: {len(rep.refs)} (+{len(rep.templated)} with a templated host, not probed)") + print(f"unique hosts probed: {len(hosts)} ok={ok} dead={dead} unreachable={unr}") + print(f"deprecated packages: {len(rep.deprecated)}") + print(f"servers without a *_URL env override: {len(rep.no_override)}") + print(f"known-dead entries: {len(rep.known_dead)}") + print(f"not-a-host literals: {len(rep.not_a_host)}") + for r in rep.not_a_host: + print(f" {r.server} (src/index.ts:{r.line}) {r.url}") + if rep.templated: + print("\ntemplated hosts (built at runtime, cannot be probed):") + for r in rep.templated: + print(f" {r.server} (src/index.ts:{r.line}) {r.url}") + if rep.expected_dead: + print("\ndead hosts in DEPRECATED packages or listed as known-dead (expected):") + for s in rep.expected_dead: + print(f" {s}") + if rep.warnings: + print("\nwarnings (network-path dependent, do not fail the run):") + for s in rep.warnings: + print(f" {s}") + print(f"::warning::{s}") + if rep.failures: + print("\nFAILURES:") + for s in rep.failures: + print(f" {s}") + print(f"::error::{s}") + else: + print("\nno unexpected dead host") + + +# -------------------------------------------------------------------------- +# Self-test: plant hosts in a throwaway tree and assert each verdict by name +# -------------------------------------------------------------------------- + +LIVE_CONTROL = "registry.npmjs.org" # must resolve and verify from CI +DEAD_PLANT = "codespar-selftest-dead-host.invalid" # RFC 6761: never resolves +TLS_PLANT = "wrong.host.badssl.com" # resolves, cert is for another name +TLS_CONTROL = "badssl.com" # same operator, valid cert + + +def _plant(root: Path, server: str, body: str, deprecated: bool = False) -> None: + d = root / "packages" / server + (d / "src").mkdir(parents=True, exist_ok=True) + (d / "src" / "index.ts").write_text(body, encoding="utf-8") + desc = f"{DEPRECATED_PREFIX}: selftest" if deprecated else "selftest" + (d / "package.json").write_text(json.dumps({"name": server, "description": desc}), encoding="utf-8") + + +def self_test() -> int: + failures: list[str] = [] + + def expect(cond: bool, msg: str) -> None: + print((" pass " if cond else " FAIL ") + msg) + if not cond: + failures.append(msg) + + tmp = Path(tempfile.mkdtemp(prefix="catalog-hosts-selftest-")) + try: + # Extractor sensitivity: the default inside an env override, inside a + # template expression and in a ternary must be found; a URL in a + # comment, in prose, or on an example domain must not. + _plant(tmp, "live/control", f""" + // https://{DEAD_PLANT}/in-a-comment must be ignored + /* https://{DEAD_PLANT}/in-a-block-comment too */ + const DOC = "see https://{DEAD_PLANT}/docs in prose"; + const EX = "https://api.example.com/v1"; + const BASE_URL = process.env.LIVE_BASE_URL || "https://{LIVE_CONTROL}/v1"; + const T = `${{process.env.LIVE_OTHER_URL || "https://{LIVE_CONTROL}"}}/x/${{ID}}`; + const TPL = `https://${{SHOP}}.myshopify.com/admin`; + """) + rep = collect(tmp / "packages") + hosts = sorted({r.host for r in rep.refs}) + expect(hosts == [LIVE_CONTROL], f"extractor finds only the live control host (got {hosts})") + expect(len(rep.refs) == 2, f"both env-override defaults extracted (got {len(rep.refs)})") + expect(len(rep.templated) == 1, f"templated host reported, not probed (got {len(rep.templated)})") + + # Positive control first: a tree with only the live host passes. If it + # does not, the network is the problem and nothing below is evidence. + rep = run(tmp / "packages", quiet=True) + expect(rep.probes.get(LIVE_CONTROL, Probe("", "", "")).verdict == "ok", + f"live control {LIVE_CONTROL} probes ok ({rep.probes.get(LIVE_CONTROL)})") + expect(not rep.failures, f"tree with only live hosts passes (failures: {rep.failures})") + if failures: + print("positive control failed: the probe cannot reach the internet; aborting") + return 1 + + # Planted dead host in a normal package: must fail, naming it. + _plant(tmp, "dead/planted", f'const BASE_URL = process.env.X_BASE_URL ?? "https://{DEAD_PLANT}/v1";\n') + rep = run(tmp / "packages", quiet=True) + named = [f for f in rep.failures if DEAD_PLANT in f and "dead/planted" in f] + expect(len(named) == 1, f"planted dead host fails and is named (failures: {rep.failures})") + expect(all("live/control" not in f for f in rep.failures), "live package is not blamed") + + # Certificate for another name: DEAD, with its same-operator control ok. + _plant(tmp, "tls/planted", f'const A = process.env.A_BASE_URL || "https://{TLS_CONTROL}";\n' + f'const B = process.env.B_BASE_URL || "https://{TLS_PLANT}";\n') + rep = run(tmp / "packages", quiet=True) + ctl = rep.probes.get(TLS_CONTROL) + expect(ctl is not None and ctl.verdict == "ok", f"TLS control {TLS_CONTROL} ok ({ctl})") + expect(any(TLS_PLANT in f and f.startswith("DEAD") for f in rep.failures), + f"certificate name mismatch is DEAD ({rep.probes.get(TLS_PLANT)})") + shutil.rmtree(tmp / "packages" / "tls") + + # Carve-out: the same dead host in a DEPRECATED package does not fail... + shutil.rmtree(tmp / "packages" / "dead") + _plant(tmp, "dead/deprecated", f'const BASE_URL = process.env.X_BASE_URL || "https://{DEAD_PLANT}/v1";\n', deprecated=True) + rep = run(tmp / "packages", quiet=True) + expect(not rep.failures, f"dead host in a DEPRECATED package does not fail (failures: {rep.failures})") + expect(any(DEAD_PLANT in s for s in rep.expected_dead), "and is still listed as expected-dead") + + # ...and the carve-out polices itself: DEPRECATED with only live hosts fails. + _plant(tmp, "stale/deprecated", f'const BASE_URL = process.env.X_BASE_URL || "https://{LIVE_CONTROL}";\n', deprecated=True) + rep = run(tmp / "packages", quiet=True) + expect(any("STALE-DEPRECATION stale/deprecated" in f for f in rep.failures), + f"DEPRECATED package whose hosts are all live fails (failures: {rep.failures})") + expect(all("dead/deprecated" not in f for f in rep.failures), "the honest deprecation is not blamed") + + # Known-dead list: a listed dead host in a normal package does not fail, + # a listed host that is live fails as stale, and an unlisted twin fails. + shutil.rmtree(tmp / "packages" / "dead") + shutil.rmtree(tmp / "packages" / "stale") + kd = tmp / "scripts" / KNOWN_DEAD_FILE + kd.parent.mkdir(parents=True, exist_ok=True) + _plant(tmp, "kd/listed", f'const BASE_URL = process.env.K_BASE_URL || "https://{DEAD_PLANT}/v1";\n') + kd.write_text(json.dumps({"hosts": [{"server": "kd/listed", "host": DEAD_PLANT, "why": "selftest"}]})) + rep = run(tmp / "packages", quiet=True) + expect(not rep.failures, f"listed known-dead host does not fail (failures: {rep.failures})") + kd.write_text(json.dumps({"hosts": [{"server": "kd/listed", "host": DEAD_PLANT, "why": "selftest"}, + {"server": "live/control", "host": LIVE_CONTROL, "why": "selftest"}]})) + rep = run(tmp / "packages", quiet=True) + expect([f.split(" (")[0] for f in rep.failures] == ["STALE-KNOWN-DEAD live/control"], + f"known-dead entry for a live host fails as stale, naming it (failures: {rep.failures})") + kd.unlink() + rep = run(tmp / "packages", quiet=True) + expect(any(f.startswith("DEAD kd/listed") for f in rep.failures), + f"the same host without the entry fails (failures: {rep.failures})") + shutil.rmtree(tmp / "packages" / "kd") + + # not-a-host marker: the marked literal is skipped, an unmarked twin is not. + _plant(tmp, "aud/marked", + f'const BASE_URL = process.env.M_BASE_URL || "https://{LIVE_CONTROL}";\n' + f'const AUD = "https://{DEAD_PLANT}"; // {NOT_A_HOST_MARK}\n') + rep = run(tmp / "packages", quiet=True) + expect(not rep.failures and len(rep.not_a_host) == 1, + f"marked audience literal is skipped and counted (failures: {rep.failures}, marked: {len(rep.not_a_host)})") + shutil.rmtree(tmp / "packages" / "aud") + _plant(tmp, "stale/deprecated", f'const BASE_URL = process.env.X_BASE_URL || "https://{LIVE_CONTROL}";\n', deprecated=True) + + # Override rule: a live host hardcoded with no *_URL env read fails, + # naming the package; its twin with the env read (live/control) passes. + shutil.rmtree(tmp / "packages" / "stale") + _plant(tmp, "hard/coded", f'const BASE_URL = "https://{LIVE_CONTROL}/v1";\n') + rep = run(tmp / "packages", quiet=True) + expect([f.split(":")[0] for f in rep.failures] == ["NO-OVERRIDE hard/coded"], + f"hardcoded URL without env override fails, and only that package (failures: {rep.failures})") + shutil.rmtree(tmp / "packages" / "hard") + + # End to end through the CLI: exit code 1 and the host named on stdout. + _plant(tmp, "dead/planted", f'const BASE_URL = process.env.X_BASE_URL || "https://{DEAD_PLANT}/v1";\n') + proc = subprocess.run( + [sys.executable, __file__, "--root", str(tmp / "packages")], + capture_output=True, text=True, + ) + expect(proc.returncode == 1 and f"DEAD dead/planted" in proc.stdout and DEAD_PLANT in proc.stdout, + f"CLI exits 1 and names the planted host (exit {proc.returncode})") + finally: + shutil.rmtree(tmp, ignore_errors=True) + + print(f"\nself-test: {'FAILED' if failures else 'passed'} ({len(failures)} failure(s))") + return 1 if failures else 0 + + +def main() -> int: + ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + ap.add_argument("--root", type=Path, default=ROOT / "packages", help="packages/ directory to scan") + ap.add_argument("--list", action="store_true", help="print the extracted URL set and exit (no network)") + ap.add_argument("--self-test", action="store_true", help="run the planted-host self-test") + args = ap.parse_args() + + if args.self_test: + return self_test() + if args.list: + rep = collect(args.root) + for r in rep.refs + rep.templated: + dep = " [DEPRECATED]" if r.server in rep.deprecated else "" + print(f"{r.server}\t{r.line}\t{r.host or '(templated)'}\t{r.url}{dep}") + print(f"# servers={rep.servers} literals={len(rep.refs)} templated={len(rep.templated)} " + f"hosts={len({r.host for r in rep.refs})}", file=sys.stderr) + return 0 + rep = run(args.root) + return 1 if rep.failures else 0 + + +if __name__ == "__main__": + sys.exit(main())