Skip to main content
Glama
Spreedly MCP Server

Spreedly MCP Server

Official
by spreedly

Spreedly MCP Server

npm version CI node license

A Model Context Protocol (MCP) server that provides AI assistants with direct access to the Spreedly payments API. Enables LLMs to manage gateways, process transactions, tokenize payment methods, and more -- all through structured, validated tool calls.

Published on npm as @spreedly/spreedly-mcp.

Quick Start

Add this to your MCP client configuration:

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "spreedly": {
      "command": "npx",
      "args": ["-y", "@spreedly/spreedly-mcp@latest"],
      "env": {
        "SPREEDLY_ENVIRONMENT_KEY": "<your-environment-key>",
        "SPREEDLY_ACCESS_SECRET": "<your-access-secret>"
      }
    }
  }
}

Cursor

Edit .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "spreedly": {
      "command": "npx",
      "args": ["-y", "@spreedly/spreedly-mcp@latest"],
      "env": {
        "SPREEDLY_ENVIRONMENT_KEY": "<your-environment-key>",
        "SPREEDLY_ACCESS_SECRET": "<your-access-secret>"
      }
    }
  }
}

VS Code

Edit .vscode/mcp.json:

{
  "servers": {
    "spreedly": {
      "command": "npx",
      "args": ["-y", "@spreedly/spreedly-mcp@latest"],
      "env": {
        "SPREEDLY_ENVIRONMENT_KEY": "<your-environment-key>",
        "SPREEDLY_ACCESS_SECRET": "<your-access-secret>"
      }
    }
  }
}

Related MCP server: PayBridgeNP MCP Server

Getting Your Credentials

  1. Log into the Spreedly Dashboard

  2. Your Environment Key is shown on your environment's settings page

  3. Create or find an Access Secret under your environment's access secrets

For details, see Spreedly Credentials Documentation.

Tool Access Policy

The server controls which tools are available through three environment variable flags. All default to false -- only read-only tools are available out of the box. Enable the categories you need:

Variable

Default

What it enables

PAYMENT_METHOD_TOKENIZATION_ENABLED

false

Dedicated payment method tokenization tools that send raw PAN/CVV to Spreedly (create, recache)

TRANSACTION_INITIATION_ENABLED

false

Authorizing, purchasing, capturing, voiding, refunding, and other third-party actions. See Cardholder Data Flow -- authorize, purchase, and confirm also accept optional pass-in PAN/CVV data.

ADMINISTRATIVE_ENABLED

false

Creating/updating gateways, environments, certificates, merchant profiles, SCA providers, sub-merchants

Read-only / monitoring (default -- no flags needed):

"env": {
  "SPREEDLY_ENVIRONMENT_KEY": "<your-environment-key>",
  "SPREEDLY_ACCESS_SECRET": "<your-access-secret>"
}

Only list/show tools are available. Good for dashboards, reporting, and investigating transactions.

Transaction processing (recommended for AI-assisted payments):

"env": {
  "SPREEDLY_ENVIRONMENT_KEY": "<your-environment-key>",
  "SPREEDLY_ACCESS_SECRET": "<your-access-secret>",
  "TRANSACTION_INITIATION_ENABLED": "true"
}

Enables authorizing, capturing, voiding, and refunding against existing gateways. Does not allow creating gateways or using dedicated card tokenization tools. Note: authorize, purchase, and confirm accept optional pass-in PAN/CVV data if the merchant's Spreedly environment permits it -- see Cardholder Data Flow.

Administrative setup:

"env": {
  "SPREEDLY_ENVIRONMENT_KEY": "<your-environment-key>",
  "SPREEDLY_ACCESS_SECRET": "<your-access-secret>",
  "ADMINISTRATIVE_ENABLED": "true"
}

For initial environment setup -- creating gateways, merchant profiles, SCA providers. Disable once configuration is complete.

Full access:

"env": {
  "SPREEDLY_ENVIRONMENT_KEY": "<your-environment-key>",
  "SPREEDLY_ACCESS_SECRET": "<your-access-secret>",
  "PAYMENT_METHOD_TOKENIZATION_ENABLED": "true",
  "TRANSACTION_INITIATION_ENABLED": "true",
  "ADMINISTRATIVE_ENABLED": "true"
}

All tool categories enabled. Use only in controlled environments or during initial setup.

Cardholder Data Flow

