Microfinance Warehouse MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Read-only access to a microfinance loan-portfolio warehouse (synthetic data, snapshot 2025-12-31). For standard indicators (PAR30, PAR90, outstanding portfolio, disbursements, write-offs, on-time repayment) use compute_kpi: it applies the official definitions. Use run_sql only for questions the KPIs do not cover; call list_tables and get_glossary first. Always state the definition and date used.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_tablesB | The warehouse schema: every table with its columns, types and short descriptions. |
| get_glossaryA | Official definitions of the business KPIs, the dimensions they can be split by, and the loan_position(date) SQL macro that implements outstanding principal and days overdue. |
| compute_kpiA | Compute an official KPI. kpi: one of outstanding_portfolio, par30, par90, active_loans, active_clients, disbursed_amount, disbursed_loans, average_loan_size, written_off_amount, on_time_repayment_rate. as_of: date for snapshot KPIs (YYYY-MM-DD, default 2025-12-31). start, end: period for flow KPIs (YYYY-MM-DD, inclusive). group_by: dimensions among branch, governorate, region, product, segment, gender, sector, and for flow KPIs month, quarter, year. filters: dimension -> value, e.g. {"region": "South"}. |
| run_sqlA | Run one read-only DuckDB SELECT query (at most 200 rows returned). Only warehouse tables and the loan_position(DATE 'YYYY-MM-DD') macro can be read. Writes, file access and settings are refused with an explanation. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| portfolio_review | A ready-made request for a portfolio-quality review. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| glossary_resource | KPI definitions (same content as get_glossary). |
TDQS
Scored across 4 tools
Each tool occupies a clearly distinct layer: schema introspection (list_tables), business semantics (get_glossary), governed metric computation (compute_kpi), and ad-hoc exploration (run_sql). The only potential confusion—compute_kpi vs run_sql—is explicitly resolved, since one is the official KPI path and the other is a raw read-only query escape hatch.
All four names follow a strict snake_case verb_noun pattern (list_tables, get_glossary, compute_kpi, run_sql). The verbs are meaningful and non-overlapping, so the convention is both consistent and self-documenting.
Four tools is lean but fully justified for a warehouse/KPI server: metadata, definitions, governed metrics, and a general query fallback, with no redundant or filler tools. The surface is compact yet capable of answering any read-only analytical question.
The lifecycle is well covered—discover schema, understand KPIs, compute them, and fall back to SQL for anything else—with no obvious dead ends. Minor gaps include no tool to enumerate available filter values (e.g. known regions/branches) or relationship/join metadata, though both can be worked around via run_sql or list_tables.