Lintbase
OfficialThis server lets you analyze Firestore databases for schema, security, performance, and cost issues โ giving AI agents ground-truth database knowledge before writing code. It provides three tools:
lintbase_scan: Runs a full scan of your Firestore database to detect schema drift, security vulnerabilities (e.g., no auth), performance problems (e.g., large docs), and cost leaks (e.g., large collections). Returns a structured report with a risk score and prioritized, actionable issues.lintbase_get_schema: Samples real Firestore documents to retrieve the actual schema of one or all collections, including field names, observed data types, and presence rates. Helps AI agents avoid hallucinating field names before writing database code.lintbase_get_issues: Runs all analyzers and returns a filtered list of issues. Supports filtering by severity (error,warning,info), collection name, or rule prefix (schema/,security/,perf/,cost/). Lighter-weight than a full scan โ returns only actionable issues without summary metadata.
All tools accept a Firebase service account key path and optional sample size/collection filters to control scope and cost.
Provides real-time Firestore schema context to AI agents, enabling accurate database queries and security rule validation.
Provides real-time MongoDB schema context to AI agents, enabling accurate database queries and schema validation.
LintBase
Ground Truth for AI Coding Agents. LintBase gives AI agents real-time knowledge of your database schema, security rules, and architecture so they stop hallucinating your codebase.
npx lintbase export-context firestore --key ./service-account.json
Why LintBase?
Developers are constantly feeding context files to AI tools like Cursor, Windsurf, Copilot Workspace, and Claude Code. If your agent doesn't understand your real database schema, it writes code that fails in production.
LintBase acts as the bridge. It connects directly to your database, reads the ground truth of your live documents, and generates structured context optimized for AI.
๐ค Stops AI Hallucinations โ Generates exact schema, field presence rates, and types.
๐ Catches Schema Drift โ CI protection with
lintbase checkagainst schema snapshots.๐ Security Context โ Highlights missing rules or exposed PII before your AI writes queries.
๐ธ Cost Awareness โ Prevents AI from writing unbounded queries on 2M+ document collections.
๐ Universal NoSQL โ Works effortlessly with Firestore and MongoDB.
Why not just let the agent read the code?
Because in document databases, the code lies. The real schema is whatever your live documents actually contain, and that drifts away from the code with every half-finished migration, every renamed field, and every previous AI session that wrote in a hurry. An agent inferring the schema from TypeScript interfaces writes plausible queries against a database that no longer exists. The failure is silent: empty results, undefined values, a new field variant living alongside the old one. LintBase reads the documents, not the code.
Limitations (honest ones)
Firestore and MongoDB only. Postgres is the obvious gap and it is next.
Large collections are sampled, not fully scanned. Presence rates are estimates on multi-million-document collections.
The MCP server is newer than the CLI. Expect rough edges there first.
Related MCP server: Carto MCP Server
๐ค AI Context Export (For Cursor, Claude, Windsurf)
The fastest way to give your AI agent perfect database knowledge.
npx lintbase export-context firestore --key ./service-account.jsonOutput:
/lintbase-context/
โโโ database-schema.md
โโโ collections.md
โโโ security-rules.md
โโโ architecture.md
โโโ risk-report.mdDrop the lintbase-context folder into your AI's context window, or mention it in .cursorrules. Your agent will now write perfect, drift-free database queries.
Quick Start
1. Get a service account key
Firebase Console โ Project Settings โ Service Accounts โ Generate new private key
Save the JSON file. Never commit it to git.
2. CI Pipeline Protection (Schema Drift)
LintBase acts as "Version Control for your Schema". Run the snapshot command to create a baseline:
npx lintbase snapshot firestore --key ./service-account.jsonCommit .lintbase/schema.json to your repository. Then, add the check command to your CI/CD pipeline (GitHub Actions, GitLab CI):
npx lintbase check firestore --key ./service-account.json --fail-on errorIf a query or deployment accidentally deletes a critical field or changes a type (e.g., string to number), your CI build will fail instantly.
3. Run a general scan
npx lintbase scan firestore --key ./service-account.jsonYou'll see a full report in your terminal:
LintBase โ Firestore Scan
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Collections scanned: 12
Documents sampled: 847
Issues found: 23 (4 errors ยท 11 warnings ยท 8 infos)
Risk score: 67 / 100 [HIGH]
ERRORS
โ users no-auth-check Documents readable without authentication
โ orders missing-index Query on `status` + `createdAt` has no composite index
โ debug_logs large-collection Collection has 2.4M docs โ estimated $340/mo in reads
WARNINGS
โ products schema-drift Field `price` found as both Number and String
โ sessions ttl-missing No expiry field โ stale docs accumulate indefinitely
...3. Save to your dashboard (optional)
Track your database health over time at lintbase.com:
npx lintbase scan firestore \
--key ./service-account.json \
--save https://www.lintbase.com \
--token <your-api-token>Get your token at lintbase.com/dashboard/settings.
Supported Databases
Firestore:
npx lintbase scan firestore --key ./sa.jsonMongoDB:
npx lintbase scan mongodb --uri mongodb+srv://user:pass@cluster.mongodb.net/test
๐ค AI Agent Integration (MCP)
Using Cursor, Claude Desktop, or Windsurf? Install lintbase-mcp to give your AI agent real-time Firestore schema context โ so it stops hallucinating field names.
Add to .cursor/mcp.json:
{
"mcpServers": {
"lintbase": {
"command": "npx",
"args": ["-y", "lintbase-mcp"]
}
}
}Now when you ask your AI "add a field to users", it will check your real schema first before writing a line of code.
โ Full setup guide & tools reference
What it catches
๐ Security
Rule | What it detects |
| Collections readable/writable without auth |
| Email, phone, SSN fields without encryption markers |
| Documents with overly permissive security rules |
๐ธ Cost
Rule | What it detects |
| Collections with 100k+ docs and high read cost |
| Queries without |
| Filter combinations that fall back to full collection scans |
| Collections that look like temporary data that was never cleaned up |
๐ Schema Drift
Rule | What it detects |
| Field stored as different types across documents |
| Field present in 90%+ of docs but absent in some |
| Reference fields that are sometimes null |
โก Performance
Rule | What it detects |
| Document fields nested > 3 levels deep |
| Documents approaching the 1MB Firestore limit |
| Single document updated by many users simultaneously |
| Collections without a standard pagination field |
Options
lintbase <command> <database> [options]
Commands:
scan <database> Scan a database and print diagnostic report
export-context <database> Export schema to markdown/JSON for AI agents
snapshot <database> Generate local schema snapshot for CI comparison
check <database> Run in headless CI mode (fails on schema drift)
Options:
--key <path> Path to Firebase service account JSON
--uri <uri> MongoDB connection URI
--limit <n> Max documents to sample per collection [default: 100]
--max-depth <n> Firestore: tiers to recurse into subcollections
(1 = top-level only) [default: 2]
--fail-on <lvl> Fail pipeline if issues exceed severity (error, warning, info)
--save <url> Dashboard URL to save results
--token <token> API token for dashboard (from lintbase.com)
--collections Comma-separated list of collections to scan
-h, --help Show helpDashboard
The CLI is free forever. The dashboard visualizes your scan results as an interactive schema map โ your credentials never leave your machine.
What Pro gets you via --save:
โฌก Schema Map โ every collection as a draggable card, with real field names, types, presence rates, and issue badges
โ Health Radar โ per-collection spider chart across Schema, Security, Performance, and Cost axes
โ Priority Quadrant โ 2ร2 bubble chart of Impact vs. Ease of Fix โ tells you what to fix first
โ Drift Timeline โ stored history across scans so you can replay your schema architecture over time.
CLI Local Tooling: 100% Free ยท Pro: $39/month โ unlimited history, dashboards, and shared team workflow.
Security
Your service account key never leaves your machine โ it is only read locally
Document sampling is hard-capped at
--limit(default 100) to prevent accidental read costsThe
--saveflag only sends the scan summary and issue list โ never raw document data
License
MIT ยฉ Mamadou Dia
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceTransforms static coding standards into a queryable live data store for AI agents, delivering task-specific rules and fix guidance on demand. This optimizes context window usage through progressive disclosure, ensuring agents apply relevant governance without loading massive documentation.Last updated2MIT
- Alicense-qualityBmaintenanceEnables AI coding tools to query your live codebase for routes, import graph, domain context, and blast radius, eliminating hallucinations about project structure.Last updated28264MIT
- Alicense-qualityDmaintenanceConnect your LLMs to SQL databases safely and intuitively using the Model Context Protocol (MCP). NLP Database acts as a secure, read-only bridge that allows AI agents to explore schemas and query data using natural language.Last updated3MIT
- Alicense-qualityCmaintenanceEnables AI agents to understand and query your database safely by providing a semantic layer of metadata, with tools to search, explain, validate, and generate safe SQL.Last updated2MIT
Related MCP Connectors
Lints + auto-fixes how AI coding agents discover any new product. 24 rules, 6 tools, score 0-100.
The WAF for agents. Pattern-based + heuristic firewall scans prompts, RAG documents, tool argume...
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lintbase/lintbase'
If you have feedback or need assistance with the MCP directory API, please join our Discord server