@khalidsaidi/a2abench-mcp 0.1.9 → 0.1.11

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 CHANGED
@@ -1 +1,2 @@
1
+ #!/usr/bin/env node
1
2
  import 'dotenv/config';
package/dist/cli.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  import 'dotenv/config';
2
3
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
4
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
@@ -8,7 +9,7 @@ const API_KEY = process.env.API_KEY ?? '';
8
9
  const MCP_AGENT_NAME = process.env.MCP_AGENT_NAME ?? 'a2abench-mcp-local';
9
10
  const server = new McpServer({
10
11
  name: 'A2ABench',
11
- version: '0.1.9'
12
+ version: '0.1.11'
12
13
  });
13
14
  async function apiGet(path, params) {
14
15
  const url = new URL(path, API_BASE_URL);
@@ -87,6 +88,21 @@ server.registerTool('fetch', {
87
88
  };
88
89
  });
89
90
  async function main() {
91
+ const args = new Set(process.argv.slice(2));
92
+ if (args.has('--help') || args.has('-h')) {
93
+ console.log(`A2ABench MCP (local stdio)
94
+
95
+ Usage:
96
+ a2abench-mcp
97
+
98
+ Environment:
99
+ API_BASE_URL Base API URL (default: http://localhost:3000)
100
+ PUBLIC_BASE_URL Canonical base URL for citations (default: API_BASE_URL)
101
+ API_KEY Optional bearer token for write/auth endpoints
102
+ MCP_AGENT_NAME Agent identifier header (default: a2abench-mcp-local)
103
+ `);
104
+ process.exit(0);
105
+ }
90
106
  const transport = new StdioServerTransport();
91
107
  await server.connect(transport);
92
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khalidsaidi/a2abench-mcp",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "mcpName": "io.github.khalidsaidi/a2abench",
@@ -15,6 +15,8 @@
15
15
  "dev": "tsx src/cli.ts",
16
16
  "quick-test": "tsx scripts/quick-test.ts",
17
17
  "build": "tsc -p tsconfig.json",
18
+ "postbuild": "node -e \"const fs=require('fs');const p='dist/cli.js';const c=fs.readFileSync(p,'utf8');if(!c.startsWith('#!')){fs.writeFileSync(p,'#!/usr/bin/env node\\n'+c);}\"",
19
+ "prepublishOnly": "pnpm build",
18
20
  "lint": "echo 'lint not configured'",
19
21
  "typecheck": "tsc -p tsconfig.json --noEmit",
20
22
  "test": "echo 'no tests'"