Mpesa Daraja

Provides up-to-date Daraja API documentation and tools for searching, summarizing, and comparing 22 APIs via an MCP server.
  • typescript

7

GitHub Stars

typescript

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jackscodevault-mpesa-daraja-mcp": {
      "command": "docker",
      "args": [
        "exec",
        "-i",
        "daraja-mcp-server",
        "node",
        "dist/index.js"
      ]
    }
  }
}

You run a purpose-built MCP server that exposes Safaricom's Daraja API documentation to AI assistants. It centralizes 22 APIs into searchable tools, letting you discover, summarize, and compare endpoints directly from your editor or client. The server supports Docker-based deployment or native builds, and it auto-discovers documentation paths for quick setup.

How to use

Use an MCP client to connect to the Daraja documentation server. The server exposes six core tools that empower you to search APIs, retrieve full documentation, list APIs by category, view enhanced summaries, monitor server usage, and compare APIs side-by-side. You can run queries like: search APIs by keyword, fetch the complete documentation for a specific API, or generate summaries with endpoint details. Once connected, you can browse the 22 APIs organized into six categories and fetch the exact sections you need for integration work, testing, or learning.

How to install

Prerequisites include Docker for the easiest setup, or Python 3.8+ for the scraper and Node.js 18+ for the MCP server if you choose a native installation. You should also have Git installed to clone the project.

# Docker Deployment (recommended)
cd mpesa-daraja-mcp
pnpm run docker:build
pnpm run docker:start

# Native Installation
# Install and configure locally
# Python setup for scraper
# Native MCP server build (Node.js)
pnpm install
pnpm run build

Configuration

If you deploy via Docker, you can configure the MCP server connection as shown in the example below. This configuration allows you to run the MCP inside a container and connect to the running server using Docker-based execution of the API documentation viewer.

{
  "mcpServers": {
    "daraja-docs": {
      "command": "docker",
      "args": ["exec", "-i", "daraja-mcp-server", "node", "dist/index.js"],
      "disabled": false,
      "autoApprove": [
        "search_daraja_apis",
        "get_daraja_api_doc",
        "list_apis_by_category",
        "get_api_summary",
        "get_server_stats",
        "compare_apis"
      ]
    }
  }
}

" ,

## Troubleshooting

If you encounter issues starting the MCP server, verify container status, confirm the documentation path is mounted, and check logs for errors. For Docker-based setups, ensure the container is running, and test MCP tools directly inside the container if needed. For native installations, rebuild the server and verify TypeScript compilation succeeded before running in dev or production modes.

## Notes on deployment and usage tips

The server automatically detects documentation locations such as the mounted directory, current working directory, or the Docker container path. Use the provided MCP tools to perform full-text searches, retrieve exact API documentation, and compare endpoints. Ensure your environment variables and network access align with your security and compliance requirements.

## Available tools

### search\_daraja\_apis

Advanced search with category filtering to locate APIs by keyword, category, or endpoints.

### get\_daraja\_api\_doc

Retrieve complete API documentation for a selected Daraja API including parameters, endpoints, and examples.

### list\_apis\_by\_category

Organize APIs by category to quickly browse related functionalities.

### get\_api\_summary

Provide quick summaries of APIs with key endpoints and usage notes.

### get\_server\_stats

Return usage statistics and health information for the MCP server.

### compare\_apis

Side-by-side comparison of multiple APIs focusing on endpoints and authentication.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational