
Boyce
This is a semantic layer that sits between your LLM and your database to prevent the classic agentic SQL failure modes: hallucinated columns, missing joins, and the null trap where syntactically correct queries return silently wrong results. It ingests dbt manifests, LookML, DDL, or ten other schema sources into a graph, then exposes MCP tools like ask_boyce for natural language to deterministic SQL compilation and query_database for live Postgres or Redshift execution. The compiler runs without an LLM in the loop, so identical filters produce byte-identical SQL. Every query gets an EXPLAIN preflight check before execution. Reach for this when you're building agents that need to query production databases reliably, or when you're tired of debugging why your agent's SELECT statement returned plausible garbage at 2am.
- GitHub stars
- 1
- tools
- 8
- transport
- STDIO
- env vars
- 3
- last updated
- Apr 22, 2026
Tools
8 toolsPublic tool metadata for what this MCP can expose to an agent.
ingest_sourceParse a `SemanticSnapshot` from dbt manifest, dbt project, LookML, DDL, SQLite, Django, SQLAlchemy, Prisma, CSV, or Parquet.
Parse a `SemanticSnapshot` from dbt manifest, dbt project, LookML, DDL, SQLite, Django, SQLAlchemy, Prisma, CSV, or Parquet.
No parameter schema in public metadata yet.
ingest_definitionStore a certified business definition — injected automatically at query time.
Store a certified business definition — injected automatically at query time.
No parameter schema in public metadata yet.
get_schemaReturn full schema context + StructuredFilter format docs. Used by MCP hosts so the host LLM can construct queries without a Boyce API key.
Return full schema context + StructuredFilter format docs. Used by MCP hosts so the host LLM can construct queries without a Boyce API key.
No parameter schema in public metadata yet.
ask_boyceFull NL → SQL pipeline: query planner (LiteLLM) → deterministic kernel → NULL trap check → EXPLAIN pre-flight.
Full NL → SQL pipeline: query planner (LiteLLM) → deterministic kernel → NULL trap check → EXPLAIN pre-flight.
No parameter schema in public metadata yet.
validate_sqlValidate hand-written SQL — EXPLAIN pre-flight, Redshift lint, NULL risk — without executing.
Validate hand-written SQL — EXPLAIN pre-flight, Redshift lint, NULL risk — without executing.
No parameter schema in public metadata yet.
query_databaseExecute a read-only `SELECT` against the live database. Write operations rejected at two independent layers.
Execute a read-only `SELECT` against the live database. Write operations rejected at two independent layers.
No parameter schema in public metadata yet.
profile_dataNull %, distinct count, min/max for any column — surface data quality issues before they affect query results.
Null %, distinct count, min/max for any column — surface data quality issues before they affect query results.
No parameter schema in public metadata yet.
check_healthOperational health check — DB connectivity, snapshot freshness, actionable fix commands. Call when queries fail unexpectedly.
Operational health check — DB connectivity, snapshot freshness, actionable fix commands. Call when queries fail unexpectedly.
No parameter schema in public metadata yet.
Sponsors
Configuration
BOYCE_DB_URLPostgreSQL or Redshift connection string. Optional — tools work without live DB; required for live profiling and EXPLAIN pre-flight.
BOYCE_PROVIDERLLM provider for the NL→StructuredFilter planner (anthropic, openai). MCP hosts using their own model should not set this — the host's model does the reasoning and Boyce receives a pre-built StructuredFilter.
ANTHROPIC_API_KEYRequired only when BOYCE_PROVIDER=anthropic and the host does not supply its own model. MCP hosts (Claude Desktop, Cursor, Claude Code, Codex, Cline, Windsurf, JetBrains) do not need this.
Readme
Boyce: Semantic Protocol & Safety Layer for Agentic Database Workflows
The semantic safety layer for agentic database workflows. Boyce connects LLMs to live database context with built-in safety rails.
Named for Raymond F. Boyce, co-inventor of SQL (1974) and co-author of Boyce-Codd Normal Form (BCNF).
AI agents querying databases without proper context generate unreliable SQL — working from incomplete schemas, inferring column names, guessing join paths. Boyce gives agents the structured database intelligence they need to generate correct, safe SQL every time — through three interconnected systems:
Details
- Repository
- github.com/boyce-io/boyce
- Website
- convergentmethods.com/boyce
- Categories
- Databases, AI & LLM Tools
- Package
boyce- Transport
- STDIO
- Registry
- MCP registry, active