Credentials. Database connection details and passwords are required, and the README only describes where the LLM API keys are stored in `.env`, so confirm where database credentials are kept before you add them.
Who it is forA data analyst who needs answers from a company database that contains phone numbers, emails, or ID numbers.
The problemSending raw database rows with personal data to a cloud LLM exposes that data.
The outcomeBaize queries the database through the RDBMS MCP server, redacts personal fields before the LLM sees them, and restores the original text in its answers.
What you need first
- Python 3.10 or newer with pip
- An API key for DeepSeek or another supported backend, or a local Ollama install
- Optional: IBM SPSS Statistics or a reachable SQL database, depending on the use case
Steps
pip install -r requirements-data.txt- For SQL Server only: install Microsoft ODBC Driver 18 for SQL Server at the system level, because
pyodbcalone is not enough. - Add your database connection to the MCP server settings; the README names the MCP protocol but does not show the exact config format, so check the project documentation. (inferred, check the README)
baize- At the
>>> Decree:prompt, type/privacyto confirm privacy protection is on, then ask your question about the database.
Prompt for your agent
Using the Baize CLI from the Xu123-Bob/Baize repo with privacy protection on, ask it to count rows in <table-name> of <database-name> and summarize the result. Expected output: a row count and a short summary with no raw personal values. Verify that no phone number or email appears in the LLM-facing prompt log.
Caveat. The README does not show how to configure the RDBMS MCP server, so the connection step must be confirmed from the project documentation.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for Xu123-Bob/Baize and "Query a SQL database while redacting personal data before the LLM sees it"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer