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 分