Boyce MCP Server

Deterministic SQL compiler for AI agents. Your agent stops guessing SQL.

Local serverstdioPython

What is the Boyce MCP server?

Most database access work still happens through a UI a human drives. Boyce MCP server moves it into the conversation instead. Deterministic SQL compiler for AI agents. Your agent stops guessing SQL.

The short version

Named for Raymond F. Boyce, co-inventor of SQL (1974) and co-author of Boyce-Codd Normal Form (BCNF).

The tools it exposes

The server publishes 8 tools. What each one is for:

  • ingest_source — Parse a SemanticSnapshot from dbt manifest, dbt project, LookML, DDL, SQLite, Django, SQLAlchemy, Prisma, CSV, or Parquet
  • ingest_definition — Store a certified business definition — injected automatically at query time
  • get_schema — Return full schema context + StructuredFilter format docs. Used by MCP hosts so the host LLM can construct queries without a Boyce API key
  • ask_boyce — Full NL → SQL pipeline: query planner (LiteLLM) → deterministic kernel → NULL trap check → EXPLAIN pre-flight
  • validate_sql — Validate hand-written SQL — EXPLAIN pre-flight, Redshift lint, NULL risk — without executing
  • query_database — Execute a read-only SELECT against the live database. Write operations rejected at two independent layers
  • profile_data — Null %, distinct count, min/max for any column — surface data quality issues before they affect query results
  • check_health — Operational health check — DB connectivity, snapshot freshness, actionable fix commands. Call when queries fail unexpectedly

Getting it running

The server ships on PyPI as boyce, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

What it needs from you

Configuration is passed through the environment: BOYCE_DB_URL, BOYCE_PROVIDER, BOYCE_MODEL, ANTHROPIC_API_KEY, OPENAI_API_KEY, BOYCE_HTTP_TOKEN. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

How it compares

This sits in the database access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Boyce's toolset — ingest_source, ingest_definition, get_schema and 5 more — is a fair guide to whether it matches your workflow. It is maintained by boyce-io; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
ingest_sourceParse a SemanticSnapshot from dbt manifest, dbt project, LookML, DDL, SQLite, Django, SQLAlchemy, Prisma, CSV, or Parquet.
ingest_definitionStore a certified business definition — injected automatically at query time.
get_schemaReturn full schema context + StructuredFilter format docs. Used by MCP hosts so the host LLM can construct queries without a Boyce API key.
ask_boyceFull NL → SQL pipeline: query planner (LiteLLM) → deterministic kernel → NULL trap check → EXPLAIN pre-flight.
validate_sqlValidate hand-written SQL — EXPLAIN pre-flight, Redshift lint, NULL risk — without executing.
query_databaseExecute a read-only SELECT against the live database. Write operations rejected at two independent layers.
profile_dataNull %, distinct count, min/max for any column — surface data quality issues before they affect query results.
check_healthOperational health check — DB connectivity, snapshot freshness, actionable fix commands. Call when queries fail unexpectedly.

How to install the Boyce MCP server

{
  "mcpServers": {
    "boyce": {
      "command": "uvx",
      "args": ["boyce"],
      "env": {
        "BOYCE_DB_URL": "your-value",
        "BOYCE_PROVIDER": "your-value",
        "BOYCE_MODEL": "your-value",
        "ANTHROPIC_API_KEY": "your-value",
        "OPENAI_API_KEY": "your-value",
        "BOYCE_HTTP_TOKEN": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
BOYCE_DB_URLEndpoint or connection string the server talks to.Yes
BOYCE_PROVIDERConfiguration value read at startup.Optional
BOYCE_MODELConfiguration value read at startup.Optional
ANTHROPIC_API_KEYCredential the server authenticates with.Yes
OPENAI_API_KEYCredential the server authenticates with.Yes
BOYCE_HTTP_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Boyce to ingest source.
  • Use Boyce to ingest definition.
  • Use Boyce to get schema.

Frequently asked questions

It connects Boyce to MCP-compatible AI assistants such as Claude and Cursor, exposing 8 tools (ingest_source, ingest_definition, get_schema, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Boyce directly.