BizMCP
Provides read-only SQL tools over the SQLite business database, including table listing, schema description, and capped, time-limited SELECT queries.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
BizMCP: LLM-Powered MCP Server
A production-style Model Context Protocol (MCP) server that lets Claude, GPT or any MCP client ground their answers in live business data. It ships with a web console, a full test suite and hardened Kubernetes manifests.
BizMCP exposes database, API and file tools plus FAISS semantic search over documents and database rows. LLMs can query real data through it without being trusted with it. Every tool is read-only and returns typed, structured output. Each tool family is guarded by several independent safety layers, so no single check has to be perfect.
You: "Why is order ORD-10118 late?"
Agent ├─ run_sql → shipped 2026-11-20, promised 2026-11-25, still in transit, tracking PP675046498849
├─ call_api → logistics.track_shipment: status=exception, "Weather delay at regional hub" (Louisville, KY)
├─ semantic_search → runbooks/carrier-delay-triage.md#step-2-classify-the-exception (score 0.40)
└─ run_sql → open ticket T-5263 (high priority, in progress)
Answer: The SLA is breached. Carrier weather exception at the Louisville hub. Per the triage
runbook, send a proactive delay notice and apply the shipping-charge breach credit.Table of contents
Related MCP server: Enterprise MCP Knowledge Platform
Highlights
10 MCP tools across 4 families: SQL, files, business APIs and semantic search. Each returns a Pydantic model, so clients get an
outputSchemaandstructuredContent, not just text.Read-only by construction:
A SQLite authorizer means the database engine itself refuses writes.
APIs are an allowlist of named endpoints, so the model never sends a URL (no SSRF).
Files are sandboxed against traversal and symlink escapes.
Live semantic search: FAISS
IndexIDMap2with incremental re-indexing. Edit a policy doc or insert a DB row, and only the changed chunks are re-embedded on the next search.Two transports: stdio (Claude Desktop / Claude Code) and streamable HTTP. HTTP adds bearer auth, DNS-rebinding protection, stateless mode for horizontal scaling,
/healthz,/readyzand Prometheus/metrics.Web console: a browser UI that is itself an MCP client. Every click is a real
tools/callthrough the same guardrails an LLM hits.Observability: a JSON audit log of every tool call, plus per-tool call counters and latency histograms.
123 tests: unit tests, protocol-level tests with a real MCP client, real stdio/HTTP server processes, the UI and the deployment manifests. Also ruff and mypy clean.
Kubernetes-ready: non-root, read-only rootfs, dropped capabilities, probes, HPA, PDB and NetworkPolicy.
Screenshots
Investigate an order | Live carrier timeline + policy search | SQL guardrail in action |
|
|
|
Captured in a narrow side panel (mobile layout). On a desktop browser the tool-call log sits beside the main panel.
Architecture
flowchart LR
subgraph Clients
A[Claude Desktop / Claude Code<br/>stdio]
B[Agents / GPT tool calling<br/>streamable HTTP + Bearer]
C[Web console<br/>in-process MCP client]
end
subgraph BizMCP["BizMCP server (MCPServer, mcp 2.x)"]
W[Tool wrapper<br/>audit log · metrics · safe errors]
DB[ReadOnlyDatabase<br/>authorizer · mode=ro · limits]
FS[FileSandbox<br/>no traversal · no symlink escape]
API[ApiClient<br/>allowlist · retries · size caps]
IDX[KnowledgeIndex<br/>FAISS IndexIDMap2 · incremental sync]
end
A --> W
B --> W
C --> W
W --> DB & FS & API & IDX
DB --> SQL[(SQLite business DB)]
FS --> DOCS[/Markdown policies & runbooks/]
IDX --> SQL
IDX --> DOCS
API --> LOG[Logistics API<br/>mock carrier service]Request path:
A client issues
tools/call.The MCP SDK validates the arguments against the tool's input schema.
The BizMCP wrapper starts an audit/metrics span.
The service runs its own validation plus engine-level guards.
It returns a Pydantic result that becomes
structuredContent.
The tool backends (tools/, retrieval/) are plain Python with no MCP imports, so they can be unit-tested and reused independently.
Quick start
Requirements: Python 3.11+ and macOS or Linux. The make targets assume a .venv in the repo.
make install # create .venv and install with dev extras
make seed # build the deterministic demo database → data/business.db
make ui # web console → http://localhost:8090Then open http://localhost:8090, click Show late orders, and pick one.
Run the full quality gate:
make check # ruff + format check + mypy + 123 tests (about 11 s)Behind a corporate proxy? If
pip installcannot reach PyPI, pointPIP_INDEX_URLat your organisation's package mirror before runningmake install.
Ways to use it
1. Web console (best for demos)
make ui # mock carrier API runs in-process
python -m bizmcp ui --external-api # or use LOGISTICS_API_URL insteadTab | What it shows |
Investigate | Pick a late order and watch the agent-style chain: SQL → live carrier API → SLA verdict → runbook search → tickets. Each step shows the tool used and its latency. |
Semantic search | FAISS results with score bars, sources and citations ( |
SQL | Read-only queries with a results table. Includes a "Try a write (blocked)" example. |
Tools | The exact tool list, descriptions and input schemas an LLM receives. Call any tool with raw JSON. |
Tool-call log | A live list of every call: green = success, red = blocked, with duration and arguments. |
The console binds to 127.0.0.1 and has no authentication. It's a local developer tool, not something to deploy.
2. Claude Desktop / Claude Code (stdio)
Copy examples/claude_desktop_config.json into your MCP client config and replace the absolute paths. Then ask questions in plain English: "Which carriers have the most late deliveries, and what does our policy say about breach credits?"
For live carrier data, also run make mock-api (port 8081).
3. Streamable HTTP (deployment mode)
BIZMCP_AUTH_TOKEN=change-me make serve-http # http://127.0.0.1:8000/mcp
make mock-api # in another terminal
python examples/client_demo.py --http http://127.0.0.1:8000/mcp --token change-me4. Scripted terminal demo (stdio)
make mock-api & # carrier API on :8081
make demo # runs the multi-tool investigation and prints each step
pkill -f "bizmcp mock-api"CLI reference
Command | Purpose |
| Run the MCP server |
| Run the web console (default port 8090) |
| Create the synthetic database |
| Run the mock logistics API (default port 8081) |
| Build and persist the FAISS index to |
Tools, resources & prompts
Tools
All tools are annotated readOnlyHint=true and idempotentHint=true. call_api is additionally openWorldHint=true.
Family | Tool | What it does |
Database |
| Tables and views with row counts |
| Columns, types, PK/FKs, three sample rows | |
| One read-only | |
Files |
| List the documents knowledge base (glob, recursive) |
| Read a document or a line range | |
| Literal (non-regex) text search with line numbers | |
APIs |
| The allowlisted endpoints and their parameters |
| Call an endpoint by id, e.g. | |
Search |
| FAISS vector search over docs, products and tickets, with citations |
| Index readiness, embedder, chunk counts, last sync |
Resources
URI | Content |
|
|
| Any knowledge-base document by relative path |
Prompts
Prompt | Purpose |
| Instructs the model to answer only from tool evidence, with citations |
| Step-by-step order investigation across SQL, API and policy search |
HTTP endpoints (HTTP transport only)
Path | Auth | Purpose |
| Bearer token | MCP streamable-HTTP endpoint |
| none | Liveness |
| none | Readiness. Returns 503 until the FAISS index has warmed up |
| none | Prometheus metrics (restrict with NetworkPolicy) |
Security model
Each threat is covered by layers that work independently, so bypassing one is not enough.
Threat | Mitigations |
SQL writes / DDL | (1) Lexical check: exactly one statement starting with |
Runaway / abusive queries | Wall-clock timeout via a progress handler. Row cap with a |
Path traversal | Relative paths only. Rejects |
SSRF / API abuse | The model never sends a URL, only a registered |
Secret leakage | API keys come from env vars ( |
Transport | Constant-time bearer-token comparison. DNS-rebinding protection with an explicit |
Error leakage | Only curated |
UI injection | The console renders server data with |
Every row above has tests (see Testing).
Semantic search: how "live" works
search(query) ─► fingerprint check (cheap file stats) ─► changed? ─► reload source ─► diff by SHA-256
└─► embed ONLY new/changed chunks
└─► FAISS remove_ids / add_with_idsSources:
Markdown docs, chunked by heading with overlap. Each chunk carries its heading path as context.
Database rows (
products,support_tickets), declared inconfig/index.yamlas format templates. Point it at your own tables.
Change detection: each source exposes a cheap fingerprint (file mtimes/sizes, DB + WAL stats). Checks are rate-limited by
BIZMCP_INDEX_MIN_CHECK_INTERVAL_S.Incremental updates: vectors live in a FAISS
IndexIDMap2keyed by a stable 63-bit hash of the chunk key. Inserts, updates and deletes cost O(changed) and never rebuild the index.Filtered search: source filters use FAISS
IDSelectorBatch, so filtering happens inside the search rather than after it.Persistence: with
BIZMCP_INDEX_DIR, the index and metadata are written atomically. On restart it loads without re-embedding, and rebuilds automatically if the embedder changes.
Embedders:
Embedder | When to use |
| Deterministic, offline, zero dependencies. Signed feature hashing of word uni/bi-grams + character n-grams. Lexical: matches refund/refunded but not broken/damaged. |
|
|
Demo dataset
bizmcp seed builds a deterministic synthetic e-commerce fulfillment dataset (fixed RNG seed, "as of" 2026-11-28 12:00):
Table | Rows | Notes |
| 5 | Fulfillment centers |
| 20 | Tiers, on-time ship rates, statuses |
| 92 | Titles and descriptions (embedded for search) |
| 188 | On-hand, reserved, reorder points, some low stock |
| 800 | About 36% of shipped orders are late (delivered late or still in transit past the promise date) |
| 1,266 | Line items |
| 282 | Late delivery, damage, returns, billing, inventory (embedded) |
The knowledge base in data/docs/ holds the returns policy, shipping SLA, fee schedule, carrier-delay and inventory runbooks, and seller performance standards.
The mock logistics API derives tracking timelines from the same orders. A late order in SQL therefore shows a matching carrier exception in the API, which makes multi-tool reasoning demonstrable.
Testing
make check # ruff + ruff format --check + mypy + pytest
make test-fast # skip the e2e tests that spawn processesSuite | What it proves |
| 15 write/DDL/ATTACH/PRAGMA attacks blocked, including ones that pass the lexical check. Timeout, row cap, value limits, schema introspection. |
| 7 traversal vectors, symlink escape, hidden files, binary/type rejection, truncation on line boundaries, literal search. |
| SQL↔API consistency, 8 path-injection payloads, schema validation, retry/backoff, timeouts, truncation, no redirects, no secret echo. |
| Embedding determinism across processes, chunking, policy-retrieval accuracy, live incremental re-indexing (exact add/update/remove counts), persistence. |
| Real MCP client (in-memory): tool schemas and annotations, structured output, error reporting, resources, prompts, metrics, a full multi-tool investigation. |
| Real processes over stdio and streamable HTTP: auth (401s), probes, live mock API, Prometheus counters. |
| Console serves assets, routes tool calls through MCP, surfaces guardrail errors, logs calls, rejects bad input. |
| Renders kustomize offline. Checks non-root, read-only rootfs, dropped caps, probes, resources, secret wiring, config↔service consistency. |
CI (.github/workflows/ci.yml) runs the suite on Python 3.11 and 3.13. It also builds the Docker image and smoke-tests /readyz and the 401 on /mcp.
Deploying to Kubernetes
docker build -t <your-registry>/bizmcp:0.1.0 . && docker push <your-registry>/bizmcp:0.1.0
# set the image in deploy/k8s/kustomization.yaml (images: newName/newTag)
kubectl create namespace bizmcp
kubectl -n bizmcp create secret generic bizmcp-auth --from-literal=token="$(openssl rand -hex 32)"
kubectl apply -k deploy/k8sManifest | Highlights |
| Deployment with 2+ replicas, startup/readiness/liveness probes, |
| Mock carrier API with the same hardening |
| Stateless HTTP, allowed hosts, index dir, API URL |
| Scales 2–6 replicas at 70% CPU; at least 1 pod always available |
| Only pods labelled |
BIZMCP_STATELESS_HTTP=true lets any replica serve any request, with no sticky sessions. Readiness stays false until the FAISS index has warmed up, so rolling updates never route traffic to a cold pod.
Render the manifests offline (no cluster contact) with make k8s-render.
Configuration
Every setting is a BIZMCP_* environment variable (see src/bizmcp/config.py).
Variable | Default | Purpose |
|
| SQLite database |
|
| Knowledge-base root (file sandbox) |
|
| API endpoint allowlist |
|
| What to embed |
|
|
|
| unset | Persist the FAISS index here |
|
| Minimum seconds between freshness checks |
|
| Query guardrails |
|
| Max bytes read per file |
|
| Upstream API limits |
|
| HTTP bind address |
| unset | Bearer token for |
|
| DNS-rebinding allowlist (JSON list) |
|
| Stateless streamable HTTP |
|
| Expanded into |
Project layout
llm-mcp-server/
├── src/bizmcp/
│ ├── server.py MCP wiring: tools, resources, prompts, routes, bearer auth
│ ├── tools/ database.py · files.py · api.py (pure Python, no MCP imports)
│ ├── retrieval/ embeddings.py · chunking.py · index.py (FAISS)
│ ├── ui.py, ui_static/ web console (MCP client + vanilla JS, no build step)
│ ├── observability.py audit log + Prometheus metrics
│ ├── seed.py deterministic synthetic dataset
│ ├── mock_api.py carrier API consistent with the DB
│ ├── config.py BIZMCP_* settings
│ └── cli.py `bizmcp` command
├── config/ apis.yaml (endpoint allowlist) · index.yaml (embedding sources)
├── data/docs/ policies, runbooks, guides (knowledge base)
├── deploy/k8s/ kustomize manifests
├── examples/ client_demo.py · claude_desktop_config.json
├── docs/screenshots/ console screenshots
├── tests/ 123 tests
├── Dockerfile · Makefile · pyproject.toml · .github/workflows/ci.ymlDesign decisions
Guard at the engine, not with regex. SQL safety comes from SQLite's authorizer and a read-only connection. The lexical check only exists to give friendlier error messages.
Named endpoints instead of URLs. Giving an LLM a generic HTTP tool invites SSRF. A registry of typed endpoints is safer and also easier for the model to use.
Structured outputs everywhere. Pydantic return types give clients machine-readable schemas, which reduces parsing errors in agent loops.
Incremental indexing over periodic rebuilds. Stable IDs plus content digests keep freshness cheap: O(changed), not O(corpus).
Stateless HTTP by default. It trades server-initiated requests (unused here) for trivial horizontal scaling behind a plain Service.
Backends independent of MCP.
tools/andretrieval/have no MCP imports, so they are easy to test and reusable behind other interfaces.The UI is a real MCP client. The demo exercises the actual protocol path, so what you see is what an LLM gets.
Known limitations & roadmap
The default
hashingembedder is lexical. Usesentence-transformersfor synonym-level search.SQLite is used for a self-contained demo. A Postgres backend would enforce read-only access via a read-only role and
SET TRANSACTION READ ONLY.The bearer token is a single static secret. OAuth 2.1 / per-client tokens (supported by the MCP SDK) are a natural next step.
The web console is a local developer tool with no authentication.
Possible additions: hybrid BM25 + vector retrieval, OpenTelemetry tracing, and an LLM-driven agent loop in the console.
Built with the MCP Python SDK 2.x (MCPServer), FAISS, Pydantic and Starlette. Licensed under MIT.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
One governed MCP endpoint for 40+ business systems. Read-only, source-cited answers.
Unified MCP Server is a remote MCP connector for AI agents and vertical AI products that provides access to 22,000+ authorized SaaS tools across 400+ integrations and 24 categories directly inside LLMs (Claude, GPT, Gemini, Cohere). Tools operate only on explicitly authorized customer connections, enabling agents to safely read and write against live third-party systems.
Get better answers from business data. Serve data from CRMs, databases, ERPs or SaaS apps via Dataddo MCP, which adds needed context and descriptions to improve correctness and reduce confidently wrong answers.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to securely search and ingest corporate documents via MCP, offering hybrid retrieval, PII sanitization, role-based access control, and citation validation.MIT
- FlicenseNot gradedqualityDmaintenanceEnables governed, read-only SQL analytics, hybrid RAG knowledge search, financial metric calculation, and database schema introspection through MCP, with role-based access control, audit logging, and AI observability.-
- AlicenseNot gradedqualityCmaintenanceProvides an OAuth-protected, scoped, and audited MCP server that lets AI assistants safely query business data through a fixed set of tools without direct database access.1MIT
- FlicenseAqualityCmaintenanceEnables AI agents to discover and query enterprise knowledge documents and business metrics through standardized MCP tools, supporting retrieval, structured sales/order analysis, anomaly scanning, and data lineage lookups.12-


