https://github.com/dimagi/commcare-connect-mcp
A proof of concept demo of an MCP server for CommCare Connect
https://github.com/dimagi/commcare-connect-mcp
Last synced: about 2 months ago
JSON representation
A proof of concept demo of an MCP server for CommCare Connect
- Host: GitHub
- URL: https://github.com/dimagi/commcare-connect-mcp
- Owner: dimagi
- License: mit
- Created: 2025-04-30T10:03:43.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-30T10:30:55.000Z (6 months ago)
- Last Synced: 2025-08-28T23:50:48.700Z (2 months ago)
- Language: Python
- Size: 20.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mcp-servers - **commcare-connect-mcp** - A proof of concept demo of an MCP server for CommCare Connect `python` `mcp` `server` `pip install git+https://github.com/dimagi/commcare-connect-mcp` (🤖 AI/ML)
- awesome-mcp-servers - **commcare-connect-mcp** - A proof of concept demo of an MCP server for CommCare Connect `python` `mcp` `server` `pip install git+https://github.com/dimagi/commcare-connect-mcp` (AI/ML)
README
# Experimental MCP Server for CommCare Connect (ccc)
This is an experimental MCP server for CommCare Connect.
You can find a [quick video walthrough here](https://www.loom.com/share/edad9538ccfe40deac53418e595484be).
To use it with [claude code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview) you can run `claude` in this folder.
You can see the `.mcp.json` for how it is set up.
If you want to use a different tool you can modify the declaration accordingly.
You will need to have `uv` installed on your system, and you may have to specify
absolute paths to the `uv` executable and `server.py` file.
This project is built on top of the [Python MCP SDK](https://github.com/modelcontextprotocol/python-sdk).
## Usage
At the moment all this can do is query the global stats API which is used by the
[program dashboard](https://connect.dimagi.com/admin_reports/program_dashboard).
So basically you can ask it questions about amounts earned and paid, active users,
and visit stats, optionally over specific date ranges (or programs/organizations if you know their IDs).
## Getting an authentication token
The easiest way to get an authentication token is as a superuser to visit
[https://connect.dimagi.com/admin/authtoken/tokenproxy/](https://connect.dimagi.com/admin/authtoken/tokenproxy/)
and find a token associated with your email.
If you don't have any tokens, you can run the following, replacing your username and password:
```
curl -X POST -d "username=you@dimagi.com&