Five tools can accept raw cardholder data (PAN, CVV). They are controlled by two different flags:

Flag

Tools

CHD Fields

PAYMENT_METHOD_TOKENIZATION_ENABLED

spreedly_payment_method_create, spreedly_payment_method_recache

credit_card (full PAN, CVV), bank_account, apple_pay, google_pay

TRANSACTION_INITIATION_ENABLED

spreedly_gateway_authorize, spreedly_gateway_purchase, spreedly_transaction_confirm

credit_card (optional pass-in PAN/CVV)

The create and recache tools are dedicated tokenization tools -- their sole purpose is to vault raw card data in Spreedly. They are gated by PAYMENT_METHOD_TOKENIZATION_ENABLED.

The authorize, purchase, and confirm tools primarily operate on existing payment_method_token references. They also accept an optional credit_card field for pass-in payment method tokenization, which tokenizes a new card inline as part of the transaction. Whether pass-in succeeds depends on the merchant's Spreedly environment settings, not the MCP server flag. These tools are gated by TRANSACTION_INITIATION_ENABLED.

PCI scoping note: Disabling only PAYMENT_METHOD_TOKENIZATION_ENABLED still allows pass-in PAN/CVV data through transaction tools when TRANSACTION_INITIATION_ENABLED is true. To exclude all raw cardholder data flows, either disable both flags, or enable the "iFrame or Spreedly Express only" setting in your Spreedly environment -- this prevents direct API submission of payment methods, blocking pass-in tokenization on transaction endpoints regardless of MCP flag configuration.

Available Tools

Gateways (12 tools)

Tool

Description

spreedly_gateway_create

Create a new gateway connection

spreedly_gateway_list

List all gateways

spreedly_gateway_show

Get gateway details

spreedly_gateway_update

Update gateway configuration

spreedly_gateway_retain

Mark gateway for retention

spreedly_gateway_list_supported

List all supported gateway types

spreedly_gateway_list_transactions

List transactions for a gateway

spreedly_gateway_authorize

Authorize a payment (hold funds)

spreedly_gateway_purchase

Authorize and capture in one step

spreedly_gateway_verify

Verify a payment method

spreedly_gateway_store

Store a payment method at a gateway

spreedly_gateway_general_credit

Issue a non-referenced credit

Transactions (9 tools)

Tool

Description

spreedly_transaction_list

List transactions

spreedly_transaction_show

Get transaction details

spreedly_transaction_update

Update transaction metadata

spreedly_transaction_capture

Capture an authorized transaction

spreedly_transaction_void

Void a transaction

spreedly_transaction_credit

Refund a transaction

spreedly_transaction_complete

Complete a pending transaction

spreedly_transaction_confirm

Confirm a pending transaction

spreedly_transaction_transcript

Get raw gateway transcript

Payment Methods (12 tools)

Tool

Description

spreedly_payment_method_create

Tokenize a new payment method

spreedly_payment_method_list

List payment methods

spreedly_payment_method_show

Get payment method details

spreedly_payment_method_update

Update payment method metadata

spreedly_payment_method_retain

Retain a payment method

spreedly_payment_method_recache

Recache CVV

spreedly_payment_method_list_transactions

List transactions for a payment method

spreedly_payment_method_list_events

List events for a payment method

spreedly_payment_method_delete_metadata

Delete payment method metadata

spreedly_payment_method_update_gratis

Update without gateway interaction

spreedly_payment_method_show_event

Show a payment method event

spreedly_payment_method_list_all_events

List all payment method events

Certificates (4 tools)

spreedly_certificate_create, spreedly_certificate_generate, spreedly_certificate_list, spreedly_certificate_update

Environments (4 tools)

spreedly_environment_create, spreedly_environment_list, spreedly_environment_show, spreedly_environment_update

Merchant Profiles (4 tools)

spreedly_merchant_profile_create, spreedly_merchant_profile_list, spreedly_merchant_profile_show, spreedly_merchant_profile_update

Sub-Merchants (4 tools)

spreedly_sub_merchant_create, spreedly_sub_merchant_list, spreedly_sub_merchant_show, spreedly_sub_merchant_update

Events (2 tools)

spreedly_event_list, spreedly_event_show

Protection (5 tools)

spreedly_protection_forward_claim, spreedly_protection_list_events, spreedly_protection_show_event, spreedly_protection_create_provider, spreedly_protection_show_provider

SCA (3 tools)

