AI Chatbot to interact with DHIS2 configuration (using MCP)

Watch the videos

  1. Data Element Review & Fix Wrong Value Type Verification
  2. Add Missed Translations
  3. Cross-Instance Org Unit Tree Comparison & Migration

Intro

We are excited to share a recent development with the community: an AI-powered chatbot that directly interacts with DHIS2 instances using the Model Context Protocol (MCP).

Our goal was to give AI LLMs safe, direct, and structured operational capabilities over DHIS2 metadata and system configurations.

Quick Reminder: You don’t need cloud APIs to leverage AI—LLMs can be deployed fully on-premise within your own infrastructure. Hosting models locally keeps sensitive enterprise data safely behind your firewall, ensuring strict data privacy, regulatory compliance, and complete control over your AI pipeline.

What is MCP (Model Context Protocol)?

The Model Context Protocol (MCP) is an open standard designed to connect AI Large Language Models (LLMs) to external applications, APIs, and databases seamlessly. Think of MCP as a universal interface between the AI LLM and DHIS2.

Through MCP Tools, an LLM can perform specific, controlled actions programmatically—such as fetching metadata, executing health checks, updating translations, or modifying system hierarchies—rather than relying solely on static training data.

Feature Demos (with videos!)

Here is a quick look at some of the tasks that our chatbot can do across different operational workflows:

  1. Data Element Review & Fix Wrong Value Type Verification
  • Ask in natural language: “Show me the Data Elements for Program in the instance [Y].”
  • Under the hood: The LLM executes a targeted MCP call to pull metadata using the Web API.
  • Action: Detect inconsistencies (e.g., incorrect value types), request a fix in natural language, and inspect the updated valueType in real time.
  • Video: https://youtu.be/57a4TPjO8io
  1. Add Missed Translations
  • Ask in natural language: “Get translations for Data Element .”
  • Under the hood: The assistant queries the environment to understand the current locale configuration and missing translation strings.
  • Action: The assistant proposes accurate translations, applies them upon confirmation, and displays the newly localized strings immediately.
  • Video: https://youtu.be/xcMsZPOFkKA
  1. Cross-Instance Org Unit Tree Comparison & Migration
  • Ask in natural language: “Compare the organisation unit tree of two DHIS2 instances (prod and dev), focusing on the 2nd level.”
  • Under the hood: The assistant queries both instances via MCP tools, compares the hierarchies, and highlights any discrepancies.
  • Action: Automatically identify and migrate missing organisation units from prod to dev to keep environments perfectly in sync.
  • Video: https://youtu.be/YzB3jkvOzDM

Why Use MCP for DHIS2?

Standardized Integration: MCP eliminates custom boilerplate connectors between AI systems and DHIS2.

  • Real-Time Accuracy: The LLM queries live metadata instead of guessing or hallucinating outdated configurations.
  • Actionable Workflows: Rather than just answering questions, the bot can safely carry out maintenance and administrative tasks.

We’d love to hear your feedback!

We are actively refining this integration and would love to hear from the community:

  • What admin or configuration tasks would you want an AI chatbot to automate in your instance?
  • How do you see LLMs fitting into your DHIS2 workflows?
2 Likes