Veri5ied

Fin-MCP

Community Veri5ied
Updated

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.

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
  • Configuration
  • Running the MCP
  • API Endpoints
  • Adding New Providers
  • Development Notes
  • License

Installation

git clone https://github.com/Veri5ied/fin-mcp.git
cd fin-mcp

Install dependencies

bun install

Configuration

Create a .env file in the root:

# Enable or disable API key authentication
ENABLE_AUTH=false

# API key for auth (only used if ENABLE_AUTH=true)
FIN_MCP_KEY=supersecret-fin-key

# Stripe secret key (required for Stripe provider)
STRIPE_SECRET=sk_test_1234567890
  • ENABLE_AUTH: Set to true 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

bun run dev

Open http://localhost:3000 in your browser.

API Endpoints

1. Get Metadata

GET /mcp/metadata

Agents discover available payment tools and providers

{
  "tools": [
    {
      "name": "initialize_payment",
      "description": "Start a payment",
      "providers": ["stripe", "paystack"]
    }
  ]
}

2. Call a Tool

POST /mcp/call

Agents execute payment operations through the MCP protocol.

Headers (if auth enabled):

Authorization: Bearer <FIN_MCP_KEY>
Content-Type: application/json

Body Example (Stripe Initialize Payment):

{
  "tool": "initialize_payment",
  "input": {
    "provider": "stripe",
    "amount": 5000,
    "currency": "USD",
    "email": "[email protected]"
  },
  "idempotency_key": "unique-key-123"
}

Response:

{
  "status": "ok",
  "result": {
    "id": "cs_test_1234",
    "object": "checkout.session"
  }
}

Adding New Providers

  1. Create a new adapter in src/providers/.
  2. Implement the required interfaces (PaymentProvider, or extend specific tool interfaces).
  3. Add the adapter to the provider registry (src/providers/registry.ts).
  4. 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.

MCP Server · Populars

MCP Server · New

    bibinprathap

    veritasgraph

    VeritasGraph — open-source Knowledge Graph & GraphRAG framework on GitHub. Build multi-hop reasoning, ontology-aware retrieval, and verifiable attribution over your own data. Nodes, edges, RDF, linked-data — runs locally or in the cloud.

    Community bibinprathap
    sher1096

    KLinePic MCP Server and Agent API Examples

    MCP server and OpenAPI examples for AI agents that turn broker and exchange fills into annotated KLinePic trade-review charts

    Community sher1096
    zerx-lab

    FluxDown

    Rust 驱动的多协议下载管理器,支持 HTTP/FTP/BitTorrent 磁力链接及 HLS/DASH 流媒体,智能多线程加速与浏览器无缝集成。精美界面,极致性能,永久免费,零广告。

    Community zerx-lab
    MasihMoafi

    Project Elpis:

    You put an agent into an Elpis, and it becomes Elpis; Be Elpis my friend.

    Community MasihMoafi
    ROCTUP

    1C Metacode MCP Server

    MCP сервер с встроенным AI агентом для поиска по графу метаданных и кода конфигураций 1С

    Community ROCTUP