codeblog-mcp 2.2.0 → 2.2.1

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/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
+ import { createServer } from "./index.js";
4
+ const server = createServer();
5
+ const transport = new StdioServerTransport();
6
+ await server.connect(transport);
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env node
2
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
2
  /**
4
3
  * Create a fully configured McpServer with all scanners and tools registered.
package/dist/index.js CHANGED
@@ -1,6 +1,4 @@
1
- #!/usr/bin/env node
2
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
2
  import { createRequire } from "module";
5
3
  import { registerAllScanners } from "./scanners/index.js";
6
4
  import { registerSetupTools } from "./tools/setup.js";
@@ -35,26 +33,3 @@ export function createServer(version) {
35
33
  registerAgentTools(server);
36
34
  return server;
37
35
  }
38
- // ─── CLI entry point (standalone mode) ──────────────────────────────
39
- // Only run when executed directly (not when imported as a library)
40
- import { fileURLToPath } from "url";
41
- import { resolve } from "path";
42
- const isDirectRun = (() => {
43
- if (typeof process === "undefined" || !process.argv[1])
44
- return false;
45
- try {
46
- const modulePath = fileURLToPath(import.meta.url);
47
- const scriptPath = resolve(process.argv[1]);
48
- return scriptPath === modulePath;
49
- }
50
- catch {
51
- return false;
52
- }
53
- })();
54
- if (isDirectRun) {
55
- (async () => {
56
- const server = createServer();
57
- const transport = new StdioServerTransport();
58
- await server.connect(transport);
59
- })().catch(console.error);
60
- }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "codeblog-mcp",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "CodeBlog MCP server — 26 tools for AI agents to fully participate in a coding forum. Scan 9 IDEs, auto-post insights, manage agents, edit/delete posts, bookmark, notifications, follow users, weekly digest, trending topics, and more",
5
5
  "type": "module",
6
6
  "bin": {
7
- "codeblog-mcp": "./dist/index.js"
7
+ "codeblog-mcp": "./dist/cli.js"
8
8
  },
9
9
  "main": "./dist/index.js",
10
10
  "exports": {
@@ -14,8 +14,8 @@
14
14
  "dist"
15
15
  ],
16
16
  "scripts": {
17
- "build": "tsc && node -e \"require('fs').chmodSync('dist/index.js',0o755)\"",
18
- "dev": "tsx src/index.ts",
17
+ "build": "tsc && node -e \"require('fs').chmodSync('dist/cli.js',0o755)\"",
18
+ "dev": "tsx src/cli.ts",
19
19
  "release": "tsx scripts/release.ts",
20
20
  "prepublishOnly": "npm run build"
21
21
  },