AdoMcp logo

AdoMcp

Discover schemas, inspect indexes, run guarded read queries, and optionally execute writes across five database engines over MCP.

Install AdoMcp

Run the project’s own setup commands, in order.

Setup steps from the project

AdoMcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Add to Codex
    codex mcp add adomcp -- dnx -y AdoMcp
    
  2. 2. Install
    copilot plugin install John0King/AdoMCP
    
  3. 3. Add to your MCP client
    copilot plugin marketplace add John0King/AdoMCP
    
  4. 4. Install
    copilot plugin install adomcp@adomcp-plugins
    
  5. 5. Start the server
    dnx -y AdoMcp -- --http
    
  6. 6. Start the server
    dnx -y AdoMcp
    

Overview

AdoMcp connects MCP clients to SQL Server, MySQL/MariaDB, PostgreSQL, SQLite, and Oracle for database discovery and SQL execution. Its tools list connections and database objects, expose table schemas and indexes, return read-only queries as CSV, and optionally run write SQL. The default configuration disables writes, while static or runtime-added connections can be managed within the process. Use it when an agent needs structured database metadata and controlled access to operational data.

Use cases

  • Discover tables, views, procedures, and other database objects
  • Inspect column definitions, comments, keys, and indexes
  • Run read-only SQL against a configured connection
  • Add temporary database connections during an agent session
  • Enable explicitly authorized write operations

Key features

  • Supports SQL Server, MySQL/MariaDB, PostgreSQL, SQLite, and Oracle
  • Provides schema, comments, index, and object discovery
  • Returns read-only query results as CSV
  • Supports runtime connection management
  • Defaults to disabled write SQL
  • Runs over stdio or HTTP

Tools8

What AdoMcp lets your agent do. Expand a tool for its parameters.

Self-reported~122 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

23/25 checks healthy over the last 111d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars4Stargazers on the source repository.
Last commit6d agoMost recent push to the default branch.
Tools exposed8Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How AdoMcp works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about AdoMcp

AdoMcp is an MCP server that connects AI agents to SQL Server, MySQL/MariaDB, PostgreSQL, SQLite, and Oracle. Its main tools discover connections and database objects, inspect table schemas and indexes, run read-only SQL as CSV, and optionally execute write SQL when explicitly enabled for a connection.

Run `dnx -y AdoMcp` with a .NET 10 SDK installed. The command retrieves the package from NuGet when needed, so a separate installation is optional. You can also install the global .NET tool with `dotnet tool install -g AdoMcp` and then run `adomcp`.

Define a `Databases` array in `~/.adomcp.json`, application settings, User Secrets, or `ADOMCP_DATABASES`. Each entry uses a name, one of the supported database types, and a connection string. You can also add a connection during a session with `add_connection`.

Set `AllowAnySql` to `true` for the relevant static connection or globally, or start the server with `--allow-any-sql`. The equivalent environment variable is `ADOMCP_ALLOWANYSQL=true`. Write permission is determined when the process starts, and runtime-added connections inherit the global setting.

Yes. AdoMcp can be connected to any client that supports local MCP through its stdio configuration or to a client that supports its HTTP endpoint. The default local command is `dnx -y AdoMcp`; HTTP mode uses the `/mcp` endpoint.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAdoMcp AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/adomcp?style=directory)](https://allmcps.com/mcp/adomcp)
HTML Embed
<a href="https://allmcps.com/mcp/adomcp"><img src="https://allmcps.com/api/badge/adomcp?style=directory" alt="AdoMcp on AllMCPs" /></a>