Lintbase Mcp

io.github.Madia333由 GitHub 帳號 Madia333 發布v0.1.3更新於 Oct 24, 2026

Real-time Firestore schema context for AI coding agents. Stop hallucinating field names.

概覽

AI 產生的概覽

讓 AI 程式助理讀取 Firestore 資料庫的真實結構,並在寫程式前檢查結構漂移、安全、效能與成本問題。

可以做什麼
把 AI 程式助理連接到 Firestore 專案,讓它能查看真實的欄位名稱、型別與出現比例,而不是憑空猜測。工具包含 lintbase_get_schema(查看單一或全部集合的結構)、lintbase_scan(完整稽核,涵蓋結構、安全、效能、成本四類分析器並給出 0-100 風險分數),以及 lintbase_get_issues(依嚴重程度、集合或規則前綴篩選問題)。另外還提供一個選用的 agent skill 檔案,讓助理自動先檢查結構。
適用情境
適合在助理撰寫或重構 Firestore 程式碼時使用,讓程式碼立基於真實結構而非編造的欄位名稱。也適合在部署前檢查結構漂移、敏感集合、過大文件或高成本集合。
執行需求
以 stdio 本機程序執行,通常透過 npx 啟動 npm 套件 lintbase-mcp,因此需要 Node.js。需要提供目標專案的 Firebase 服務帳戶 JSON 金鑰,並需要連線至 Firestore 的網路存取。未宣告任何環境變數或標頭。
安裝前請注意
服務帳戶金鑰是權限很高的憑證;README 表示它透過 keyPath 參數傳入並留在本機,但持有該檔案的人即取得其對應權限,需謹慎保管。README 表示伺服器只對 Firestore 執行讀取操作,但它會取樣並回報文件內容與欄位名稱,其中可能包含個人或敏感資料。選用的 skill 安裝器會把 SKILL.md 複製到專案的 .agent/skills 目錄,進而改變助理行為。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Lintbase Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

lintbase-mcp

Give your AI coding agent real-time Firestore schema context — so it stops hallucinating field names.

[npm version] [npm downloads] [License: MIT] [MCP]


The Problem

When you ask Cursor, Claude, or Windsurf to write Firestore code, it guesses your schema.

// What your AI writes:await db.collection('users').doc(id).update({ name: value });
// What's actually in your DB:{ displayName, uid, email, createdAt, plan }   ← no "name" field

The result: silent bugs, runtime crashes, and schema drift baked in by your AI assistant.

The Fix

lintbase-mcp is a Model Context Protocol server that connects your AI agent directly to your Firestore database. Before writing any code, the agent checks what's actually there.

You: "Add a subscription status field to users"
Agent → lintbase_get_schema({ collection: "users" })      ← { uid, email, createdAt, plan, displayName }
Agent: "I can see users has uid, email, createdAt, plan, displayName.        I'll add subscriptionStatus as a string field alongside plan..."

No hallucinations. No drift. Ground-truth schema, every time.


Tools

ToolWhat it does
lintbase_scanFull database audit — schema drift, security issues, performance problems, cost leaks. Returns a structured report with a 0–100 risk score.
lintbase_get_schemaReturns real field names, types, and presence rates for one or all collections. Use before writing any DB code.
lintbase_get_issuesReturns filtered issues. Ask targeted questions: "any errors in users?", "all security issues?", "schema drift only?"

🤖 Agent Skill

Install the LintBase Agent Skill into any project so your AI agent automatically uses LintBase before writing Firestore code — no prompting required:

bash
npx -p lintbase-mcp lintbase-mcp-install-skill

This copies a SKILL.md file into .agent/skills/lintbase/ in your project. Cursor, Claude Code, Gemini CLI, and other MCP-compatible agents read this file on startup and follow its instructions automatically.

Same format as the Firebase official Agent Skills. ✅


Setup

You'll need a Firebase service account JSON key for your project.

Cursor

Add to .cursor/mcp.json in your project root:

json
{  "mcpServers": {    "lintbase": {      "command": "npx",      "args": ["-y", "lintbase-mcp"]    }  }}

Then in your conversation:

"Check my Firestore schema before writing this code. Key is at ./service-account.json"

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "lintbase": {      "command": "npx",      "args": ["-y", "lintbase-mcp"]    }  }}

Restart Claude Desktop and start a new conversation.

Windsurf

Add to your Windsurf MCP config:

json
{  "mcpServers": {    "lintbase": {      "command": "npx",      "args": ["-y", "lintbase-mcp"]    }  }}

Usage Examples

Once connected, your AI agent has three tools available. You can trigger them naturally in conversation or the agent will use them automatically when relevant.

Get the schema of a collection

"What fields are in the users collection?"→ lintbase_get_schema({ keyPath: "./sa.json", collection: "users" })

Returns:

markdown
## users  (50 docs sampled)| Field       | Type      | Presence | Stable ||-------------|-----------|----------|--------|| uid         | string    | 100%     | ✅     || email       | string    | 100%     | ✅     || createdAt   | timestamp | 100%     | ✅     || plan        | string    | 95%      | ✅     || displayName | string    | 62%      | ⚠️  ← mark as optional |

Run a full audit

"Run a full LintBase scan before I start this refactor"→ lintbase_scan({ keyPath: "./sa.json", sampleSize: 100 })

Returns: Complete report with risk score, all issues across 4 analyzers (schema drift, security, performance, cost).

Check for errors before deploying

"Any blocking errors I should know about?"→ lintbase_get_issues({ keyPath: "./sa.json", severity: "error" })

Check security issues only

"Are there any security problems with my database?"→ lintbase_get_issues({ keyPath: "./sa.json", rule: "security/" })

Security

  • Runs 100% locally — your service account key and Firestore data never leave your machine
  • The MCP server runs as a local stdio process spawned by your IDE
  • No data is sent to any LintBase servers during schema inspection
  • The server only performs read operations on your Firestore database

Available Filters for lintbase_get_issues

FilterValuesExample
severityerror, warning, infoOnly blocking errors
collectionany collection nameOnly issues in users
rulerule prefixschema/, security/, perf/, cost/

Rule Reference

RuleAnalyzerWhat it catches
schema/field-type-mismatchSchemaSame field holds multiple types across documents
schema/sparse-fieldSchemaField missing from >40% of documents
schema/high-field-varianceSchemaWildly different field counts between documents
security/sensitive-collectionSecurityCollection name suggests unprotected PII
security/field-contains-secretSecurityField name suggests stored secrets/tokens
security/debug-data-in-productionSecurityDebug/test collections left in production
perf/excessive-nestingPerformanceDocuments nested >5 levels deep
perf/document-too-largePerformanceDocuments approaching Firestore's 1MB limit
cost/large-avg-documentCostAverage document size driving up bandwidth costs
cost/logging-sinkCostCollection used as an unbounded write sink

Related

  • lintbase — The CLI tool. Run npx lintbase scan firestore --key ./sa.json for a full terminal report.
  • lintbase.com — Dashboard for teams: save scan history, track risk score over time, share reports.

License

MIT © Mamadou Dia

來源:packages/lintbase-mcp/README.md,提交 f0c53a5

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分