MCP.so
登录

Mpesa Daraja MCP Server

@jameskanyiri

基本信息

分类

其他

传输方式

stdio

作者

jameskanyiri

关于 Mpesa Daraja MCP Server

暂无概览

Mpesa Daraja MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mpesa_mcp_server": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        "venv"
      ]
    }
  }
}

Mpesa Daraja MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Mpesa Daraja MCP Server?

A Python-based server that implements the Mpesa Daraja API functionality using FastMCP. It provides a simple interface to interact with Safaricom's Mpesa Daraja API, starting with OAuth access token generation.

How to use Mpesa Daraja MCP Server?

  1. Install Python 3.7+, clone the repository, create and activate a virtual environment, and install dependencies with pip install -r requirements.txt. 2. Create a .env file with your Mpesa Daraja credentials: MPESA_CONSUMER_KEY, MPESA_CONSUMER_SECRET, PASSKEY, BUSINESS_SHORTCODE, and CALLBACK_URL. 3. Start the server by running python server.py. The server then listens for FastMCP client requests.

Key features of Mpesa Daraja MCP Server

  • OAuth token generation for Mpesa Daraja API
  • Secure credential management via environment variables
  • Comprehensive error handling and logging
  • FastMCP-based server implementation

Use cases of Mpesa Daraja MCP Server

  • Authenticating with Safaricom's Mpesa Daraja API for subsequent transactions
  • Automating access token refresh in M-Pesa integrations
  • Building AI-powered M-Pesa applications via the Model Context Protocol

常见问题

1

What does the Mpesa Daraja MCP Server do?

It generates OAuth access tokens for the Safaricom Mpesa Daraja API, handling authentication so you can make further API calls.

2

What are the prerequisites?

Python 3.7 or higher, Mpesa Daraja API credentials (Consumer Key and Secret), and pip.

3

What environment variables are required?

`MPESA_CONSUMER_KEY`, `MPESA_CONSUMER_SECRET`, `PASSKEY`, `BUSINESS_SHORTCODE`, and `CALLBACK_URL`.

4

How does the server communicate?

It uses the FastMCP protocol. You start `python server.py` and interact via a FastMCP client.

5

Where are credentials stored?

Credentials are read from a `.env` file in the project root, which is excluded from version control. All API communications use HTTPS.

评论

其他 分类下的更多 MCP 服务器