Skip to main content
API Reference

Servers API

HTTP API reference for browsing and filtering CodeSpar's catalog of MCP servers across payments, fiscal, logistics, messaging, banking, ERP, and crypto.

2 min read
View MarkdownEdit on GitHub

Servers API

The Servers API lets you browse CodeSpar's catalog of MCP servers. Each server represents an integration with a commerce provider -- a payment gateway, shipping carrier, fiscal authority, messaging platform, banking API, ERP system, or crypto exchange.

Use the Servers API to understand what integrations are available, discover capabilities before creating sessions, and build dynamic UIs that show users which providers they can connect.

Base URL: https://api.codespar.dev

All endpoints require authentication via Bearer token. See Authentication.


GET /v1/servers

Returns the server catalog with filtering and search capabilities. Results are paginated.

Auth required: Yes (scope: servers:read)

Query parameters

ParameterTypeDefaultDescription
categorystring--Filter by category: payments, fiscal, logistics, messaging, banking, erp, crypto
countrystring--Filter by country code (ISO 3166-1 alpha-2): BR, MX, AR, CO, CL
qstring--Full-text search across server name, description, and capabilities
statusstring--Filter by status: stable, beta, alpha, deprecated
auth_typestring--Filter by auth type: api_key, path_secret, oauth, cert, hmac_signed, none
limitnumber50Results per page (max 100)
offsetnumber0Pagination offset

Response schema

{
  "data": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "category": "string",
      "countries": ["string"],
      "capabilities": ["string"],
      "auth_type": "string",
      "status": "string",
      "tools_count": "number",
      "icon_url": "string"
    }
  ],
  "total": "number",
  "limit": "number",
  "offset": "number"
}

Example: list all servers

curl "https://api.codespar.dev/v1/servers" \
  -H "Authorization: Bearer csk_live_abc123..."

Response -- 200 OK:

{
  "data": [
    {
      "id": "stripe",
      "name": "Stripe",
      "description": "Global payment processing platform. Supports cards, Pix, boleto, and 135+ currencies.",
      "category": "payments",
      "countries": ["BR", "MX", "AR", "CO", "CL"],
      "capabilities": ["checkout", "subscriptions", "refunds", "pix", "boleto", "cards"],
      "auth_type": "api_key",
      "status": "stable",
      "tools_count": 12,
      "icon_url": "https://codespar.dev/icons/stripe.svg"
    },
    {
      "id": "mercadopago",
      "name": "Mercado Pago",
      "description": "Latin America's leading payment platform. Native Pix, boleto, and Mercado Credito.",
      "category": "payments",
      "countries": ["BR", "MX", "AR", "CO", "CL"],
      "capabilities": ["pix", "boleto", "checkout", "wallet", "installments"],
      "auth_type": "oauth",
      "status": "stable",
      "tools_count": 15,
      "icon_url": "https://codespar.dev/icons/mercadopago.svg"
    }
  ],
  "total": 112,
  "limit": 50,
  "offset": 0
}

Example: filter by category

Retrieve only payment servers:

curl "https://api.codespar.dev/v1/servers?category=payments" \
  -H "Authorization: Bearer csk_live_abc123..."

Response -- 200 OK:

{
  "data": [
    {
      "id": "stripe",
      "name": "Stripe",
      "description": "Global payment processing platform. Supports cards, Pix, boleto, and 135+ currencies.",
      "category": "payments",
      "countries": ["BR", "MX", "AR", "CO", "CL"],
      "capabilities": ["checkout", "subscriptions", "refunds", "pix", "boleto", "cards"],
      "auth_type": "api_key",
      "status": "stable",
      "tools_count": 12,
      "icon_url": "https://codespar.dev/icons/stripe.svg"
    },
    {
      "id": "asaas",
      "name": "Asaas",
      "description": "Brazilian payment platform specializing in Pix, boleto, and recurring billing.",
      "category": "payments",
      "countries": ["BR"],
      "capabilities": ["pix", "boleto", "subscriptions", "split_payments"],
      "auth_type": "api_key",
      "status": "stable",
      "tools_count": 10,
      "icon_url": "https://codespar.dev/icons/asaas.svg"
    }
  ],
  "total": 12,
  "limit": 50,
  "offset": 0
}

Example: filter by country

