# Reported issues for database

Pod holds 17 of 21 problems reported by people outside the maintainer team. Issues filed by the project's own owners, members and collaborators are excluded entirely — a maintainer's release checklist is not a warning to a prospective user.

Back to [database](/mcp/database).

## Most discussed

### Numeric columns returned as null via MCP (DECIMAL/FLOAT) despite valid values in database

### Prerequisites

- [x] I have searched existing issues for duplicates
- [x] I am using the latest version of dbmcp

### Version

latest container dbmcp

### Database Backend

MariaDB

### Transport Mode

HTTP

### Operating System

ubuntu

### Description

We are observing an issue where numeric columns are returned as null through the MCP server, even though the underlying database contains valid values.

This happens consistently with columns of type:

DECIMAL  
FLOAT  
DOUBLE  

Text and da

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/141) · 2026-05-04 · closed · external user · 2 comments

### --allowed-hosts appears to be ignored in HTTP mode (always returns “Forbidden: Host header is not allowed”)

### Prerequisites

- [x] I have searched existing issues for duplicates
- [x] I am using the latest version of dbmcp

### Version

using latest docker

### Database Backend

MySQL

### Transport Mode

HTTP

### Operating System

Ubuntu

### Description

Summary
When running dbmcp in HTTP transport mode (Docker deployment), requests are rejected with:

Forbidden: Host header is not allowed

for any non-localhost hostname, even when that hostname is explicitly configured via --allowed-hosts. Only

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/132) · 2026-04-29 · closed · external user · 1 comment

### Server crashes on startup: tracing-appender fails to create log directory on read-only filesystem

## Description

The MCP server panics immediately after receiving the `initialize` handshake due to `tracing-appender` attempting to create a log directory on a read-only filesystem.

## Steps to Reproduce

1. Run the server with `--database-url mysql://...`
2. Server receives `initialize` from client
3. Server panics and disconnects

## Error

```
thread 'main' panicked at tracing-appender-0.2.4/src/rolling.rs:154:14:
initializing rolling file appender failed: InitError {
  context: "failed to 

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/8) · 2026-03-18 · closed · external user · 1 comment

### IPv6 regex matches Postgres '::type' casts in explainQuery output

### Prerequisites

- [x] I have searched the existing issues and confirmed this is not a duplicate.
- [x] I am running the latest released version (0.10.2).

### Version

0.10.2

### Database Backend

PostgreSQL

### Transport Mode

HTTP

### Operating System

Linux (kernel 7.0.1, x86_64)

### Description

The IPv6 regex in `crates/pii/src/recognizer/rule/ip.rs`:

```
(?:[0-9A-Fa-f]{0,4}:){1,7}[0-9A-Fa-f]{0,4}(?:/\d{1,3})?
```

uses `{0,4}` (zero-length-permitting) for hex groups, so `::text` pa

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/149) · 2026-05-07 · closed · 0 comments

### Phone DE/UK regexes match any '0'-prefixed digit run

### Prerequisites

- [x] I have searched the existing issues and confirmed this is not a duplicate.
- [x] I am running the latest released version (0.10.2).

### Version

0.10.2

### Database Backend

PostgreSQL

### Transport Mode

HTTP

### Operating System

Linux (kernel 7.0.1, x86_64)

### Description

The DE and UK phone regexes in `crates/pii/src/recognizer/rule/phone.rs:21-22` accept a bare leading `0` as a country-trunk-prefix alternative:

```rust
Regex::new("UK", r"\b(?:\+?44[\s-]?|0)(

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/147) · 2026-05-07 · closed · 0 comments

### feat: add result pagination for large query responses

## Problem

The server currently returns entire query result sets in a single response. For large tables, this can produce responses with thousands of rows, consuming significant memory and potentially exceeding LLM context windows. There is no mechanism to limit or paginate results.

Additionally, MCP list operations (`tools/list`) accept `PaginatedRequestParams` but ignore the `cursor` parameter entirely — all items are returned at once. This is fine today (~9 tools) but won't scale if the too

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/117) · 2026-04-17 · closed · 0 comments

### feat: add `init` command to interactively generate MCP client configs

## Motivation

Setting up database-mcp requires users to manually create or edit JSON config files for their specific MCP client. Each client uses a different file path and slightly different format (some support `envFile`, others variable interpolation, etc.). This is error-prone and tedious — users must look up the correct config path, copy a JSON template, and fill in their database details.

An interactive `database-mcp init` command would automate this entirely.

## Proposal

Add an `init` 

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/98) · 2026-04-12 · open · 0 comments

### feat: one-liner install script hosted on docs site

## Motivation

Installing database-mcp currently requires multiple manual steps: download the tar.gz, extract it, and move the binary to PATH. This friction can be eliminated with a single copy-paste command, similar to how [Claude Code](https://code.claude.com/docs/en/quickstart) offers:

```bash
curl -fsSL https://claude.ai/install.sh | bash
```

## Proposal

Create a `setup.sh` installer script so users can install with:

```bash
curl -fsSL https://database.haymon.ai/setup.sh | bash
```

or w

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/95) · 2026-04-12 · closed · 0 comments