spreedly_sca_authenticate, spreedly_sca_create_provider, spreedly_sca_show_provider

Card Refresher (3 tools)

spreedly_card_refresher_inquiry, spreedly_card_refresher_show_inquiry, spreedly_card_refresher_list_inquiries

Network Tokenization (2 tools)

spreedly_network_tokenization_card_metadata, spreedly_network_tokenization_token_status

Common Workflows

Tokenize and Charge a Card

  1. Create a payment method: spreedly_payment_method_create

  2. Authorize against a gateway: spreedly_gateway_authorize

  3. Capture the authorization: spreedly_transaction_capture

Authorize Then Capture (Two-Step)

  1. Authorize: spreedly_gateway_authorize (holds funds)

  2. Capture later: spreedly_transaction_capture (collects funds)

Refund a Transaction

  1. Find the transaction: spreedly_transaction_show

  2. Issue a refund: spreedly_transaction_credit

Audit Logging

When audit logging is enabled (the default), the MCP server emits structured audit log entries to stderr for every tool invocation. Logs use one-line JSON format for easy SIEM ingestion and comply with PCI DSS v4.0.1 Requirement 10.2.2. stderr is the MCP-specified channel for logging — stdout is reserved for protocol traffic and must not contain non-MCP messages.

Example Output

{"timestamp":"2026-03-05T18:30:00.000Z","eventId":"f47ac10b-58cc-4372-a567-0e02b2c3d479","component":"spreedly-mcp","tool":"spreedly_gateway_list","environmentKey":"EXAMPLE_ENVIRONMENT_KEY","status":"success","durationMs":142,"requestId":"a1b2c3d4e5","httpStatusCode":200}
{"timestamp":"2026-03-05T18:30:01.000Z","eventId":"7c9e6679-7425-40de-944b-e07fc1f90ae7","component":"spreedly-mcp","tool":"spreedly_payment_method_create","environmentKey":"EXAMPLE_ENVIRONMENT_KEY","status":"error","durationMs":89,"requestId":"f6g7h8i9j0","httpStatusCode":422}

Each entry includes: timestamp, event ID, component identifier, tool name, environment key, success/failure status, duration, and HTTP metadata. The environmentKey is the full SPREEDLY_ENVIRONMENT_KEY (safe to log — it is not a secret). The requestId and httpStatusCode fields reflect the Spreedly API response (x-request-id header and HTTP status), enabling correlation with Spreedly's server-side logs. Both are present whenever a Spreedly API call was made. On error, httpStatusCode is null when the failure occurred before any HTTP request (e.g. input validation). On success without an API call, httpStatusCode is absent. Request and response bodies are never logged.

De-duplicating Logs

The server emits exactly one audit entry per tool invocation. However, MCP hosts (Claude Desktop, Cursor, VS Code, etc.) capture and display stderr independently from one another, and some hosts may render the same stderr line more than once in their log UI. Each entry includes a unique eventId (UUIDv4) so that downstream log pipelines can safely de-duplicate: discard any entry whose eventId you have already seen.

Configuration

Environment Variable

Values

Default

Description

SPREEDLY_MCP_LOG_LEVEL

info, silent

info

Set to silent to disable audit logging. Note: Disabling audit logs means this component will not satisfy PCI DSS Requirement 10.2.1 (audit logs enabled for all system components). Use silent only in development or non-PCI environments.

Shared Responsibility

Responsibility

Owner

Emit structured audit events to stderr

Spreedly MCP server

Capture stderr and route to SIEM/log aggregator

Customer infrastructure

Retain logs for 12+ months (3 months immediately available)

Customer infrastructure

Monitor and alert on suspicious audit events

Customer infrastructure

Security

  • Credentials are isolated in a closure -- never stored as object properties, never serializable

  • All inputs are sanitized for invisible Unicode characters and injection attempts

  • Error messages are redacted to prevent credential leakage

  • Tool descriptions are static constants hardened against prompt injection

  • Audit logs never contain request/response bodies, full keys, or secrets

  • See SECURITY.md for vulnerability reporting

  • See Security Guide for architecture details, credential management, and deployment recommendations

Shared Responsibility

The MCP server runs in your infrastructure. Security is shared between the server and your organization:

Category

Spreedly MCP Server

Customer

Credential security

Isolates in closure; never serializable or logged

Provisions, rotates, secures storage

Transport security

Enforces HTTPS; redacts credentials from errors

