lintbase-mcp 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -51,6 +51,20 @@ No hallucinations. No drift. Ground-truth schema, every time.
51
51
 
52
52
  ---
53
53
 
54
+ ## 🤖 Agent Skill
55
+
56
+ Install the LintBase **Agent Skill** into any project so your AI agent automatically uses LintBase before writing Firestore code — no prompting required:
57
+
58
+ ```bash
59
+ npx -p lintbase-mcp lintbase-mcp-install-skill
60
+ ```
61
+
62
+ 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.
63
+
64
+ Same format as the [Firebase official Agent Skills](https://firebase.blog/posts/2025/02/firebase-agent-skills). ✅
65
+
66
+ ---
67
+
54
68
  ## Setup
55
69
 
56
70
  You'll need a [Firebase service account JSON key](https://firebase.google.com/docs/admin/setup#initialize_the_sdk_in_non-google_environments) for your project.
package/dist/server.js CHANGED
@@ -2,8 +2,66 @@
2
2
  "use strict";
3
3
  // packages/lintbase-mcp/src/server.ts
4
4
  // Entry point for the LintBase MCP server.
5
- // Run via `npx lintbase-mcp` — the IDE spawns this as a stdio process.
5
+ //
6
+ // Usage:
7
+ // npx lintbase-mcp → starts MCP server (for Cursor/Claude/IDE)
8
+ // npx lintbase-mcp install-skill → installs SKILL.md into .agent/skills/lintbase/
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || (function () {
26
+ var ownKeys = function(o) {
27
+ ownKeys = Object.getOwnPropertyNames || function (o) {
28
+ var ar = [];
29
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
+ return ar;
31
+ };
32
+ return ownKeys(o);
33
+ };
34
+ return function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
41
+ })();
6
42
  Object.defineProperty(exports, "__esModule", { value: true });
43
+ const fs = __importStar(require("fs"));
44
+ const path = __importStar(require("path"));
45
+ // ── Subcommand: install-skill ──────────────────────────────────────────────────
46
+ if (process.argv[2] === 'install-skill') {
47
+ const SKILL_SRC = path.join(__dirname, '..', 'skill', 'SKILL.md');
48
+ const TARGET_DIR = path.join(process.cwd(), '.agent', 'skills', 'lintbase');
49
+ const TARGET_FILE = path.join(TARGET_DIR, 'SKILL.md');
50
+ fs.mkdirSync(TARGET_DIR, { recursive: true });
51
+ fs.copyFileSync(SKILL_SRC, TARGET_FILE);
52
+ console.log('');
53
+ console.log('✅ LintBase skill installed to:');
54
+ console.log(' ' + TARGET_FILE);
55
+ console.log('');
56
+ console.log('Your AI agent will now automatically check the real Firestore schema');
57
+ console.log('before writing any database code.');
58
+ console.log('');
59
+ console.log('Make sure lintbase-mcp is configured in your IDE:');
60
+ console.log(' → https://www.npmjs.com/package/lintbase-mcp');
61
+ console.log('');
62
+ process.exit(0);
63
+ }
64
+ // ── MCP Server ────────────────────────────────────────────────────────────────
7
65
  const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
8
66
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
9
67
  const scan_tool_js_1 = require("./tools/scan.tool.js");
@@ -11,7 +69,7 @@ const schema_tool_js_1 = require("./tools/schema.tool.js");
11
69
  const issues_tool_js_1 = require("./tools/issues.tool.js");
12
70
  const server = new mcp_js_1.McpServer({
13
71
  name: 'lintbase-mcp',
14
- version: '0.1.0',
72
+ version: '0.1.6',
15
73
  });
16
74
  // ── Register all 3 tools ──────────────────────────────────────────────────────
17
75
  (0, scan_tool_js_1.registerScanTool)(server); // Full scan → complete report
@@ -21,8 +79,7 @@ const server = new mcp_js_1.McpServer({
21
79
  async function main() {
22
80
  const transport = new stdio_js_1.StdioServerTransport();
23
81
  await server.connect(transport);
24
- // Log to stderr so it doesn't pollute the MCP stdio protocol on stdout
25
- console.error('LintBase MCP server v0.1.0 running on stdio');
82
+ console.error('LintBase MCP server v0.1.6 running on stdio');
26
83
  }
27
84
  main().catch((err) => {
28
85
  console.error('Fatal error starting LintBase MCP server:', err);
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;AACA,sCAAsC;AACtC,2CAA2C;AAC3C,uEAAuE;;AAEvE,oEAAoE;AACpE,wEAAiF;AAEjF,uDAAwD;AACxD,2DAA4D;AAC5D,2DAA4D;AAE5D,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;IACzB,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,OAAO;CACnB,CAAC,CAAC;AAEH,iFAAiF;AACjF,IAAA,+BAAgB,EAAC,MAAM,CAAC,CAAC,CAAK,8BAA8B;AAC5D,IAAA,mCAAkB,EAAC,MAAM,CAAC,CAAC,CAAG,6CAA6C;AAC3E,IAAA,mCAAkB,EAAC,MAAM,CAAC,CAAC,CAAG,qCAAqC;AAInE,iFAAiF;AACjF,KAAK,UAAU,IAAI;IACf,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CA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ase-mcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "mcpName": "io.github.Madia333/lintbase-mcp",
5
5
  "description": "MCP server for LintBase — give AI coding agents real-time database schema context.",
6
6
  "main": "dist/server.js",
File without changes