M

Mapsql MCP

by mveyseldelibas · io.github.mveyseldelibas/mapsql-mcp

Enables AI assistants to safely explore, query, and analyze PostGIS or Oracle Spatial databases using spatial tools in plain language, with results rendered as maps directly in chat.

pypi Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-mveyseldelibas-mapsql-mcp": {
      "command": "uvx",
      "args": [
        "mapsql-mcp"
      ],
      "env": {
        "DATABASE_URL": "<YOUR_VALUE>",
        "MAPSQL_LAYERS": "<VALUE>",
        "MAPSQL_BACKEND": "auto",
        "MAPSQL_BASEMAP": "osm",
        "MAPSQL_SCHEMAS": "<VALUE>",
        "MAPSQL_MAX_ROWS": "5000",
        "MAPSQL_LOG_LEVEL": "WARNING",
        "MAPSQL_OPEN_MAPS": "off",
        "MAPSQL_ORACLE_DSN": "<VALUE>",
        "MAPSQL_OUTPUT_DIR": "~/mapsql-mcp-output",
        "MAPSQL_ALLOW_WRITE": "off",
        "MAPSQL_ORACLE_USER": "<VALUE>",
        "MAPSQL_DEFAULT_LIMIT": "100",
        "MAPSQL_ORACLE_PASSWORD": "<VALUE>",
        "MAPSQL_ORACLE_WALLET_DIR": "<VALUE>",
        "MAPSQL_STATEMENT_TIMEOUT_MS": "15000",
        "MAPSQL_ORACLE_WALLET_PASSWORD": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-mveyseldelibas-mapsql-mcp": {
      "command": "uvx",
      "args": [
        "mapsql-mcp"
      ],
      "env": {
        "DATABASE_URL": "<YOUR_VALUE>",
        "MAPSQL_LAYERS": "<VALUE>",
        "MAPSQL_BACKEND": "auto",
        "MAPSQL_BASEMAP": "osm",
        "MAPSQL_SCHEMAS": "<VALUE>",
        "MAPSQL_MAX_ROWS": "5000",
        "MAPSQL_LOG_LEVEL": "WARNING",
        "MAPSQL_OPEN_MAPS": "off",
        "MAPSQL_ORACLE_DSN": "<VALUE>",
        "MAPSQL_OUTPUT_DIR": "~/mapsql-mcp-output",
        "MAPSQL_ALLOW_WRITE": "off",
        "MAPSQL_ORACLE_USER": "<VALUE>",
        "MAPSQL_DEFAULT_LIMIT": "100",
        "MAPSQL_ORACLE_PASSWORD": "<VALUE>",
        "MAPSQL_ORACLE_WALLET_DIR": "<VALUE>",
        "MAPSQL_STATEMENT_TIMEOUT_MS": "15000",
        "MAPSQL_ORACLE_WALLET_PASSWORD": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-mveyseldelibas-mapsql-mcp": {
      "command": "uvx",
      "args": [
        "mapsql-mcp"
      ],
      "env": {
        "DATABASE_URL": "<YOUR_VALUE>",
        "MAPSQL_LAYERS": "<VALUE>",
        "MAPSQL_BACKEND": "auto",
        "MAPSQL_BASEMAP": "osm",
        "MAPSQL_SCHEMAS": "<VALUE>",
        "MAPSQL_MAX_ROWS": "5000",
        "MAPSQL_LOG_LEVEL": "WARNING",
        "MAPSQL_OPEN_MAPS": "off",
        "MAPSQL_ORACLE_DSN": "<VALUE>",
        "MAPSQL_OUTPUT_DIR": "~/mapsql-mcp-output",
        "MAPSQL_ALLOW_WRITE": "off",
        "MAPSQL_ORACLE_USER": "<VALUE>",
        "MAPSQL_DEFAULT_LIMIT": "100",
        "MAPSQL_ORACLE_PASSWORD": "<VALUE>",
        "MAPSQL_ORACLE_WALLET_DIR": "<VALUE>",
        "MAPSQL_STATEMENT_TIMEOUT_MS": "15000",
        "MAPSQL_ORACLE_WALLET_PASSWORD": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-mveyseldelibas-mapsql-mcp": {
      "command": "uvx",
      "args": [
        "mapsql-mcp"
      ],
      "env": {
        "DATABASE_URL": "<YOUR_VALUE>",
        "MAPSQL_LAYERS": "<VALUE>",
        "MAPSQL_BACKEND": "auto",
        "MAPSQL_BASEMAP": "osm",
        "MAPSQL_SCHEMAS": "<VALUE>",
        "MAPSQL_MAX_ROWS": "5000",
        "MAPSQL_LOG_LEVEL": "WARNING",
        "MAPSQL_OPEN_MAPS": "off",
        "MAPSQL_ORACLE_DSN": "<VALUE>",
        "MAPSQL_OUTPUT_DIR": "~/mapsql-mcp-output",
        "MAPSQL_ALLOW_WRITE": "off",
        "MAPSQL_ORACLE_USER": "<VALUE>",
        "MAPSQL_DEFAULT_LIMIT": "100",
        "MAPSQL_ORACLE_PASSWORD": "<VALUE>",
        "MAPSQL_ORACLE_WALLET_DIR": "<VALUE>",
        "MAPSQL_STATEMENT_TIMEOUT_MS": "15000",
        "MAPSQL_ORACLE_WALLET_PASSWORD": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-mveyseldelibas-mapsql-mcp": {
      "command": "uvx",
      "args": [
        "mapsql-mcp"
      ],
      "env": {
        "DATABASE_URL": "<YOUR_VALUE>",
        "MAPSQL_LAYERS": "<VALUE>",
        "MAPSQL_BACKEND": "auto",
        "MAPSQL_BASEMAP": "osm",
        "MAPSQL_SCHEMAS": "<VALUE>",
        "MAPSQL_MAX_ROWS": "5000",
        "MAPSQL_LOG_LEVEL": "WARNING",
        "MAPSQL_OPEN_MAPS": "off",
        "MAPSQL_ORACLE_DSN": "<VALUE>",
        "MAPSQL_OUTPUT_DIR": "~/mapsql-mcp-output",
        "MAPSQL_ALLOW_WRITE": "off",
        "MAPSQL_ORACLE_USER": "<VALUE>",
        "MAPSQL_DEFAULT_LIMIT": "100",
        "MAPSQL_ORACLE_PASSWORD": "<VALUE>",
        "MAPSQL_ORACLE_WALLET_DIR": "<VALUE>",
        "MAPSQL_STATEMENT_TIMEOUT_MS": "15000",
        "MAPSQL_ORACLE_WALLET_PASSWORD": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-mveyseldelibas-mapsql-mcp": {
      "command": "uvx",
      "args": [
        "mapsql-mcp"
      ],
      "env": {
        "DATABASE_URL": "<YOUR_VALUE>",
        "MAPSQL_LAYERS": "<VALUE>",
        "MAPSQL_BACKEND": "auto",
        "MAPSQL_BASEMAP": "osm",
        "MAPSQL_SCHEMAS": "<VALUE>",
        "MAPSQL_MAX_ROWS": "5000",
        "MAPSQL_LOG_LEVEL": "WARNING",
        "MAPSQL_OPEN_MAPS": "off",
        "MAPSQL_ORACLE_DSN": "<VALUE>",
        "MAPSQL_OUTPUT_DIR": "~/mapsql-mcp-output",
        "MAPSQL_ALLOW_WRITE": "off",
        "MAPSQL_ORACLE_USER": "<VALUE>",
        "MAPSQL_DEFAULT_LIMIT": "100",
        "MAPSQL_ORACLE_PASSWORD": "<VALUE>",
        "MAPSQL_ORACLE_WALLET_DIR": "<VALUE>",
        "MAPSQL_STATEMENT_TIMEOUT_MS": "15000",
        "MAPSQL_ORACLE_WALLET_PASSWORD": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
DATABASE_URL secret Yes Database connection URL. Use postgresql://readonly:secret@localhost:5432/gis for PostGIS, or oracle://USER:PASS@host:1521/service_name for Oracle Spatial.
MAPSQL_LAYERS No Comma-separated table/layer patterns to expose, e.g. schema.table, schema.*, or table.
MAPSQL_BACKEND No Force the backend. Valid values are postgis or oracle. Default: detected from the DATABASE_URL scheme, or Oracle when only MAPSQL_ORACLE_DSN is set. Default: auto
MAPSQL_BASEMAP No Basemap setting: osm, none, or a tile URL template containing {z}/{x}/{y}. Use none for fully offline operation. Maps rendered with the OSM basemap carry attribution. Default: osm
MAPSQL_SCHEMAS No Comma-separated schema allowlist. For Oracle, these are owners. Example: public,osm or GIS.
MAPSQL_MAX_ROWS No Hard row cap. The server never materialises a larger result. Default: 5000
MAPSQL_LOG_LEVEL No Log level. Logs go to stderr only. Default: WARNING
MAPSQL_OPEN_MAPS No Open each rendered map in the default viewer. Useful for clients that do not display tool images. Equivalent to --open-maps. Default: off
MAPSQL_ORACLE_DSN No Oracle DSN / TNS descriptor or Easy Connect string, used as an alternative to DATABASE_URL for Oracle Spatial. The DSN overrides the host part of an oracle:// URL.
MAPSQL_OUTPUT_DIR No Directory where render_map saves PNG/HTML output and the tile cache. Default: ~/mapsql-mcp-output
MAPSQL_ALLOW_WRITE No Enable the execute_sql tool for writes. PostGIS only. Equivalent to --allow-write. Default: off
MAPSQL_ORACLE_USER No Oracle Spatial username. Used with MAPSQL_ORACLE_DSN and MAPSQL_ORACLE_PASSWORD; overrides the user in an oracle:// URL.
MAPSQL_DEFAULT_LIMIT No Default limit used when a query does not specify a limit. Default: 100
MAPSQL_ORACLE_PASSWORD No Oracle Spatial password. Used with MAPSQL_ORACLE_DSN and MAPSQL_ORACLE_USER; overrides the password in an oracle:// URL.
MAPSQL_ORACLE_WALLET_DIR No Oracle mTLS wallet directory. Only needed for mutual-TLS (wallet) connections, e.g. Autonomous Database with mTLS required.
MAPSQL_STATEMENT_TIMEOUT_MS No Per-query timeout in milliseconds. Default: 15000
MAPSQL_ORACLE_WALLET_PASSWORD No Oracle mTLS wallet password. Only needed for mutual-TLS (wallet) connections.

Similar servers