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:
Richard Michael 2025-08-05 10:52:56 -07:00
commit f942df7e4c

View file

@ -347,20 +347,23 @@ export function useConnection({
};
const connect = async (_e?: unknown, retryCount: number = 0) => {
const client = new Client<Request, Notification, Result>(
{
name: "mcp-inspector",
version: packageJson.version,
},
{
capabilities: {
sampling: {},
elicitation: {},
roots: {
listChanged: true,
},
const [, name = packageJson.name] = packageJson.name.split("/");
const version = packageJson.version;
const clientIdentity = { name, version };
const clientCapabilities = {
capabilities: {
sampling: {},
elicitation: {},
roots: {
listChanged: true,
},
},
};
const client = new Client<Request, Notification, Result>(
clientIdentity,
clientCapabilities,
);
try {