Phx DB Explorer MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Phx DB Explorer MCP ServerShow me all tables in the HR schema."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Phx DB Explorer MCP Server
A Model Context Protocol (MCP) server that exposes your SQL Server database schema to AI coding assistants (GitHub Copilot, Cursor, etc.). It allows AI tools to discover tables, views, stored procedures, functions, indexes, foreign keys, and more — without writing any SQL themselves.
Prerequisites
Requirement | Version | Notes |
10.0 or later | Required to build and run | |
Any recent version | Required for integration tests only |
Related MCP server: mcp-server-mssql
Project Structure
src/
├── PhxDbExplorer/ # MCP server application
├── PhxDbExplorer.Tests/ # Unit tests (xUnit, Moq)
└── PhxDbExplorer.IntegrationTests/ # Integration tests (Testcontainers, requires Docker)Configuration
The server is configured entirely through environment variables.
Variable | Required | Description |
| ✅ Yes | Database type. Use |
| ✅ Yes | Full ADO.NET connection string for the target database. |
| ❌ No | Comma-separated list of schemas to expose (default: |
Example values:
DB_TYPE=mssql
CONNECTION_STRING=Server=localhost,1433;Database=MyDb;User Id=sa;Password=YourPassword;TrustServerCertificate=True;
SCHEMA_FILTER=dbo,hrInstallation
Option A — Download a prebuilt binary (recommended)
Self-contained, single-file executables are published as GitHub Releases for every tagged version — no .NET SDK (or even the .NET runtime) required on the target machine.
Go to the Releases page.
Download the archive matching your OS/architecture:
Asset
Platform
PhxDbExplorer-<version>-win-x64.zipWindows x64
PhxDbExplorer-<version>-linux-x64.tar.gzLinux x64
PhxDbExplorer-<version>-osx-x64.tar.gzmacOS (Intel)
PhxDbExplorer-<version>-osx-arm64.tar.gzmacOS (Apple Silicon)
Extract it and point your MCP client at the extracted
PhxDbExplorer(orPhxDbExplorer.exe) binary.
Each release should have all four assets attached — if one is missing, check the release workflow run for that tag.
Option B — Build from source
Requires the .NET SDK (see Prerequisites above).
dotnet buildOption C — npx (used by the PHR-Foundry Claude Code plugin)
package.json at the repo root wraps Option A behind an npx launcher, so
nothing needs to be downloaded or installed by hand:
npx -y github:hsenidBiz/phx-dbexplorerOn first run it downloads the release asset matching your OS/arch into
~/.cache/phx-dbexplorer-mcp/<version>/<rid>/ and execs it; later runs reuse
the cached binary. Pin a specific tag with PHX_DBEXPLORER_VERSION=1.2.0
(defaults to the latest release). This is what an MCP client's command
should point at instead of a local binary path — see
phr-foundry's org-standards
plugin for the registered mcpServers entry.
This repo must stay public. The launcher's download step (GET /repos/.../releases/latest and the release asset itself) is unauthenticated
— it has no way to use a developer's own git/GitHub credentials — so a
private repo would 404 for anyone without direct access, defeating the point
of the npx install path.
You still need to set DB_TYPE / CONNECTION_STRING / SCHEMA_FILTER
yourself (see Configuration above) — npx only fetches
and runs the binary, it doesn't supply your database credentials. In the
org-standards plugin these are wired up from PHX_DB_TYPE /
PHX_DB_CONNECTION_STRING / PHX_DB_SCHEMA_FILTER in your own shell
environment.
Archive extraction on Windows uses a small self-contained zip reader (Node's
built-in zlib, no external dependency) rather than shelling out to tar —
GNU tar (e.g. the one bundled with Git Bash) can't read .zip at all, and a
Windows path's drive-letter colon confuses tar's remote-archive detection
regardless. Linux/macOS releases are .tar.gz and still extract via the
system tar, which every POSIX machine has.
Registering the Server with an MCP Client
The server is not launched directly. Instead, it is registered in your editor's MCP configuration file so the editor starts and manages it automatically.
VS Code — .vscode/mcp.json
Create (or update) .vscode/mcp.json in your workspace:
{
"servers": {
"phx-dbexplorer": {
"type": "stdio",
"command": "Path to PhxDbExplorer.exe",
"args": [],
"env": {
"DB_TYPE": "mssql",
"CONNECTION_STRING": "Server=localhost,1433;Database=YourDatabase;User Id=YourUsername;Password=YourPassword;TrustServerCertificate=True;",
"SCHEMA_FILTER": "YourSchema"
}
}
}
}Tip: For a published/built binary, replace the
dotnet runcommand with the path to the compiled executable (e.g."command": "path/to/PhxDbExplorer.exe").
Once registered, restart your editor and the MCP server will be available to any AI assistant that supports the MCP protocol.
Available MCP Tools
These tools are automatically available to your AI assistant once the server is running.
Tool | Description |
| Lists all tables and views in the configured schema(s) with type and description. |
| Returns full schema for a table/view: columns, foreign keys, indexes, and constraints. |
| Lists all stored procedures in the configured schema(s). |
| Returns the full definition of a stored procedure including parameters and SQL source. |
| Lists all user-defined functions (UDFs) in the configured schema(s). |
| Returns the full definition of a function including parameters and SQL source. |
| Case-insensitive keyword search across tables, views, columns, procedures, and functions. |
Running Tests
Unit Tests
No extra dependencies required.
dotnet test src/PhxDbExplorer.TestsTests use xUnit, Moq, and FluentAssertions to verify tool behavior and configuration logic in isolation.
Integration Tests
⚠️ Docker is required. Integration tests use Testcontainers to automatically pull and start a SQL Server 2022 container. Docker must be running before executing these tests.
dotnet test src/PhxDbExplorer.IntegrationTestsThe container is started automatically at the beginning of the test run and torn down when the tests complete. No manual database setup is needed.
Releasing
Pushing a tag matching v*.*.* (e.g. v1.2.0) triggers the release workflow, which runs the unit tests, publishes self-contained single-file binaries for win-x64, linux-x64, osx-x64, and osx-arm64, and attaches them to a new GitHub Release.
git tag v1.2.0
git push origin v1.2.0See docs/readme.md for the full CI/CD pipeline documentation, including artifact naming, job breakdown, and pipeline verification history.
Contributing
Fork the repository and create a feature branch.
Make your changes — keep them focused and well-tested.
Ensure all unit tests pass (
dotnet test src/PhxDbExplorer.Tests).Open a pull request with a clear description of the change.
Every pull request runs the CI workflow automatically: build, unit tests, and integration tests (Testcontainers spins up its own SQL Server container on the runner — no setup needed on your end).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables AI assistants to securely interact with Microsoft SQL Server databases to query data, inspect schemas, and retrieve metadata with read-only operations by default and optional write capabilities.Last updated1MIT
- AlicenseBqualityCmaintenanceEnables AI agents to interact with Microsoft SQL Server databases via MCP, supporting table listing, schema retrieval, and CRUD operations.Last updated31MIT
- Flicense-qualityDmaintenanceEnables AI assistants to query SQL Server databases and retrieve schema information securely through the Model Context Protocol.Last updated
- FlicenseCqualityCmaintenanceEnables AI assistants to analyze and query SQL Server databases, including schema discovery, health checks, and data retrieval.Last updated10
Related MCP Connectors
Official Microsoft MCP Server to query Microsoft Entra data using natural language
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
GibsonAI MCP server: manage your databases with natural language
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hsenidBiz/phx-dbexplorer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server