Skip to navigation

Connect an agent

Give an AI agent access to your organization through MCP.
View as Markdown

An agent connects to the Gateway with the Model Context Protocol (MCP). You create a key for the agent in Basement and paste it into the agent’s MCP settings.

1

Create a key

In Basement, open Agents and click Connect agent. Keep AI agent selected, give the agent a name, and select its access level.

The access level decides what the agent can read, write and use. If you are not sure, start with Researcher: it reads everything in Basement and writes nothing. See Keys and access levels.

Basement shows the key one time. Copy it now.

2

Add the Gateway to your agent

Paste the key into the MCP settings of your agent. Most MCP clients read a JSON file like this one:

{
"mcpServers": {
"basement": {
"url": "https://mcp.basement.chat/mcp",
"headers": { "Authorization": "Bearer bsmt_your_key" }
}
}
}

In Claude Code, one command does the same:

claude mcp add --transport http basement https://mcp.basement.chat/mcp \
--header "Authorization: Bearer bsmt_your_key"

For other clients, and for clients that sign in with OAuth, see Connect an MCP client.

3

Check the connection

Ask the agent to call the whoami tool. The answer names your organization and the key. Then ask it to list your documents.

What happens next

  • The agent sees only the tools its access level allows. See Tools.
  • Each call the agent makes is in Agents, Activity. See Activity log.
  • To stop an agent, open it in Agents, Connected and click Revoke. The key stops working immediately.