const launch = serverLaunch();
const transport = new StdioClientTransport({
args: launch.args,
command: launch.command,
env: {
...process.env,
BISIBILITY_API_KEY: requiredEnv("BISIBILITY_API_KEY"),
BISIBILITY_BASE_URL: requiredEnv("BISIBILITY_BASE_URL"),
},
});
const client = new Client({ name: "bisibility-mcp-example", version: "0.1.0" });
try {
await client.connect(transport);
console.log("Listing MCP tools");
const tools = await client.listTools();
const names = new Set(tools.tools.map((tool) => tool.name));
for (const toolName of expectedTools) {
assert(names.has(toolName), `Missing MCP tool ${toolName}.`);
}
console.log("Calling bisibility_list_projects");
const result = await client.callTool({
arguments: {},
name: "bisibility_list_projects",
});