remit-mcp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Gabriel Mahia / AI Kung Fu LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and to deal in the Software without restriction, provided the copyright notice is included in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND.
@@ -0,0 +1,49 @@
1
+ Metadata-Version: 2.4
2
+ Name: remit-mcp
3
+ Version: 0.1.0
4
+ Summary: MCP server for Kenya diaspora remittance optimization
5
+ Author-email: Gabriel Mahia <contact@aikungfu.dev>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/gabrielmahia/remit-mcp
8
+ Project-URL: Repository, https://github.com/gabrielmahia/remit-mcp
9
+ Keywords: mcp,remittance,kenya,diaspora,fintech,east-africa
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Office/Business :: Financial
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: fastmcp>=0.9
19
+ Requires-Dist: requests>=2.31
20
+ Dynamic: license-file
21
+
22
+ # 💸 remit-mcp
23
+
24
+ **First MCP server for African diaspora remittance optimization.**
25
+
26
+ ```bash
27
+ pip install remit-mcp
28
+ remit-mcp
29
+ ```
30
+
31
+ ## Tools
32
+ | Tool | What it does |
33
+ |------|-------------|
34
+ | `compare_remittance_corridors` | Compare all providers for US→KE, UK→KE, CA→KE corridors |
35
+ | `estimate_savings` | Calculate annual savings by switching providers |
36
+ | `list_corridors` | List all supported corridors |
37
+
38
+ ## Research Basis
39
+ - **World Bank Remittance Prices Worldwide** — Global database of corridor costs. SDG target: reduce to 3% by 2030. Current global average: 6.3%. Kenya corridors: 4.1–9.1%.
40
+ - **World Bank Migration & Development Brief 2025** — Kenya received USD 4.2B in remittances in 2024. Top-10 African recipient.
41
+ - **"Democratizing AI in Africa"** arXiv:2408.17216 — AI tools for financial inclusion in resource-constrained settings.
42
+ - **IrokoBench** arXiv:2406.03368 — Swahili AI capability benchmark; multilingual financial AI for Africa.
43
+
44
+ ## DEMO Note
45
+ Current data is synthetic, representative of World Bank RPW Kenya corridor patterns.
46
+ Real implementation queries: remittanceprices.worldbank.org API + live FX feeds.
47
+
48
+ ---
49
+ *© 2026 Gabriel Mahia / AI Kung Fu LLC · MIT License*
@@ -0,0 +1,28 @@
1
+ # 💸 remit-mcp
2
+
3
+ **First MCP server for African diaspora remittance optimization.**
4
+
5
+ ```bash
6
+ pip install remit-mcp
7
+ remit-mcp
8
+ ```
9
+
10
+ ## Tools
11
+ | Tool | What it does |
12
+ |------|-------------|
13
+ | `compare_remittance_corridors` | Compare all providers for US→KE, UK→KE, CA→KE corridors |
14
+ | `estimate_savings` | Calculate annual savings by switching providers |
15
+ | `list_corridors` | List all supported corridors |
16
+
17
+ ## Research Basis
18
+ - **World Bank Remittance Prices Worldwide** — Global database of corridor costs. SDG target: reduce to 3% by 2030. Current global average: 6.3%. Kenya corridors: 4.1–9.1%.
19
+ - **World Bank Migration & Development Brief 2025** — Kenya received USD 4.2B in remittances in 2024. Top-10 African recipient.
20
+ - **"Democratizing AI in Africa"** arXiv:2408.17216 — AI tools for financial inclusion in resource-constrained settings.
21
+ - **IrokoBench** arXiv:2406.03368 — Swahili AI capability benchmark; multilingual financial AI for Africa.
22
+
23
+ ## DEMO Note
24
+ Current data is synthetic, representative of World Bank RPW Kenya corridor patterns.
25
+ Real implementation queries: remittanceprices.worldbank.org API + live FX feeds.
26
+
27
+ ---
28
+ *© 2026 Gabriel Mahia / AI Kung Fu LLC · MIT License*
@@ -0,0 +1,31 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "remit-mcp"
7
+ version = "0.1.0"
8
+ description = "MCP server for Kenya diaspora remittance optimization"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ authors = [{ name = "Gabriel Mahia", email = "contact@aikungfu.dev" }]
12
+ keywords = ["mcp", "remittance", "kenya", "diaspora", "fintech", "east-africa"]
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ "Topic :: Office/Business :: Financial",
19
+ ]
20
+ requires-python = ">=3.10"
21
+ dependencies = ["fastmcp>=0.9", "requests>=2.31"]
22
+
23
+ [project.scripts]
24
+ remit-mcp = "remit_mcp.server:main"
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/gabrielmahia/remit-mcp"
28
+ Repository = "https://github.com/gabrielmahia/remit-mcp"
29
+
30
+ [tool.setuptools.packages.find]
31
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,2 @@
1
+ """remit-mcp — Kenya diaspora remittance optimization MCP server."""
2
+ __version__ = "0.1.0"
@@ -0,0 +1,204 @@
1
+ """
2
+ remit-mcp — Diaspora Remittance Intelligence MCP Server
3
+ Copyright (c) 2026 Gabriel Mahia / AI Kung Fu LLC. MIT License.
4
+
5
+ Research basis:
6
+ World Bank Remittance Prices Worldwide database (remittanceprices.worldbank.org)
7
+ "Democratizing AI in Africa" arXiv:2408.17216 — federated AI for underserved populations
8
+ IrokoBench arXiv:2406.03368 — African language AI capability benchmark
9
+ World Bank "Migration and Development Brief" 2025 — Kenya top-10 remittance recipient
10
+
11
+ First in Africa: MCP server exposing remittance corridor intelligence for AI agents.
12
+ Kenya received USD 4.2B in remittances in 2024 (World Bank Migration Brief 2025).
13
+ 35% of corridor fees go to intermediaries — this server helps minimize that.
14
+ """
15
+
16
+ import os
17
+ import hashlib
18
+ import logging
19
+ import json
20
+ from datetime import datetime, timezone
21
+ from typing import Annotated
22
+ from fastmcp import FastMCP
23
+
24
+ logging.basicConfig(level=logging.INFO, format="%(levelname)s %(name)s: %(message)s")
25
+ _log = logging.getLogger("remit-mcp")
26
+
27
+ mcp = FastMCP(
28
+ name="remit-mcp",
29
+ version="0.1.0",
30
+ instructions=(
31
+ "Kenya diaspora remittance intelligence. "
32
+ "Compare corridor costs, find optimal timing windows, and estimate fees across providers. "
33
+ "Data: World Bank RPW database + public exchange rate APIs. "
34
+ "DEMO: Synthetic pricing data representative of Kenya corridor patterns. "
35
+ "Not financial advice — verify live rates before sending."
36
+ )
37
+ )
38
+
39
+ def _audit(tool, params, outcome):
40
+ safe = {k: hashlib.sha256(str(v).encode()).hexdigest()[:8] + "..."
41
+ if k in {"phone","account","email"} else str(v)
42
+ for k, v in params.items()}
43
+ _log.info("TOOL=%s PARAMS=%s OUTCOME=%s", tool, safe, outcome)
44
+
45
+ # ── DEMO pricing data ─────────────────────────────────────────────────────────
46
+ # Source: "DEMO — Synthetic data representative of World Bank RPW Kenya corridor (2024-2026)"
47
+ # Real data: remittanceprices.worldbank.org/en/corridor/United-States/Kenya
48
+ CORRIDORS = {
49
+ "US_KE": {
50
+ "name": "USA → Kenya",
51
+ "providers": [
52
+ {"name": "M-PESA Global (Safaricom)", "fee_usd": 4.99, "rate_premium_pct": 0.8,
53
+ "delivery": "Instant", "method": "Mobile money", "min_usd": 10, "max_usd": 2000,
54
+ "world_bank_avg_pct": 6.5},
55
+ {"name": "WorldRemit", "fee_usd": 3.99, "rate_premium_pct": 1.2,
56
+ "delivery": "Minutes", "method": "Mobile money/Bank", "min_usd": 5, "max_usd": 3000,
57
+ "world_bank_avg_pct": 5.8},
58
+ {"name": "Wise", "fee_usd": 4.50, "rate_premium_pct": 0.4,
59
+ "delivery": "1-2 days", "method": "Bank account", "min_usd": 50, "max_usd": 10000,
60
+ "world_bank_avg_pct": 4.1},
61
+ {"name": "Remitly", "fee_usd": 2.99, "rate_premium_pct": 1.8,
62
+ "delivery": "3-5 days", "method": "Economy/Express", "min_usd": 15, "max_usd": 5000,
63
+ "world_bank_avg_pct": 5.9},
64
+ {"name": "Western Union", "fee_usd": 7.99, "rate_premium_pct": 2.1,
65
+ "delivery": "Minutes", "method": "Cash/Mobile/Bank", "min_usd": 1, "max_usd": 2500,
66
+ "world_bank_avg_pct": 8.7},
67
+ {"name": "MoneyGram", "fee_usd": 8.99, "rate_premium_pct": 2.3,
68
+ "delivery": "Minutes", "method": "Cash/Bank", "min_usd": 1, "max_usd": 2500,
69
+ "world_bank_avg_pct": 9.1},
70
+ ]
71
+ },
72
+ "UK_KE": {
73
+ "name": "UK → Kenya",
74
+ "providers": [
75
+ {"name": "M-PESA Global (Vodacom UK)", "fee_gbp": 1.99, "rate_premium_pct": 0.6,
76
+ "delivery": "Instant", "method": "Mobile money", "min_usd": 10, "max_usd": 2000,
77
+ "world_bank_avg_pct": 5.2},
78
+ {"name": "Wise", "fee_gbp": 3.20, "rate_premium_pct": 0.4,
79
+ "delivery": "Same day", "method": "Bank/M-PESA", "min_usd": 50, "max_usd": 10000,
80
+ "world_bank_avg_pct": 4.8},
81
+ {"name": "WorldRemit", "fee_gbp": 1.99, "rate_premium_pct": 1.1,
82
+ "delivery": "Minutes", "method": "Mobile money", "min_usd": 5, "max_usd": 3000,
83
+ "world_bank_avg_pct": 5.5},
84
+ ]
85
+ },
86
+ "CA_KE": {
87
+ "name": "Canada → Kenya",
88
+ "providers": [
89
+ {"name": "Wise", "fee_cad": 5.50, "rate_premium_pct": 0.5,
90
+ "delivery": "1-2 days", "method": "Bank account", "min_usd": 50, "max_usd": 10000,
91
+ "world_bank_avg_pct": 5.1},
92
+ {"name": "WorldRemit", "fee_cad": 3.99, "rate_premium_pct": 1.3,
93
+ "delivery": "Minutes", "method": "Mobile money", "min_usd": 5, "max_usd": 3000,
94
+ "world_bank_avg_pct": 6.0},
95
+ ]
96
+ }
97
+ }
98
+
99
+ @mcp.tool(annotations={
100
+ "readOnlyHint": True, "destructiveHint": False, "idempotentHint": True
101
+ })
102
+ def compare_remittance_corridors(
103
+ corridor: Annotated[str, "Corridor code: US_KE, UK_KE, CA_KE"],
104
+ amount_usd: Annotated[float, "Amount in USD to send (or equivalent)"] = 200.0
105
+ ) -> dict:
106
+ """
107
+ Compare all providers for a remittance corridor.
108
+ Returns fees, exchange rate premium, total cost, and World Bank benchmark.
109
+ Data: DEMO — synthetic representative of World Bank RPW Kenya corridors (2024-2026).
110
+ """
111
+ _audit("compare_remittance_corridors", {"corridor": corridor, "amount_usd": amount_usd}, "FETCH")
112
+
113
+ if corridor not in CORRIDORS:
114
+ return {"error": f"Corridor {corridor} not supported. Available: {list(CORRIDORS.keys())}"}
115
+
116
+ corridor_data = CORRIDORS[corridor]
117
+ providers = corridor_data["providers"]
118
+ results = []
119
+
120
+ for p in providers:
121
+ fee = p.get("fee_usd") or p.get("fee_gbp") or p.get("fee_cad") or 0.0
122
+ # Total cost = flat fee + exchange rate premium on amount
123
+ rate_cost = amount_usd * p["rate_premium_pct"] / 100
124
+ total_cost = fee + rate_cost
125
+ total_cost_pct = (total_cost / amount_usd * 100) if amount_usd else 0
126
+ wb_avg = p.get("world_bank_avg_pct", 6.0)
127
+
128
+ results.append({
129
+ "provider": p["name"],
130
+ "flat_fee_usd": round(fee, 2),
131
+ "exchange_premium_pct": p["rate_premium_pct"],
132
+ "total_cost_usd": round(total_cost, 2),
133
+ "total_cost_pct": round(total_cost_pct, 2),
134
+ "vs_wb_benchmark": "BELOW avg ✅" if total_cost_pct < wb_avg else "ABOVE avg ⚠️",
135
+ "delivery_time": p["delivery"],
136
+ "method": p["method"],
137
+ "recipient_receives_approx": f"KES {(amount_usd - total_cost) * 130:.0f}",
138
+ })
139
+
140
+ results.sort(key=lambda x: x["total_cost_usd"])
141
+ cheapest = results[0]["provider"] if results else "—"
142
+
143
+ return {
144
+ "corridor": corridor_data["name"],
145
+ "amount_usd": amount_usd,
146
+ "providers_compared": len(results),
147
+ "cheapest_provider": cheapest,
148
+ "results": results,
149
+ "world_bank_global_avg_pct": 6.3,
150
+ "sdg_target_pct": 3.0,
151
+ "note": "DEMO — Synthetic data representative of World Bank RPW Kenya corridors. Verify live rates before sending.",
152
+ "source": "World Bank Remittance Prices Worldwide (remittanceprices.worldbank.org)"
153
+ }
154
+
155
+ @mcp.tool(annotations={"readOnlyHint": True, "destructiveHint": False, "idempotentHint": True})
156
+ def estimate_savings(
157
+ corridor: Annotated[str, "Corridor code: US_KE, UK_KE, CA_KE"],
158
+ monthly_amount_usd: Annotated[float, "Monthly remittance amount in USD"],
159
+ current_provider: Annotated[str, "Current provider name (partial match OK)"]
160
+ ) -> dict:
161
+ """
162
+ Calculate annual savings if switching to cheapest available provider.
163
+ """
164
+ _audit("estimate_savings", {"corridor": corridor, "monthly": monthly_amount_usd}, "CALC")
165
+
166
+ comparison = compare_remittance_corridors(corridor, monthly_amount_usd)
167
+ if "error" in comparison:
168
+ return comparison
169
+
170
+ results = comparison["results"]
171
+ current = next((r for r in results if current_provider.lower() in r["provider"].lower()), None)
172
+ cheapest = results[0]
173
+
174
+ if not current:
175
+ return {"error": f"Provider '{current_provider}' not found in corridor. Options: {[r['provider'] for r in results]}"}
176
+
177
+ monthly_savings = current["total_cost_usd"] - cheapest["total_cost_usd"]
178
+ annual_savings = monthly_savings * 12
179
+
180
+ return {
181
+ "current_provider": current["provider"],
182
+ "current_monthly_cost_usd": current["total_cost_usd"],
183
+ "cheapest_provider": cheapest["provider"],
184
+ "cheapest_monthly_cost_usd": cheapest["total_cost_usd"],
185
+ "monthly_savings_usd": round(monthly_savings, 2),
186
+ "annual_savings_usd": round(annual_savings, 2),
187
+ "annual_savings_kes": round(annual_savings * 130, 0),
188
+ "note": "DEMO — Synthetic data. Verify with live provider rates."
189
+ }
190
+
191
+ @mcp.tool(annotations={"readOnlyHint": True, "destructiveHint": False, "idempotentHint": True})
192
+ def list_corridors() -> dict:
193
+ """List all supported remittance corridors."""
194
+ return {
195
+ "corridors": list(CORRIDORS.keys()),
196
+ "descriptions": {k: v["name"] for k, v in CORRIDORS.items()},
197
+ "note": "DEMO data. Kenya received USD 4.2B in remittances in 2024 (World Bank Migration Brief 2025)."
198
+ }
199
+
200
+ def main():
201
+ mcp.run(transport="stdio")
202
+
203
+ if __name__ == "__main__":
204
+ main()
@@ -0,0 +1,49 @@
1
+ Metadata-Version: 2.4
2
+ Name: remit-mcp
3
+ Version: 0.1.0
4
+ Summary: MCP server for Kenya diaspora remittance optimization
5
+ Author-email: Gabriel Mahia <contact@aikungfu.dev>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/gabrielmahia/remit-mcp
8
+ Project-URL: Repository, https://github.com/gabrielmahia/remit-mcp
9
+ Keywords: mcp,remittance,kenya,diaspora,fintech,east-africa
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Office/Business :: Financial
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: fastmcp>=0.9
19
+ Requires-Dist: requests>=2.31
20
+ Dynamic: license-file
21
+
22
+ # 💸 remit-mcp
23
+
24
+ **First MCP server for African diaspora remittance optimization.**
25
+
26
+ ```bash
27
+ pip install remit-mcp
28
+ remit-mcp
29
+ ```
30
+
31
+ ## Tools
32
+ | Tool | What it does |
33
+ |------|-------------|
34
+ | `compare_remittance_corridors` | Compare all providers for US→KE, UK→KE, CA→KE corridors |
35
+ | `estimate_savings` | Calculate annual savings by switching providers |
36
+ | `list_corridors` | List all supported corridors |
37
+
38
+ ## Research Basis
39
+ - **World Bank Remittance Prices Worldwide** — Global database of corridor costs. SDG target: reduce to 3% by 2030. Current global average: 6.3%. Kenya corridors: 4.1–9.1%.
40
+ - **World Bank Migration & Development Brief 2025** — Kenya received USD 4.2B in remittances in 2024. Top-10 African recipient.
41
+ - **"Democratizing AI in Africa"** arXiv:2408.17216 — AI tools for financial inclusion in resource-constrained settings.
42
+ - **IrokoBench** arXiv:2406.03368 — Swahili AI capability benchmark; multilingual financial AI for Africa.
43
+
44
+ ## DEMO Note
45
+ Current data is synthetic, representative of World Bank RPW Kenya corridor patterns.
46
+ Real implementation queries: remittanceprices.worldbank.org API + live FX feeds.
47
+
48
+ ---
49
+ *© 2026 Gabriel Mahia / AI Kung Fu LLC · MIT License*
@@ -0,0 +1,11 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/remit_mcp/__init__.py
5
+ src/remit_mcp/server.py
6
+ src/remit_mcp.egg-info/PKG-INFO
7
+ src/remit_mcp.egg-info/SOURCES.txt
8
+ src/remit_mcp.egg-info/dependency_links.txt
9
+ src/remit_mcp.egg-info/entry_points.txt
10
+ src/remit_mcp.egg-info/requires.txt
11
+ src/remit_mcp.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ remit-mcp = remit_mcp.server:main
@@ -0,0 +1,2 @@
1
+ fastmcp>=0.9
2
+ requests>=2.31
@@ -0,0 +1 @@
1
+ remit_mcp