josepaulolaport

CNES Mapping

Community josepaulolaport
Updated

CNES Brazilian health data → PostgreSQL + MCP server for AI queries

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

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.

MCP Server · Populars

MCP Server · New

    Cassette-Editor

    Oh My Cassette: Chat Your Raw Clips Into a Finished Cut

    你的随身 AI 剪辑搭档 | Pocket AI co-editor for video montage — AI video editing plugin & MCP server for Claude Code, Codex, Hermes & OpenCode

    Community Cassette-Editor
    trendsmcp-ai

    Trends MCP

    MCP server for live trend data. Query Google Search, YouTube, TikTok, Reddit, Amazon, Wikipedia, News sentiment, Web Traffic, App Downloads, Steam, npm and more. Works with Claude, Cursor, VS Code, GitHub Copilot, ChatGPT, Windsurf, Cline, Raycast and any MCP-compatible.

    Community trendsmcp-ai
    jacob-bd

    Gemini Notebook (formerly Google NotebookLM) CLI & MCP Server

    Programmatic access to Gemini Notebook - via command-line interface (CLI), Model Context Protocol (MCP) server, and AI agent skills.

    Community jacob-bd
    PxyUp

    Fitter — web data for AI agents

    New way for collect information from the API's/Websites

    Community PxyUp
    kayhendriksen

    foehn

    Download MeteoSwiss Open Government Data — weather stations, radar, hail, forecasts and climate series — via Python API, CLI, or MCP server, as DataFrames, Parquet, xarray Datasets or Zarr stores

    Community kayhendriksen