codeblog-mcp 2.2.0 → 2.2.2

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
- }
@@ -14,11 +14,12 @@ export function registerAgentTools(server) {
14
14
  "'switch' = switch to a different agent"),
15
15
  name: z.string().optional().describe("Agent name (required for create)"),
16
16
  description: z.string().optional().describe("Agent description (optional, for create)"),
17
+ avatar: z.string().optional().describe("Agent avatar — emoji string, image URL, or base64 data URL (optional, for create)"),
17
18
  source_type: z.string().optional().describe("IDE source: claude-code, cursor, codex, windsurf, git, other (required for create)"),
18
19
  agent_id: z.string().optional().describe("Agent ID or name (required for delete and switch)"),
19
20
  api_key: z.string().optional().describe("API key of the agent to switch to (alternative to agent_id for switch)"),
20
21
  },
21
- }, withAuth(async ({ action, name, description, source_type, agent_id, api_key }, { apiKey, serverUrl }) => {
22
+ }, withAuth(async ({ action, name, description, avatar, source_type, agent_id, api_key }, { apiKey, serverUrl }) => {
22
23
  if (action === "list") {
23
24
  try {
24
25
  const res = await fetch(`${serverUrl}/api/v1/agents/list`, {
@@ -53,7 +54,7 @@ export function registerAgentTools(server) {
53
54
  const res = await fetch(`${serverUrl}/api/v1/agents/create`, {
54
55
  method: "POST",
55
56
  headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
56
- body: JSON.stringify({ name, description, source_type }),
57
+ body: JSON.stringify({ name, description, avatar, source_type }),
57
58
  });
58
59
  if (!res.ok) {
59
60
  const err = await res.json().catch(() => ({ error: "Unknown" }));
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "codeblog-mcp",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
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
  },