Consistent MCP Client() name from package
Make both clients use name from package.json for consistency and protocol clarity - web client changes `mcp-inspector` -> `inspector-client` (package.json) - cli client remains `inspector-cli` (package.json)
This commit is contained in:
parent
d7b020fdda
commit
f942df7e4c
1 changed files with 21 additions and 16 deletions
|
|
@ -89,10 +89,12 @@ function createTransportOptions(
|
|||
async function callMethod(args: Args): Promise<void> {
|
||||
const transportOptions = createTransportOptions(args.target, args.transport);
|
||||
const transport = createTransport(transportOptions);
|
||||
const client = new Client({
|
||||
name: "inspector-cli",
|
||||
version: packageJson.version,
|
||||
});
|
||||
|
||||
const [, name = packageJson.name] = packageJson.name.split("/");
|
||||
const version = packageJson.version;
|
||||
const clientIdentity = { name, version };
|
||||
|
||||
const client = new Client(clientIdentity);
|
||||
|
||||
try {
|
||||
await connect(client, transport);
|
||||
|
|
|
|||
Loading…
Reference in a new issue