About Paystack Python MCP
Paystack Python MCP is an MCP server published by thisishaykins in the Developer Tools category: a Paystack API Python MCP Server.
The repository has 14 stars and 3 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/thisishaykins/paystack-python-mcpThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Tools (43)
balance.ledgerRetrieves the balance ledger from a Paystack account.
Parameters not published.
balance.readRetrieves the balance from a Paystack account.
Parameters not published.
customer.createCreates a new customer.
Parameters not published.
customer.listRetrieves a list of all customers.
Parameters not published.
customer.readFetches the details of a specific customer.
Parameters not published.
customer.updateUpdates the details of a specific customer.
Parameters not published.
dispute.add_evidenceAdds evidence to a dispute.
Parameters not published.
dispute.downloadDownloads a list of disputes with optional filters.
Parameters not published.
dispute.listRetrieves a list of all disputes.
Parameters not published.
dispute.readFetches the details of a specific dispute.
Parameters not published.
Show all 43 tools
dispute.resolveResolves a dispute.
Parameters not published.
invoice.createCreates a new invoice.
Parameters not published.
invoice.listRetrieves a list of all invoices.
Parameters not published.
payment_page.add_productsAdds products to a specific payment page.
Parameters not published.
payment_page.createCreates a new payment page.
Parameters not published.
payment_page.disableDisables a specific payment page.
Parameters not published.
payment_page.enableEnables a specific payment page.
Parameters not published.
payment_page.listRetrieves a list of all payment pages.
Parameters not published.
payment_page.readFetches the details of a specific payment page.
Parameters not published.
payment_page.updateUpdates the details of a specific payment page.
Parameters not published.
plan.createCreates a new subscription plan.
Parameters not published.
plan.listRetrieves a list of all subscription plans.
Parameters not published.
plan.readFetches the details of a specific subscription plan.
Parameters not published.
product.createCreates a new product.
Parameters not published.
product.deleteDeletes a specific product.
Parameters not published.
product.listRetrieves a list of all products.
Parameters not published.
product.readFetches the details of a specific product.
Parameters not published.
product.updateUpdates the details of a specific product.
Parameters not published.
refund.createCreates a new refund.
Parameters not published.
subscription.disableDisables a subscription.
Parameters not published.
subscription.listRetrieves a list of all subscriptions.
Parameters not published.
transaction.downloadDownloads a list of transactions with optional filters.
Parameters not published.
transaction.initializeInitializes a new transaction.
Parameters not published.
transaction.listRetrieves a list of all transactions.
Parameters not published.
transaction.readFetches the details of a specific transaction.
Parameters not published.
transaction.timelineRetrieves the timeline of a specific transaction.
Parameters not published.
transaction.verifyVerifies the status of a transaction.
Parameters not published.
verification.fetch_banksFetches a list of banks.
Parameters not published.
verification.list_avsLists all available account verification services.
Parameters not published.
verification.list_countriesRetrieves a list of all countries.
Parameters not published.
verification.resolve_account_numberResolves an account number to get the account holder's name.
Parameters not published.
verification.resolve_bvnResolves a BVN to get the associated account details.
Parameters not published.
verification.resolve_card_binResolves a card BIN to get the associated card details.
Parameters not published.
Ask AI
Ask AI about Paystack Python MCP
Powered by Claude · Grounded in docs
Security checks
Static checks derived from the repository 5 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository ships documentation.
- ✓License declaredUsable under a stated license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
README
Paystack MCP Server
This project is a Model Context Protocol server for the Paystack API. It provides a set of tools that can be used by AI assistants and other automated systems to interact with Paystack in a structured way. This allows for the automation of tasks suchs as creating customers, managing products, initiating transactions, and many other tasks.
This server is built using the official paystack-sdk for Python and FastMCP for the server implementation.
Features
- A comprehensive set of tools for interacting with the Paystack API.
- Easy to extend with new tools and functionality.
- Includes a
Dockerfilefor easy containerization and deployment.
Installation
This project uses uv for dependency management. To install the necessary packages, follow these steps:
-
Clone the repository:
git clone https://github.com/thisishaykins/paystack-python-mcp cd paystack-python-mcp -
Create a virtual environment:
uv venv -
Activate the virtual environment:
source .venv/bin/activate -
Install the dependencies:
uv pip install -e .
Setup
To use the Paystack MCP server, you need to provide your Paystack API key. The server is configured to read the API key from an environment variable.
- Create a
.envfile in the root of the project. - Add your API key to the
.envfile:PAYSTACK_API_KEY=sk_your_secret_key
Running the Server
To run the MCP server, execute the following command from the root of the project:
uv run main.py # or python main.py
The server will start and listen for requests on stdio.
Or run using MCP inspector or in dev mode
uv run mcp dev main.py
Available Tools
The following tools are available through the MCP server:
| Tool | Description |
|---|---|
balance.read |
Retrieves the balance from a Paystack account. |
balance.ledger |
Retrieves the balance ledger from a Paystack account. |
customer.create |
Creates a new customer. |
customer.list |
Retrieves a list of all customers. |
customer.read |
Fetches the details of a specific customer. |
customer.update |
Updates the details of a specific customer. |
dispute.add_evidence |
Adds evidence to a dispute. |
dispute.list |
Retrieves a list of all disputes. |
dispute.read |
Fetches the details of a specific dispute. |
dispute.download |
Downloads a list of disputes with optional filters. |
dispute.resolve |
Resolves a dispute. |
invoice.create |
Creates a new invoice. |
invoice.list |
Retrieves a list of all invoices. |
payment_page.create |
Creates a new payment page. |
payment_page.list |
Retrieves a list of all payment pages. |
payment_page.read |
Fetches the details of a specific payment page. |
payment_page.update |
Updates the details of a specific payment page. |
payment_page.disable |
Disables a specific payment page. |
payment_page.enable |
Enables a specific payment page. |
payment_page.add_products |
Adds products to a specific payment page. |
plan.create |
Creates a new subscription plan. |
plan.list |
Retrieves a list of all subscription plans. |
plan.read |
Fetches the details of a specific subscription plan. |
product.create |
Creates a new product. |
product.list |
Retrieves a list of all products. |
product.read |
Fetches the details of a specific product. |
product.update |
Updates the details of a specific product. |
product.delete |
Deletes a specific product. |
refund.create |
Creates a new refund. |
subscription.disable |
Disables a subscription. |
subscription.list |
Retrieves a list of all subscriptions. |
transaction.initialize |
Initializes a new transaction. |
transaction.list |
Retrieves a list of all transactions. |
transaction.read |
Fetches the details of a specific transaction. |
transaction.verify |
Verifies the status of a transaction. |
transaction.timeline |
Retrieves the timeline of a specific transaction. |
transaction.download |
Downloads a list of transactions with optional filters. |
verification.fetch_banks |
Fetches a list of banks. |
verification.list_avs |
Lists all available account verification services. |
verification.list_countries |
Retrieves a list of all countries. |
verification.resolve_account_number |
Resolves an account number to get the account holder's name. |
verification.resolve_bvn |
Resolves a BVN to get the associated account details. |
verification.resolve_card_bin |
Resolves a card BIN to get the associated card details. |
Usage with an AI Assistant (e.g., Claude)
You can connect this MCP server to an AI assistant like Claude to allow it to perform actions on your behalf. The assistant can call the tools by sending a JSON-RPC request to the server.
Usage with Claude Desktop, cursor, or any other Agent
Add the following to your claude_desktop_config.json. See here for more details.
{
"mcpServers": {
"paystack": {
"command": "uv",
"args": [
"--directory",
"/path/to/paystack-python-mcp",
"run",
"main.py"
]
}
}
}
Here is an example of how Claude could use the customer.create tool:
User: "Please create a new customer with the email address 'test@example.com' and the name 'Test User'."
Claude's Thought Process: "The user wants to create a new customer. I will use the customer.create tool. I need to extract the email, first name, and last name from the user's request."
Claude's Tool Call:
{
"tool_name": "customer.create",
"parameters": {
"email": "test@example.com",
"first_name": "Test",
"last_name": "User"
}
}
The MCP server would then execute the tool and return the result to Claude.
Build using Docker
This project includes a Dockerfile to make it easy to build and run the server in a container.
-
Build the Docker image:
docker build -t paystack-mcp-server . -
Run the Docker container:
docker run -it --rm -e PAYSTACK_API_KEY=sk_your_secret_key paystack-mcp-server
This will start the server inside a Docker container.
Debugging the Server
To debug your server, you can use the MCP Inspector.
Run the following command in your terminal:
# Start MCP Inspector and server with all tools
uv run mcp dev main.py
Instructions
- Replace
PAYSTACK_API_KEYwith your actual Paystack API secret key. - Run the command to start the MCP Inspector.
- Open the MCP Inspector UI in your browser and click Connect to start the MCP server.
- You can see the list of tools you selected and test each tool individually.
Advanced Usage
This Paystack MCP Server can be extended to covering more primitives, capabilities available on the MCP Server.
MCP Primitives
The MCP protocol defines three core primitives that servers can implement:
| Primitive | Control | Description | Example Use |
|---|---|---|---|
| Prompts | User-controlled | Interactive templates invoked by user choice | Slash commands, menu options |
| Resources | Application-controlled | Contextual data managed by the client application | File contents, API responses |
| Tools | Model-controlled | Functions exposed to the LLM to take actions | API calls, data updates |
Server Capabilities
MCP servers declare capabilities during initialization:
| Capability | Feature Flag | Description |
|---|---|---|
prompts |
listChanged |
Prompt template management |
resources |
subscribelistChanged |
Resource exposure and updates |
tools |
listChanged |
Tool discovery and execution |
logging |
- | Server logging configuration |
completions |
- | Argument completion suggestions |
Documentation
- Paystack Python SDK Reference
- Paystack API Reference
- Model Context Protocol API Reference
- Model Context Protocol documentation
- Model Context Protocol specification
- Officially MCP supported servers
Contributing
We are passionate about supporting contributors of all levels of experience and would love to see you get involved in the project. See the contributing guide to get started.
License
This project is licensed under the MIT License - see the LICENSE file for details.
README fetched from the repository 5 days ago. The original is authoritative.