## Most recent

### feat: add typed structured output schemas for tool responses

## Summary

All tools currently return unstructured `CallToolResult` responses with JSON serialized into text content blocks. The tool request parameters are well-typed with dedicated structs, but the responses lack equivalent structure.

## Background

The MCP 2025-11-25 specification introduced `outputSchema` on tool definitions and `structuredContent` in tool responses. The spec actively encourages servers to provide structured output so that clients can validate and programmatically consume 

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/82) · 2026-04-07 · closed · 0 comments

### feat: defer database connection to return meaningful errors to MCP clients

## Summary

Currently, the database connection is established eagerly during server startup via the adapter. If the connection fails (e.g., wrong credentials, unreachable host, invalid database name), the MCP server process exits before it can communicate with any client. The code agent never sees what went wrong — it just sees the server disappear.

## Problem

- The MCP server must be running and able to respond over the transport (stdio/HTTP) before it can send error messages to clients
- Eag

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/81) · 2026-04-07 · closed · 0 comments

### feat: add alter_table tool for structured schema modifications

### Problem / Motivation

Modifying table structure currently requires writing raw ALTER TABLE SQL via `write_query`. ALTER TABLE syntax varies significantly across backends (e.g., SQLite only supports DROP COLUMN since 3.35.0 and RENAME COLUMN since 3.25.0). A dedicated tool with structured parameters can handle these differences and validate identifiers for all column names.

### Proposed Solution

Add an `alter_table` MCP tool that modifies table structure through structured parameters.

**Pa

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/74) · 2026-04-06 · closed · 0 comments

### feat: add explain_query tool for execution plan analysis

### Problem / Motivation

Understanding query performance currently requires users to manually craft backend-specific EXPLAIN SQL via `read_query` (e.g., `EXPLAIN (FORMAT JSON)` for PostgreSQL, `EXPLAIN FORMAT=JSON` for MySQL, `EXPLAIN QUERY PLAN` for SQLite). A dedicated tool would provide a consistent interface across backends and support the `ANALYZE` option with proper read-only safety checks.

### Proposed Solution

Add an `explain_query` MCP tool that returns execution plans for SQL querie

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/73) · 2026-04-06 · closed · 0 comments

### feat: add drop_database tool

### Problem / Motivation

The server already provides a `create_database` tool for PostgreSQL and MySQL, but there is no counterpart to drop a database. Users must use `write_query` with raw `DROP DATABASE` SQL, which bypasses identifier validation and provides no safety checks.

### Proposed Solution

Add a `drop_database` MCP tool as the counterpart to `create_database`.

**Parameters**:
- `database_name` (string, required) — Name of the database to drop (alphanumeric and underscores only)

**

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/72) · 2026-04-06 · closed · 0 comments

### feat: add drop_table tool with dependency awareness

### Problem / Motivation

Currently, users must write raw `DROP TABLE` SQL via `write_query`. This provides no safety checks — a table with foreign key dependents can be dropped without warning, potentially breaking referential integrity. A dedicated tool can check for dependencies before dropping.

### Proposed Solution

Add a `drop_table` MCP tool that drops a table with dependency awareness.

**Parameters**:
- `table_name` (string, required) — Table to drop
- `cascade` (bool, default: false) 

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/71) · 2026-04-06 · closed · 0 comments

### feat: add create_table tool for structured table creation

### Problem / Motivation

Currently, users must write raw DDL SQL via the `write_query` tool to create tables. This is error-prone and requires knowledge of backend-specific DDL syntax. A dedicated tool that accepts structured parameters would reduce errors and provide a better experience.

### Proposed Solution

Add a `create_table` MCP tool that creates a table from structured parameters instead of raw SQL.

**Parameters**:
- `table_name` (string, required) — Name of the table to create
- `col

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/70) · 2026-04-06 · closed · 0 comments

### feat: include server name and version in ServerInfo

## Problem

The `get_info()` implementation sets capabilities and instructions but does not include the server name and version. MCP clients use this metadata for logging, debugging, and display purposes.

## Proposed Solution

Add `.with_server_info(Implementation::new("database-mcp", env!("CARGO_PKG_VERSION")))` to the `ServerInfo` construction in `get_info()`. This surfaces the crate name and version from `Cargo.toml` automatically.

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/35) · 2026-03-29 · closed · 0 comments

### feat: return tool execution errors via CallToolResult::error() instead of Err(ErrorData)

## Problem

All tool handlers currently return `Err(ErrorData)` on failure (e.g. SQL syntax error, database connection failure, permission denied). Per MCP best practices, this is a **protocol-level** error that bypasses the LLM entirely — the LLM never sees the error message and cannot retry or adapt.

## Proposed Solution

Tool execution failures (query errors, validation failures, connection issues) should return `Ok(CallToolResult::error(vec![Content::text(message)]))` instead of `Err(ErrorD

[Read the thread](https://github.com/haymon-ai/dbmcp/issues/34) · 2026-03-29 · closed · 0 comments

The remaining reports are on [the project's issue tracker](https://github.com/haymon-ai/database/issues).