Retrieve servers available in Mexico:

curl "https://api.codespar.dev/v1/servers?country=MX" \
  -H "Authorization: Bearer csk_live_abc123..."

Response -- 200 OK:

{
  "data": [
    {
      "id": "stripe",
      "name": "Stripe",
      "description": "Global payment processing platform. Supports cards, Pix, boleto, and 135+ currencies.",
      "category": "payments",
      "countries": ["BR", "MX", "AR", "CO", "CL"],
      "capabilities": ["checkout", "subscriptions", "refunds", "pix", "boleto", "cards"],
      "auth_type": "api_key",
      "status": "stable",
      "tools_count": 12,
      "icon_url": "https://codespar.dev/icons/stripe.svg"
    },
    {
      "id": "conekta",
      "name": "Conekta",
      "description": "Mexican payment platform. Native SPEI, OXXO cash payments, and card processing.",
      "category": "payments",
      "countries": ["MX"],
      "capabilities": ["spei", "oxxo", "cards", "checkout"],
      "auth_type": "api_key",
      "status": "stable",
      "tools_count": 8,
      "icon_url": "https://codespar.dev/icons/conekta.svg"
    },
    {
      "id": "cfdi",
      "name": "CFDI",
      "description": "Mexican fiscal document generation (Comprobante Fiscal Digital por Internet) via SAT.",
      "category": "fiscal",
      "countries": ["MX"],
      "capabilities": ["cfdi_ingreso", "cfdi_egreso", "cfdi_traslado", "cancelation"],
      "auth_type": "cert",
      "status": "stable",
      "tools_count": 6,
      "icon_url": "https://codespar.dev/icons/cfdi.svg"
    }
  ],
  "total": 18,
  "limit": 50,
  "offset": 0
}

Search for servers that support Pix:

curl "https://api.codespar.dev/v1/servers?q=pix" \
  -H "Authorization: Bearer csk_live_abc123..."

Response -- 200 OK:

{
  "data": [
    {
      "id": "stripe",
      "name": "Stripe",
      "description": "Global payment processing platform. Supports cards, Pix, boleto, and 135+ currencies.",
      "category": "payments",
      "countries": ["BR", "MX", "AR", "CO", "CL"],
      "capabilities": ["checkout", "subscriptions", "refunds", "pix", "boleto", "cards"],
      "auth_type": "api_key",
      "status": "stable",
      "tools_count": 12,
      "icon_url": "https://codespar.dev/icons/stripe.svg"
    },
    {
      "id": "mercadopago",
      "name": "Mercado Pago",
      "description": "Latin America's leading payment platform. Native Pix, boleto, and Mercado Credito.",
      "category": "payments",
      "countries": ["BR", "MX", "AR", "CO", "CL"],
      "capabilities": ["pix", "boleto", "checkout", "wallet", "installments"],
      "auth_type": "oauth",
      "status": "stable",
      "tools_count": 15,
      "icon_url": "https://codespar.dev/icons/mercadopago.svg"
    },
    {
      "id": "asaas",
      "name": "Asaas",
      "description": "Brazilian payment platform specializing in Pix, boleto, and recurring billing.",
      "category": "payments",
      "countries": ["BR"],
      "capabilities": ["pix", "boleto", "subscriptions", "split_payments"],
      "auth_type": "api_key",
      "status": "stable",
      "tools_count": 10,
      "icon_url": "https://codespar.dev/icons/asaas.svg"
    }
  ],
  "total": 5,
  "limit": 50,
  "offset": 0
}

Example: combine filters

Retrieve stable payment servers in Brazil:

curl "https://api.codespar.dev/v1/servers?category=payments&country=BR&status=stable" \
  -H "Authorization: Bearer csk_live_abc123..."

GET /v1/servers/:id/tools

Returns a server's tool list with input schemas. (There is no standalone GET /v1/servers/:id: server metadata comes from the list endpoint's rows; this endpoint serves the tools; GET /v1/servers/:id/auth-schema serves the credential shape the connect flow needs.)

Auth required: Yes (scope: servers:read)

curl example

curl https://api.codespar.dev/v1/servers/stripe/tools \
  -H "Authorization: Bearer csk_live_abc123..."

Response -- 200 OK

