Configure

The Rafiki Model Context Protocol (MCP) server enables AI-powered code editors like Cursor and Windsurf, plus general-purpose tools like Claude Desktop, to interact directly with your Rafiki documentation.

What is MCP?

Model Context Protocol (MCP) is an open standard that allows AI applications to securely access external data sources and tools. The Rafiki MCP server provides AI agents with:

  • Documentation search capabilities
  • Code generation assistance for Rafiki API integrations

MCP Server Setup

Rafiki's documentation hosts a remote MCP server at https://docs.rafiki-api.com/mcp.

Add to~/.cursor/mcp.json:

{
  "mcpServers": {
    "rafiki-api-documentation": {
      "url": "https://docs.rafiki-api.com/mcp"
    }
  }
}

Testing Your MCP Setup

Once configured, you can test your MCP server connection:

  1. Open your AI editor (Cursor, Windsurf, etc.)
  2. Start a new chat with the AI assistant
  3. Ask about Rafiki documentation - try questions like:
    • "How do I send money to an M-Pesa number in Kenya?"
    • "Show me how to create a payout and a payment account in a single request"
    • "Create a Node.js script to check the status of a payout using Rafiki"
    • "What countries do you offer lookups in?"
    • "Give me the supported mobile money operators in Tanzania"

The AI should now have access to the Rafiki documentation through the MCP server - happy prompting!