Network segmentation, access controls

Input validation

Validates and sanitizes tool inputs

Configures Tool Access Policy

Audit logging

Emits structured JSON to stderr

Routes to SIEM; retention, monitoring

AI provider

Hardens tool descriptions against prompt injection

Selects provider, evaluates data privacy

Deployment

Minimal dependencies; npm provenance attestation

Isolates server process, keeps updated

PCI compliance

No cardholder data stored outside API calls

Maintains own PCI posture

For credential rotation procedures, deployment hardening, and the full model, see the Security Guide.

Development

git clone https://github.com/spreedly/spreedly-mcp.git
cd spreedly-mcp
npm install
npm test          # Run all tests
npm run typecheck # Type-check
npm run build     # Build for distribution

To run the MCP server locally against a real Spreedly test environment (e.g. during development before the package is published), see CONTRIBUTING.md for setup instructions and security guidelines.

Contributing

See CONTRIBUTING.md for the full guide, including local MCP client configuration and credential handling.

  1. Fork the repository

  2. Create a feature branch

  3. Write tests for your changes

  4. Ensure all checks pass: npm test && npm run typecheck && npm run lint

  5. Submit a pull request

Disclaimer

See DISCLAIMER.md for information on third-party AI integration, shared responsibility, and operational risk.

License

Apache License 2.0 -- see LICENSE

Available Tools

32 tools
spreedly_card_refresher_list_inquiriesB
Read-only

Lists card refresher inquiries. This tool ONLY reads data.

Inputs: count, order, since_token.

spreedly_card_refresher_show_inquiryA
Read-only

Retrieves details of a specific card refresher inquiry. This tool ONLY reads data.

Inputs: inquiry_token (required).

spreedly_event_listA
Read-only

Lists events in your Spreedly environment with pagination. Returns event summaries. This tool ONLY reads data.

Inputs: count, order, event_type, since_token.

spreedly_event_showB
Read-only

Retrieves details of a single event by its ID. Returns the full event record. This tool ONLY reads data.

Inputs: event_id (required).

spreedly_gateway_listA
Read-only

Lists all gateway connections configured in your Spreedly environment. Returns an array of gateway summaries. This tool ONLY reads data and does not modify anything.

Inputs: count, order, since_token.

spreedly_gateway_list_supportedA
Read-only

Lists all gateway types supported by Spreedly. Returns available gateway integrations and their capabilities. This tool ONLY reads reference data.

Inputs: no named parameters.

spreedly_gateway_list_transactionsB
Read-only

Lists transactions processed through a specific gateway. Returns transaction summaries. This tool ONLY reads data.

Inputs: gateway_token (required), order, state, since_token.

spreedly_gateway_showA
Read-only

Retrieves details of a single gateway by its token. Returns the full gateway configuration. This tool ONLY reads data and does not modify anything.

Inputs: gateway_token (required).

spreedly_merchant_profile_listB
Read-only

Lists all merchant profiles. This tool ONLY reads data.

Inputs: count, order, since_token.

spreedly_merchant_profile_showA
Read-only

Retrieves details of a single merchant profile. This tool ONLY reads data.

Inputs: merchant_profile_token (required).

spreedly_network_tokenization_card_metadataA
Read-only

Retrieves card metadata for a network token. This tool ONLY reads data.

Inputs: payment_method_token (required).

spreedly_network_tokenization_token_statusA
Read-only

Retrieves the status of a network token. This tool ONLY reads data.

Inputs: payment_method_token (required).

spreedly_payment_method_delete_metadataB
DestructiveIdempotent

Deletes custom metadata from a payment method. This tool ONLY removes metadata.

Inputs: keys (required), payment_method_token (required).

spreedly_payment_method_listA
Read-only

Lists payment methods in your Spreedly environment. Returns payment method summaries. This tool ONLY reads data.

Inputs: count, order, state, metadata, +1 more.

spreedly_payment_method_list_all_eventsB
Read-only

Lists all payment method events across your environment. This tool ONLY reads data.

Inputs: count, order, event_type, since_token, +1 more.

spreedly_payment_method_list_eventsB
Read-only

Lists lifecycle events for a specific payment method. This tool ONLY reads data.

Inputs: payment_method_token (required), count, since_token, include_transactions.

spreedly_payment_method_list_transactionsB
Read-only

Lists transactions for a specific payment method. This tool ONLY reads data.

Inputs: payment_method_token (required), order, since_token.

