datagovma-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
datagovma-mcp
MCP server for the Moroccan Open Data portal (data.gov.ma).
datagovma-mcp exposes curated MCP tools backed by CKAN Action API endpoints so AI clients can discover datasets, resources, organizations, and groups in a consistent typed shape.
What this project provides
Streamable HTTP MCP server built with FastMCP.
Typed and validated tool inputs/outputs.
Centralized CKAN envelope validation (
successchecks, JSON checks, timeout handling).Test suite covering success and error paths.
Docker image and Docker Compose setup.
Related MCP server: datanorge
Implemented MCP tools
MCP tool | CKAN action | Purpose |
|
| Check portal identity and CKAN version. |
|
| Full-text search with paging and optional facets. |
|
| Fetch one dataset by slug or UUID. |
|
| List dataset names with pagination. |
|
| Fetch one resource and download metadata. |
|
| Search resources using strict |
|
| List organization names with pagination. |
|
| Fetch organization details and optional datasets. |
|
| List group names with pagination. |
|
| Fetch group details and optional datasets. |
|
| Aggregate facet buckets ( |
Requirements
Python
>=3.11uv for dependency management
Docker (optional, for containerized runs)
Quick start (local)
uv sync --frozen --group dev
cp .env.example .env
set -a && source .env && set +a
uv run datagovma-mcpDefault endpoint:
MCP:
http://127.0.0.1:8000/mcpHealth:
http://127.0.0.1:8000/healthz
Quick health check:
curl -fsS http://127.0.0.1:8000/healthzExpected response:
200 OKwith bodyok.
Run with Docker
docker compose up --buildThe service starts on port 8000 by default and exposes /mcp and /healthz.
Connect from LLM clients
Claude Desktop
After the server is running, edit:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Then add:
{
"mcpServers": {
"opengovma": {
"command": "npx",
"args": ["mcp-remote", "http://127.0.0.1:8000/mcp"]
}
}
}Claude Code
Add the server with Claude Code CLI:
claude mcp add --transport http opengovma http://127.0.0.1:8000/mcpCodex (Desktop app and CLI)
Add the server with Codex CLI:
codex mcp add opengovma --url http://127.0.0.1:8000/mcpVS Code (GitHub Copilot MCP)
Create .vscode/mcp.json in your workspace (or open your user MCP config via command palette) and add:
{
"servers": {
"opengovma": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}Cursor
Add this to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"opengovma": {
"url": "http://127.0.0.1:8000/mcp"
}
}
}Configuration
Environment variables are loaded by your shell or container runtime.
Variable | Default | Description |
|
| Host interface used by Uvicorn inside the app. |
|
| Docker Compose helper mapped to |
|
| Listening port. |
|
| Number of worker processes ( |
|
| Hot reload mode for development ( |
|
| HTTP keep-alive timeout in seconds ( |
|
| One of |
|
| One of |
Notes:
MCP_RELOAD=truerequiresMCP_WORKERS=1.MCP_LOG_FORMAT=richfalls back to plain logs if Rich is unavailable.
Continuous integration
GitHub Actions workflow: .github/workflows/ci.yml
CI runs on pull requests and pushes to main/master and includes:
dependency review (PR only)
lint (
ruff)format check (
ruff format --check)type check (
mypy)tests (
pytest)package build (
uv build)
Contributing
Contributions are welcome. See CONTRIBUTING.md for setup, checks, and PR guidance.
License
Licensed under the MIT License. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for finding authoritative primary data sources and official portals.
dati.gov.it MCP — Italy's national open-data portal (CKAN API).
data.gov.il MCP — Israel national open-data portal (CKAN API).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server to query French Open Data from data.gouv.frMIT
- AlicenseAqualityDmaintenanceAn MCP server to find and fetch Norwegian open government data from data.norge.no. Enables search, metadata retrieval, and data download.54MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for querying and analyzing urban data from the Sofia municipality CKAN portal. Provides tools for dataset search, retrieval, preview, summarization, and faceted browsing.MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for the French open-data catalogue data.gouv.fr, enabling dataset search and retrieval, organization lookup, and reuse discovery via natural language queries.257 npmMIT