Enables payment processing operations including initializing payments, verifying transactions, processing refunds, and managing customers and invoices through Stripe's payment platform
Fin-MCP
Fin-MCP is a self-hosted, modular MCP that allows AI agents or enterprise systems to interact with multiple payment providers (e.g., Stripe, Paystack) via a single unified API. It abstracts the provider logic so agents can call payment operations seamlessly.
Features
- MCP for Payments: AI agents can perform payment actions without knowing provider details.
- Dynamic MCP tools: Initialize payment, verify payment, refund, create customers, and invoices.
- Optional authentication: Protect MCP access with API keys.
- Metadata endpoint: Agents can discover available tools and supported providers.
- Self-hosted MCP: Full control over deployments and provider credentials.
- Extensible: Add new tools or providers with minimal changes.
- Protocol-driven tool execution: Agents can call any tool via
/mcp/call
. - Provider abstraction: MCP selects or routes to the appropriate payment provider automatically (e.g., based on provider like stripe, based on currency (soon)).
Table of Contents
Installation
Install dependencies
Configuration
Create a .env
file in the root:
ENABLE_AUTH
: Set totrue
for secure access;false
for testing or private networks.FIN_MCP_KEY
: Your self-generated secret key.STRIPE_SECRET
: Stripe API secret for payment operations.
Running the MCP
Open http://localhost:3000 in your browser.
API Endpoints
1. Get Metadata
Agents discover available payment tools and providers
2. Call a Tool
Agents execute payment operations through the MCP protocol.
Headers (if auth enabled):
Body Example (Stripe Initialize Payment):
Response:
Adding New Providers
- Create a new adapter in
src/providers/
. - Implement the required interfaces (
PaymentProvider
, or extend specific tool interfaces). - Add the adapter to the provider registry (
src/providers/registry.ts
). - Update
metadata.ts
to include the new provider for relevant tools.
The MCP will automatically route calls based on the
provider
field in the request payload.
Development Notes
- Idempotency: Use
idempotency_key
in/mcp/call
to prevent duplicate operations. - Audit Logging: MCP logs every call via
logAudit()
for traceability. - Extensibility: You can define new tools without modifying the core callHandler — just add the tool interface and adapter implementation.
- Optional Authentication: Set
ENABLE_AUTH=false
for testing or private self-hosted environments.
License
MIT License — free to use and modify for your self-hosted deployments.
💡 Optional Add-ons
- Integrate AI agents to call
/mcp/call
dynamically. - Add support for webhooks from payment providers.
- Add fully typed output interfaces for each provider to eliminate
any
responses.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
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.