
Boyce
io.github.boyce-ioPublished by GitHub account boyce-iov0.1.1Updated Oct 24, 2026
Deterministic SQL compiler for AI agents. Your agent stops guessing SQL.
Overview
A local MCP server that gives an AI assistant structured database context and a deterministic SQL compiler, so it can generate and check SQL instead of guessing
- What you can do
- Ingest schema and semantic context from dbt, LookML, DDL, SQLite, Django, SQLAlchemy, Prisma, CSV or Parquet sources, and store certified business definitions used at query time. Retrieve full schema context and the StructuredFilter format so the host model can build queries itself. Turn a natural-language request into a deterministic SQL statement, with NULL-risk checks and EXPLAIN pre-flight. Validate hand-written SQL without executing it, including Redshift linting. Run read-only SELECT queries and profile columns for null rate, distinct count and min/max. Check database connectivity, snapshot freshness and environment health.
- When to use it
- Useful when an assistant writes SQL against Postgres, Redshift, DuckDB or BigQuery and you want it to work from real schema and join information rather than guesses. Also suited to teams that want repeatable, byte-identical SQL output and a pre-flight check before queries reach a live database.
- Requirements
- Python 3.10+ and a local install of the boyce package (pip or uv); the postgres extra enables live adapters. A BOYCE_DB_URL connection string is optional and enables live querying, profiling and EXPLAIN pre-flight. MCP hosts using their own model need no LLM key; CLI or HTTP use requires BOYCE_PROVIDER and a provider key such as ANTHROPIC_API_KEY or OPENAI_API_KEY. Desktop MCP hosts only.
Installation
In SourceWeft
- Open Boyce in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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:
Why does this matter? → The Null Trap: Your AI Agent's SQL Is Correct. The Answer Is Still Wrong.
Install
Requires Python 3.10+
From source:
Quickstart
After installing, run boyce init to configure your MCP host automatically:
The wizard detects Claude Desktop, Cursor, Claude Code, and JetBrains (DataGrip, IntelliJ, etc.), and writes the correct config block for each.
Developing from source? The repo includes a setup script:
Configure Your MCP Host
The fastest path is boyce init — it detects your MCP host and writes the config automatically:
Or configure manually. There are two setup paths depending on your host:
Path 1 — MCP Hosts (No LLM key required)
If you're using Claude Desktop, Cursor, Claude Code, Codex, Cline, Windsurf, JetBrains (DataGrip,
IntelliJ), or any MCP-compatible host, you do not need to configure an LLM provider for Boyce.
The host's own model handles reasoning — Boyce supplies the schema context and deterministic SQL
compiler via get_schema and ask_boyce. Only BOYCE_DB_URL is needed (and even that is optional).
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
Cursor (.cursor/mcp.json in project root):
Path 2 — With Boyce's Built-in NL→SQL
If you're using the CLI (boyce ask), HTTP API, or a non-MCP client (e.g., the VS Code
extension), configure Boyce's internal query planner with your LLM provider:
Boyce supports any LLM provider available through LiteLLM: Anthropic, OpenAI, Ollama (local), vLLM (local), Azure, Bedrock, Vertex, Mistral, and more.
BOYCE_DB_URL is optional on both paths. Without it, Boyce runs in schema-only mode — SQL
generation still works; EXPLAIN pre-flight and live query tools return "status": "unchecked".
Environment Variables
MCP Tools
Architecture
Dialect support: redshift, postgres, duckdb, bigquery
Redshift safety rails (safety.py): Automatic linting for LATERAL, JSONB, REGEXP_COUNT, lookahead regex patterns, and numeric cast rewrites for Redshift 1.0 (PG 8.0.2).
Scan CLI
10 parsers: dbt manifest, dbt project, LookML, SQLite, DDL, CSV, Parquet, Django, SQLAlchemy, Prisma.
Verify the Install
SemanticSnapshot Format
The ingest_source tool accepts a SemanticSnapshot JSON dict. Minimal example:
See boyce/tests/live_fire/mock_snapshot.json for a complete field/entity example.
Project Layout
Status
Support
- Troubleshooting guide: docs/troubleshooting.md
- Local LLM setup (Ollama/vLLM): docs/local-llm-setup.md
- Bug reports: GitHub Issues
- Setup help: GitHub Issues
- Email: [email protected] — for issues involving credentials or sensitive config
Copyright 2026 Convergent Methods, LLC. MIT License.
Source: README.md at commit 9aad343
Tools
0Version history
1- v0.1.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts