release: 0.1.3 — add a2amcp bin, sync server/cli version from package.json
All checks were successful
build / test (push) Successful in 29s
publish / npm (push) Successful in 31s

Adds an "a2amcp" bin (alongside the existing "a2a-mcp" for back-compat)
so that npx -y a2amcp resolves the binary by package name. Without it
npx fell back unreliably when no bin matched.

Also rips the hardcoded "0.1.0" out of cli.ts and gateway.ts and reads
the version from package.json — that was why serverInfo lagged behind
the published tag. Renames the user-facing command in help / error
strings / README from a2a-mcp to a2amcp; the legacy bin stays for
existing scripts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-15 20:39:23 -03:00
parent fd71a528e9
commit 633ca5dad6
6 changed files with 34 additions and 24 deletions

View File

@@ -6,6 +6,7 @@
* Naming: ``{agent}__{skill}``. Double underscore separator. Skill names
* containing ``__`` are not supported.
*/
import { createRequire } from "node:module";
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
@@ -17,6 +18,9 @@ import { loadConfig, type EnabledAgent } from "./config.js";
import { loadCredentials } from "./credentials.js";
import { UpstreamAgent, UpstreamError, type UpstreamTool } from "./upstream.js";
const require = createRequire(import.meta.url);
const pkg = require("../package.json") as { version: string };
export const SEP = "__";
export interface GatewayOptions {
@@ -48,7 +52,7 @@ export async function buildGateway(opts: GatewayOptions = {}): Promise<GatewayHa
const server =
opts.server ??
new Server(
{ name: "a2a-mcp", version: "0.1.0" },
{ name: "a2amcp", version: pkg.version },
{ capabilities: { tools: { listChanged: false } } },
);
@@ -70,9 +74,9 @@ export async function buildGateway(opts: GatewayOptions = {}): Promise<GatewayHa
} catch (err) {
// Silently skip an upstream that's down — surfacing an error here
// would break the client's whole tool list. The user can debug via
// `a2a-mcp doctor`.
// `a2amcp doctor`.
process.stderr.write(
`a2a-mcp: skipping ${u.name}: ${(err as Error).message}\n`,
`a2amcp: skipping ${u.name}: ${(err as Error).message}\n`,
);
}
}),