Get the FREE Ultimate OpenClaw Setup Guide →

paylink

A payment framework that helps developers easily integrate payments into their AI agents and apps.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio payelink-paylink python server.py \
  --env PAYLINK_ENV="Provide or placeholder for environment-specific configuration (e.g., provider keys, webhook secrets)"

How to use

PayLink is an MCP server that provides a unified, provider-agnostic interface for initiating and managing payments across multiple payment providers (starting with M-Pesa and expansion to Airtel Money, Equity Bank, and KCB). The server exposes a consistent MCP-native API so AI agents can request actions like creating payments, tracking status, and handling callbacks without embedding provider-specific logic. To run locally, clone the repository, navigate to the PayLink server directory, install dependencies, and start the Python server. Once running, you can use the MCP protocol to issue payment requests, check statuses, and retrieve transaction details through the same interface across providers.

Key capabilities include: unified payment initiation across providers, secure credential management, and production-ready workflows for agent-driven payments. The server is designed to integrate with AI agents via MCP, sample documents and examples under examples/ illustrate how to structure intents, prompts, and responses around payments. You can experiment with M-Pesa first (as indicated by the Quick Start), then extend your agent logic to additional providers as they come online.

How to install

Prerequisites:

  • Python 3.8 or newer
  • Git
  • Internet access to install dependencies

Installation steps:

  1. Clone the repository git clone https://github.com/paylinkmcp/paylink.git cd paylink

  2. Navigate to the PayLink MCP server (M-Pesa example) cd mcp_servers/mpesa

  3. Create and (optionally) activate a virtual environment python -m venv venv source venv/bin/activate # macOS/Linux .\venv\Scripts\activate # Windows

  4. Install dependencies pip install -r requirements.txt

  5. Run the server python server.py

  6. Verify the server is running (it should expose MCP endpoints as documented in the project docs)

Additional notes

Tips and considerations:

  • Environment variables: securely provide provider credentials and any required secrets via env vars (e.g., provider API keys, webhook secrets). The example configuration includes a placeholder PAYLINK_ENV to remind you to set environment-specific values.
  • If you plan to run multiple providers or environments, consider separating configs and using a robust secret management approach.
  • The repository emphasizes MCP-native workflows; ensure your agent prompts align with MCP expectations so the agent can issue payments, obtain statuses, and handle callbacks consistently.
  • When using Docker or other runtimes, you may adapt the commands to a docker-compose setup as shown in the Quick Start, especially for local testing with M-Pesa.
  • If you encounter issues with dependencies, ensure you are using a Python version compatible with the server requirements and that network access to provider APIs is available.

Related MCP Servers

Sponsor this space

Reach thousands of developers ↗