Skip to main content
Glama
josepaulolaport

cnes-mcp-test

CNES Mapping

Brazilian CNES health establishment data → PostgreSQL schema + MCP server for AI-assisted queries.

Quick setup

git clone https://github.com/josepaulolaport/cnes-mapping.git
cd cnes-mapping
cp .env.example .env          # edit DATABASE_URL
pip install -r requirements.txt
cd mcp && npm install && npm run build

# Download CNES CSVs from DATASUS into:
# BASE_DE_DADOS_CNES_202605/

# PostgreSQL import
export DATABASE_URL=postgresql://user:pass@localhost:5432/atlasmed_test
psql "$DATABASE_URL" -f sql/create_mcp_test_schema.sql
cd scripts && python3 import_modular.py --table all

# MCP (Claude Desktop / Cursor)
cp .mcp.json.example .mcp.json   # set absolute path + CNES_DATABASE_URL

Related MCP server: recife-open-data-mcp

What's included

Path

Purpose

sql/

PostgreSQL schema, migrations, views, FKs

scripts/import_modular.py

Modular CNES CSV importer

mcp/

Read-only MCP server (cnes-mcp-test)

mcp/schema_manifest.json

Schema metadata for the AI agent

docs/

Import guides, table docs

Not in repo (gitignored)

  • BASE_DE_DADOS_CNES_202605/ — download from DATASUS CNES

  • output/, logs/, import_errors/ — generated artifacts

  • .env — credentials

MCP tools

list_tables, describe_table, execute_query, run_analysis, search_schema, get_agent_policy

See mcp/README.md and CLAUDE.md.

Data

CNES May 2026 (202605) — ~623k facilities, ~7.7M professionals, reference tables for occupations, agreements, maintainers, etc.

Schema: mcp_test on PostgreSQL.

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Read-only MCP server that enables AI tools like Claude and Cursor to query the Avanti Fellows PostgreSQL database, providing schema inspection, data sampling, and SELECT query execution capabilities.
    6
    1
  • A
    license
    -
    quality
    D
    maintenance
    MCP server to query public open data from Recife, Brazil using natural language. It exposes tools for schema exploration and SQL query generation via Gemini 2.5 Flash, backed by a local DuckDB database.
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Read-only MCP server for querying PostgreSQL, MySQL, and SQLite from AI agents — multi-database, safe by default.
    4
    18
    1
    ISC

View all related MCP servers

Related MCP Connectors

  • Hosted MCP server exposing US hospital procedure cost data to AI assistants

  • MCP server for Brazilian Federal Senate open data (legislative, administrative, e-Cidadania).

  • MCP server for live, sourced Brazilian public data from the official IBGE APIs.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/josepaulolaport/cnes-mapping'

If you have feedback or need assistance with the MCP directory API, please join our Discord server