# AdoMcp [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/John0King/AdoMCP  
**GitHub Stars:** 4  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/adomcp

## Description
Database MCP server for schema discovery, comments, and SQL queries.

## Tools
Capabilities this server exposes over MCP:

- **list_connections** — List configured database connections
- **add_connection** — Add (or replace) a database connection at runtime
- **remove_connection** — Remove a dynamically-added connection
- **list_objects** — List database objects (table/view/procedure/function/trigger/sequence/synonym, etc.)
- **get_table_schema** — Get table schema details (columns/types/nullability/PK/default/comments)
- **get_table_indexes** — Get table indexes
- **query_sql** — Execute read-only SQL and return CSV
- **execute_sql** — Execute write SQL (requires `--allow-any-sql`)

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/John0King/AdoMCP), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Add to Codex:

```sh
codex mcp add adomcp -- dnx -y AdoMcp
```

2. Install:

```sh
copilot plugin install John0King/AdoMCP
```

3. Add to your MCP client:

```sh
copilot plugin marketplace add John0King/AdoMCP
```

4. Install:

```sh
copilot plugin install adomcp@adomcp-plugins
```

5. Start the server:

```sh
dnx -y AdoMcp -- --http
```

6. Start the server:

```sh
dnx -y AdoMcp
```

## Documentation

## What AdoMcp does

AdoMcp exposes database administration and query capabilities through the Model Context Protocol. It supports SQL Server through Microsoft.Data.SqlClient, MySQL and MariaDB through MySqlConnector, PostgreSQL through Npgsql, SQLite through Microsoft.Data.Sqlite, and Oracle through Oracle.ManagedDataAccess.Core.

The server can inspect tables, views, procedures, functions, triggers, sequences, synonyms, and other database objects. Table metadata includes columns, data types, nullability, primary keys, defaults, and comments. Index information is available separately. SQL reads return CSV output, while write operations are available only when enabled for the target connection.

## How it works

AdoMcp starts in stdio mode by default, keeping MCP JSON-RPC traffic on stdout and writing logs to stderr. It can also run as an HTTP server, with clients connecting to the `/mcp` endpoint. The package can be launched on demand with `dnx -y AdoMcp` or installed as a global .NET tool.

A typical agent workflow begins by listing configured connections, locating the relevant schema and object with `list_objects`, and inspecting its structure with `get_table_schema` and `get_table_indexes`. It can then use `query_sql` for read-only validation. `add_connection` and `remove_connection` support temporary connection changes that last only for the running process.

## Setup and configuration

A .NET 10 SDK is required. The package can be obtained automatically from NuGet when launched with `dnx`, so a separate AdoMcp installation is not necessary for that mode.

Connections may be defined in `appsettings.json`, environment-specific application settings, `~/.adomcp.json` (or `%USERPROFILE%\\.adomcp.json` on Windows), .NET User Secrets, or environment variables. Later configuration sources override earlier ones. Each database entry includes a name, supported `DbType`, connection string, and optional description.

The server also accepts `ADOMCP_MODE`, `ADOMCP_URLS`, `ADOMCP_ALLOWANYSQL`, and `ADOMCP_DATABASES`. HTTP mode can be selected with `--http`; otherwise stdio is used. Avoid committing real connection strings to source control.

## Tools and capabilities

- `list_connections` reports configured connections and their effective write permission.
- `add_connection` adds or replaces a connection for the current process.
- `remove_connection` deletes a runtime-added connection.
- `list_objects` searches database metadata across supported object types.
- `get_table_schema` returns structural details and available comments.
- `get_table_indexes` retrieves indexes for a table.
- `query_sql` accepts a single read-only `SELECT` or `WITH` statement and returns CSV.
- `execute_sql` runs write SQL when permission is enabled.

## Limitations and notes

Write SQL is disabled by default. It requires `AllowAnySql` in the applicable configuration or the `--allow-any-sql` startup option; changing a configuration file after startup does not alter the running process. Runtime-added connections inherit the global setting and do not persist after restart.

The read-query guard uses conservative lexical checks rather than a complete SQL parser. It rejects writes, DDL, procedure calls, transaction control, and multi-statement batches, while certain database-side function side effects cannot be detected. SQLite has no native comment support. Oracle objects without an owner may resolve through synonyms and may need additional inspection.

_Full upstream README: https://allmcps.com/mcp/adomcp/readme_