{
  "tools": [
    {
      "name": "stripe_create_checkout_session",
      "description": "Create a Stripe Checkout session with a payment link",
      "input_schema": {
        "type": "object",
        "properties": {
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "price_data": {
                  "type": "object",
                  "properties": {
                    "currency": { "type": "string" },
                    "product_data": {
                      "type": "object",
                      "properties": {
                        "name": { "type": "string" }
                      }
                    },
                    "unit_amount": { "type": "number" }
                  }
                },
                "quantity": { "type": "number" }
              }
            }
          },
          "mode": {
            "type": "string",
            "enum": ["payment", "subscription", "setup"]
          },
          "success_url": { "type": "string" },
          "cancel_url": { "type": "string" }
        },
        "required": ["line_items", "mode"]
      }
    },
    {
      "name": "stripe_create_refund",
      "description": "Refund a Stripe payment",
      "input_schema": {
        "type": "object",
        "properties": {
          "payment_intent": { "type": "string", "description": "ID of the PaymentIntent to refund" },
          "amount": { "type": "number", "description": "Amount to refund in cents (partial refund). Omit for full refund." },
          "reason": { "type": "string", "enum": ["duplicate", "fraudulent", "requested_by_customer"] }
        },
        "required": ["payment_intent"]
      }
    }
  ]
}

Server-specific tools (like stripe_create_checkout_session) are only available in sessions that connect to that server. The 14 meta-tools are always available regardless of which servers are connected.


Server categories

CategoryExamples
paymentsStripe, Mercado Pago, Asaas, PagSeguro, Pagarme, Conekta, Inter, Sicredi
fiscalNF-e, NFS-e, SPED, CT-e, MDFe, CFDI
logisticsCorreios, Jadlog, Loggi, Mercado Envios, Total Express, DHL, Estafeta
messagingTwilio, WhatsApp Business, SendGrid, Mailgun, Amazon SNS
bankingInter, Itau, Bradesco, Banco do Brasil, Sicoob, Nubank
erpBling, Tiny, Omie, TOTVS, ContaAzul, Nuvemshop
cryptoMercado Bitcoin, Foxbit, Binance Pay, Coinbase Commerce

Per-category counts change as the catalog grows; query GET /v1/servers?category=<name> for live numbers.

Server status values

StatusDescriptionRecommendation
stableProduction-ready, fully tested, SLA-backedSafe for production use
betaFunctional but may have breaking changes in minor versionsSafe for staging; pin the server version in production
alphaExperimental, limited support, may be removedDevelopment and testing only
deprecatedScheduled for removal; an alternative is availableMigrate to the suggested replacement

Authentication types

Each server requires one of these authentication methods, configured in the Auth Configs section of the dashboard:

Auth typeDescriptionExamples
api_keyAuthenticate with a secret key from the providerStripe, Asaas, SendGrid
path_secretSecrets embedded in URL path plus optional companion headerZ-API, Take Blip, Evolution API
oauthOAuth 2.0 flow for user-level accessMercado Pago, Melhor Envio
certmTLS with X.509 client certificate (PEM)Banco do Brasil, Itaú, Bradesco, Santander, Caixa, Sicoob, Sicredi, C6, Original
hmac_signedPer-request HMAC signature over timestamp + method + path + bodyFoxbit
jwt_ecdsaPer-request ES256 JWT signed with an ECDSA P-256 private keyCoinbase Developer Platform
two_headerTwo co-equal credential headers, no Authorization BearerCielo, Transbank, Kushki, Payway
noneNo credentials requiredBrasil API

Rate limits

The Servers API has its own rate limits, separate from session operations. Rate limits protect the managed runtime from abuse; they are not billing — see Billing for the per-settled-transaction pricing model.

TierRate limit
Open Source (self-hosted)N/A — you host it
Orchestration300 req/min
Enterprise1,200 req/min (bespoke ceilings available)

Rate limit headers are included in every response:

X-RateLimit-Limit: 120
X-RateLimit-Remaining: 118
X-RateLimit-Reset: 1713178260

Error responses

StatusError codeDescription
400invalid_requestInvalid query parameter value
401unauthorizedInvalid or missing API key
404not_foundServer ID does not exist in the catalog
429rate_limitedToo many requests; check Retry-After header

Next steps

Servers API | CodeSpar