# coremcp

> coremcp is an open-source MCP server for databases. Open-source Go MCP server that lets AI clients query SQL Server and PostgreSQL safely. It is available on CLI, Self-hosted, Linux, macOS, Windows and API.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, Linux, macOS, Windows, API
- **Website:** https://corebasehq.com
- **Repository:** https://github.com/corebasehq/coremcp
- **GitHub stars:** 12
- **License:** Apache-2.0
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-01

## About

CoreMCP turns existing SQL databases into tools that MCP-compatible assistants can call. It ships as a single static Go binary with its drivers built in, so there is nothing else to install on the host. Local clients connect over stdio, while the connect mode opens an outbound WebSocket to a relay, which lets a machine behind a firewall serve requests without accepting inbound connections.

The server is read-only by default. A SQL lexer rejects anything other than SELECT and WITH statements, blocks stacked queries, appends a row cap to every query, and masks configurable PII patterns in results. Per-source options cover READ UNCOMMITTED reads on MSSQL and a Turkish character normalization middleware for legacy ERP databases.

It suits developers and data teams who want an assistant to explore on-premises schemas, write queries against stored procedures, or expose reusable parameterized queries as named tools. The MSSQL and PostgreSQL adapters are the stable ones; Firebird and MySQL are not yet available.

## Features

- **Single static binary:** Ships as one Go executable with embedded database drivers and no runtime dependencies.
- **Read-only by default:** Only SELECT and WITH statements run unless a source is explicitly set to allow stored procedure execution.
- **Outbound WebSocket mode:** A connect mode lets an agent reach a relay over outbound 443 without listening on inbound ports.
- **PII masking and row caps:** Configurable regex masking on result strings and a forced LIMIT on every SELECT.
- **Custom parameterized tools:** Define reusable SQL queries with declared parameters that the model can call directly.
- **Schema prompt on startup:** Scans tables, keys, relationships and column comments to prime the model with schema context.

## Good for

- Letting an AI assistant answer ad hoc questions against an on-premises SQL Server
- Exposing a set of vetted queries as named tools for a reporting assistant
- Connecting a legacy Turkish ERP database to an MCP client without re-encoding names
- Querying a PostgreSQL database from Claude Desktop with a read-only role
- Reaching a database inside a corporate network that blocks inbound connections

## Tools

From the tool list in its README, going by the names, 1 of 6 tools changes data. From the server's own tool labels and tool names; not verified by us.

- `query_database` (name suggests: reads): Arbitrary SQL against a configured source.
- `list_tables` (name suggests: reads): Tables with column counts, primary keys, foreign key counts.
- `describe_table` (name suggests: reads): Full schema for one table: columns, types, nullability, PKs, FKs, column comments.
- `list_views` (name suggests: reads): All views with column definitions.
- `list_procedures` (name suggests: reads): Stored procedures with parameter names, types, modes and a ready-to-copy example call.
- `execute_procedure` (name suggests: changes): Calls a stored procedure with named parameters; only enabled when readonly is false.

## FAQ

### Is CoreMCP read-only?

Yes by default. Stored procedure execution is only enabled when a source sets readonly to false, and the recommended setup is a database user limited to SELECT.

### Which databases are supported?

The MSSQL (SQL Server 2000 and later) and PostgreSQL adapters are stable. Firebird is in progress and MySQL is on the roadmap.

### How does coremcp connect to Claude Desktop?

Add a mcpServers entry to claude_desktop_config.json that runs the coremcp binary with the serve command and a config path.

### What license is coremcp released under?

Apache License 2.0.

### Is coremcp free?

Yes. coremcp is open source, so you can use and self-host it for free.

### What are the best alternatives to coremcp?

The closest alternatives to coremcp are db-mcp-server, mcp-multi-db, go-mcp-mysql, postgres_mcp and Postgres MCP.

## Where this comes from

- Description: written from the project's README.

## Alternatives

- [db-mcp-server](https://ai-powered.com/mcp/db-mcp-server-2): db-mcp-server is an open-source MCP server for databases.
- [mcp-multi-db](https://ai-powered.com/mcp/mcp-multi-db): mcp-multi-db is an open-source MCP server for databases.
- [go-mcp-mysql](https://ai-powered.com/mcp/go-mcp-mysql): go-mcp-mysql is an open-source MCP server for databases.
- [postgres_mcp](https://ai-powered.com/mcp/postgres-mcp-5): postgres_mcp is an open-source MCP server for databases.
- [Postgres MCP](https://ai-powered.com/mcp/postgres-mcp-2): Postgres MCP is an open-source MCP server for databases.
- [Raw SQL MCP](https://ai-powered.com/mcp/raw-sql-mcp): Raw SQL MCP is an open-source MCP server for databases.
- [Postgres MCP](https://ai-powered.com/mcp/postgres-mcp): Postgres MCP is an open-source MCP server for databases.
- [SynapCores](https://ai-powered.com/mcp/synapcores): SynapCores is a free MCP server for databases.

---
Source: https://ai-powered.com/mcp/coremcp
