MetorialDocs

Set up CommCare in Metorial for Claude, ChatGPT and Cursor

Share CommCare with your team in Claude, ChatGPT and Cursor through Metorial: API key sign-in, 18 tools (12 read-only).

To give your team CommCare in Claude, ChatGPT, Cursor and other AI clients, an admin shares the CommCare integration in a Metorial portal, and each person connects with an API key. Agents can manage cases, forms, and users on CommCare, a mobile data collection and case management platform for frontline workers. The integration has 18 tools, 12 read-only and 6 write, plus 3 triggers.

What you'll learn

  • How an admin shares CommCare in a portal and how each person connects
  • What CommCare asks for when you connect, and where to find it
  • How to keep the 12 read-only tools and reject the other 6

Before you start

Sign-in method

MethodTypeWhat a person provides
API KeyCustom credentialsusername and apiKey

API Key

To connect, a person enters these values:

  • username: Your CommCare web user email address
  • apiKey: API key generated from CommCare HQ account settings

Setup settings

Setup also asks for:

  • domain: The CommCare project space (domain) name, found in your CommCare HQ URL: https://www.commcarehq.org/a/[domain]/

Admin: share CommCare in a portal

In the dashboard

Open Shared Resources

Open Workforce, choose the portal, and select Shared Resources under Access.

Share a new integration

Select Share a Resource, then New Integration, and choose CommCare. For how members connect, choose Each person connects so everyone enters their own API key, or Shared connection to enter one API key for everyone.

Limit the tools

Under Tool Filters, set the write and destructive groups to Reject if agents should only read from CommCare.

Choose who gets it

Add the access groups that should see CommCare. When a person asks for access from the portal, the request appears under Access Requests.

With the CLI

The CLI cannot create the per-user CommCare integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search commcare

Employee: connect CommCare

In the portal

Open CommCare in the catalog

Sign in to your portal and open CommCare. The status reads Available.

Authenticate

Under Quick setup, select Authenticate. In the setup window, enter your API key (username and apiKey).

Confirm

The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.

With the CLI

metorial catalog search commcare
metorial setup <catalog-item-id>

catalog search prints the catalog item ID.

Add it to your AI client

metorial install adds your CommCare connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.

metorial list commcare
metorial client list
metorial install <client-identifier> <integration-id>

For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.

Make it read-only

Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 12 read-only tools, such as get_case and get_form, and lose the 6 write tools, such as send_sms or bulk_cases.

Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.

Check it worked

metorial list commcare
metorial tools <integration-id>
metorial call <integration-id> list_cases -d '{}'

metorial tools lists the 18 tools, minus any you rejected. list_cases takes no input. It searches and retrieve cases from a CommCare project.

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (12)

  • list_mobile_workers: Retrieve mobile workers (field users) in a CommCare project.
  • get_case: Retrieve a single case by its ID. Needs caseId.
  • list_forms: Search and retrieve submitted form data from a CommCare project.
  • list_web_users: Retrieve web users for a CommCare project.
  • list_applications: Retrieve applications in a CommCare project.
  • get_form: Retrieve a single submitted form by its ID. Needs formId.
  • list_lookup_tables: Retrieve lookup tables (fixtures) in a CommCare project.
  • list_cases: Search and retrieve cases from a CommCare project.
  • list_groups: Retrieve user groups in a CommCare project.
  • get_current_user: Identify the authenticated CommCare web user and retrieve their name and email address.
  • bulk_get_cases: Retrieve specific CommCare cases in one request using case IDs, external IDs, or both.
  • list_projects: Discover CommCare project spaces available to the authenticated web user, including their domain names and project names.

Write tools (6)

  • manage_group: Create a new user group or update an existing one.
  • update_case: Update an existing case in CommCare. Needs caseId.
  • create_case: Create a new case in CommCare. Needs caseType.
  • bulk_cases: Create or update multiple cases in a single request. Needs cases.
  • send_sms: Send an SMS message through CommCare to a phone number. Needs phoneNumber and message.
  • manage_mobile_worker: Create a new mobile worker or update an existing one.

Triggers

CommCare has 3 triggers, which fire on events in CommCare:

  • inbound_webhook
  • new_form_submission: Triggers when a new form is submitted to CommCare.
  • case_updated: Triggers when a case is created, updated, or closed in CommCare.

Next steps