> ## Documentation Index
> Fetch the complete documentation index at: https://bisibility.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Connect an MCP-compatible AI client to the Bisibility API.

An MCP server lets an MCP-compatible AI client call Bisibility operations as
tools instead of composing HTTP requests itself.

## Install

```bash theme={null}
npm install @bisibility/mcp
```

## Authenticate

The server reads the API root and credential from its environment:

```bash theme={null}
export BISIBILITY_API_KEY="your-api-key"
export BISIBILITY_BASE_URL="https://your-host.example/api/v1"
```

It accepts project API keys and
[personal access tokens](/docs/docs/api/personal-access-tokens).

## Connect a client

The runnable quickstart starts the package's stdio server, connects a client,
checks the advertised tools, and makes the first
`bisibility_list_projects` call:

{/* Generated from examples/mcp/quickstart.mjs (region client-usage). Do not edit. */}

```javascript theme={null}
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",
  });
```

That tool performs the documented
[`GET /projects`](/docs/docs/api/projects#list-projects) read.

## Next steps

The [MCP server source](https://github.com/CorgiCorner/bisibility-mcp) lists the
available tools. Use the [API reference](/docs/docs/api/overview) for the underlying
request and response contracts.