spreedly_payment_method_retainA
Idempotent

Marks a payment method to be retained beyond the default retention period. This tool ONLY modifies retention status.

Inputs: payment_method_token (required).

spreedly_payment_method_showA
Read-only

Retrieves details of a single payment method by its token. This tool ONLY reads data.

Inputs: payment_method_token (required).

spreedly_payment_method_show_eventB
Read-only

Retrieves a specific payment method event by token. This tool ONLY reads data.

Inputs: event_token (required).

spreedly_payment_method_updateB
DestructiveIdempotent

Updates a payment method's non-sensitive fields. Requires a payment_method_token. This tool ONLY updates metadata.

Inputs: payment_method (required), payment_method_token (required).

spreedly_payment_method_update_gratisA
DestructiveIdempotent

Updates a managed payment method's details without a gateway interaction. This tool modifies payment method data.

Inputs: payment_method (required), payment_method_token (required).

spreedly_protection_list_eventsA
Read-only

Lists protection events. Returns event summaries. This tool ONLY reads data.

Inputs: count, order, state, since_token.

spreedly_protection_show_eventB
Read-only

Retrieves a specific protection event. This tool ONLY reads data.

Inputs: event_token (required).

spreedly_protection_show_providerA
Read-only

Retrieves details of a protection provider. This tool ONLY reads data.

Inputs: protection_provider_token (required).

spreedly_sca_show_providerA
Read-only

Retrieves details of an SCA provider. This tool ONLY reads data.

Inputs: sca_provider_token (required).

spreedly_sub_merchant_listA
Read-only

Lists all sub-merchants. This tool ONLY reads data.

Inputs: count, order, since_token.

spreedly_sub_merchant_showA
Read-only

Retrieves details of a single sub-merchant. This tool ONLY reads data.

Inputs: sub_merchant_key (required).

spreedly_transaction_listA
Read-only

Lists transactions in your Spreedly environment. Returns transaction summaries with pagination. This tool ONLY reads data.

Inputs: count, order, state, since_token.

spreedly_transaction_showA
Read-only

Retrieves details of a single transaction by its token. Returns the full transaction record. This tool ONLY reads data.

Inputs: transaction_token (required).

spreedly_transaction_transcriptA
Read-only

Retrieves the raw gateway communication transcript for a transaction. Returns request/response logs. This tool ONLY reads data.

Inputs: transaction_token (required).

spreedly_transaction_updateA
DestructiveIdempotent

Updates metadata on an existing transaction. Requires a transaction_token. This tool ONLY modifies transaction metadata.

Inputs: transaction_token (required), metadata.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 32 tools

    Disambiguation3/5

    Most tools are clearly separated by resource and action, but several list/show variants overlap in purpose, such as spreedly_gateway_list_transactions vs spreedly_transaction_list and spreedly_payment_method_list_all_events vs spreedly_event_list. The descriptions help, but an agent could easily select the wrong event or transaction listing tool.

    Naming Consistency4/5

    The dominant spreedly_<resource>_<action> pattern is consistent and readable. Minor deviations like spreedly_network_tokenization_card_metadata, spreedly_transaction_transcript, and spreedly_payment_method_update_gratis break the strict pattern but do not make the set chaotic.

    Tool Count2/5

    With 32 tools, the server exceeds the 25-tool threshold and much of the surface consists of repetitive list/show pairs across similar resources. The broad scope partly justifies the count, but the set feels heavy and redundant for an MCP server.

    Completeness2/5

    The tool set is heavily read-oriented and covers listing, showing, and some metadata updates, but core Spreedly operations such as creating payment methods, processing transactions, refunds, or managing gateways are missing. Agents attempting real payment workflows would hit significant dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI agents to interact with multiple payment providers (Stripe, Paystack) through a unified API. Supports payment initialization, verification, refunds, customer management, and invoicing without requiring knowledge of specific provider implementations.
      2
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to interact with PayBridgeNP payment gateway accounts through natural language. Provides read-only access to payments, refunds, analytics, and account data, with write capabilities planned for future versions.
      24 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to access Magpie Payment Platform APIs for processing payments, creating checkout sessions, sending invoices, and managing payment links through natural conversation.
      68 npm
      2
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to securely create payment references and requests for Multibanco, MB WAY, Payshop, Credit Card, PinPay, Cofidis Pay, PIX, and retrieve payment reports.
      -