This project provides Model Context Protocol (MCP) servers for interacting with the Apache Fineract API, enabling AI agents to access financial data and operations. Implementations are available in Python, Java (Quarkus), and Node.js.
Use the MCP Inspector to test and debug your server:
npx @modelcontextprotocol/inspector
This starts a local web UI to connect to your MCP server via STDIO or SSE.
Prerequisites: Python 3.8+, flask
, mcp.server.fastmcp
Steps:
- Install dependencies:
pip install mcp[cli] uv flask
- Run the server:
mcp dev app.py
Prerequisites: JDK 17+, Maven
Steps:
- Configure environment variables in your shell or IDE:
export MIFOSX_BASE_URL="https://your-fineract-instance" export MIFOSX_BASIC_AUTH_TOKEN="your_api_token" export MIFOS_TENANT_ID="default"
- Run via JBang (for quick execution):
jbang --quiet org.mifos.community.ai:mcp-server:1.0.0-SNAPSHOT:runner
- (Optional) Build a native executable:
./mvnw package -Dnative ./target/mcp-server-1.0.0-SNAPSHOT-runner
Prerequisites: Node.js 16+, npm
Steps:
- Install dependencies:
cd nodejs && npm install
- Configure environment variables in
.env
:cp .env.example .env
- Run the server:
npm run dev
- Test with the built-in
inspect
script:npm run inspect
All implementations require the following environment variables:
Variable | Description |
---|---|
FINERACT_BASE_URL |
Base URL of your Fineract instance |
FINERACT_BASIC_AUTH_TOKEN |
API authentication token |
FINERACT_TENANT_ID |
Tenant identifier (default: default ) |
Note: Java uses MIFOSX_
prefixed variables (e.g., MIFOSX_BASE_URL
).
The MCP server exposes these resources:
fineract://clients
List all clientsfineract://clients/{clientId}
Get details for a specific clientfineract://loans
List all loansfineract://loans/{loanId}
Get details for a specific loan
search_clients
Search clients by name/attributescreate_client
Create a new client (Node.js/Python only)update_loan_status
Update loan status (Java/Python only)
For Java (Quarkus), create a native executable:
./mvnw package -Dnative -Dquarkus.native.container-build=true
./target/mcp-server-1.0.0-SNAPSHOT-runner
- Start your MCP server (Python/Java/Node.js).
- Run the inspector:
npx @modelcontextprotocol/inspector
- Connect to the server using the
STDIO
transport.
- Python: Modify
python/app.py
andserver.js
for new resources. - Java: Extend
src/main/java/org/mifos/community/ai/...
for new endpoints. - Node.js: Update
nodejs/src/server.js
and add Zod schemas for validation.
- Apache Fineract Community: https://community.apache.org/
- MCP Specification: https://modelcontextprotocol.org
- Java/Quarkus: Quarkus MCP Guide
- Node.js: Use
npm run inspect
for live reloading - Python: Run with
python app.py
and configure.env
- Standardized API access via
fineract://
URIs - MCP-compliant with STDIO/SSE transports
- Environment-agnostic configuration