<a id="mcp-setup"></a>

# MCP Setup

Use the endpoint and authentication your deployment supports. This guide describes API-key connections.

<a id="doc-availability"></a>

## Access comes before configuration

You need an existing account, an accessible project, and an API key you are permitted to use. Confirm the server address with the installation administrator. A public documentation page does not establish that a server is reachable from your client.

OpenClaw uses the existing private integration. Other clients need a reachable deployment and compatible transport and authentication. Do not assume that a client can use a configuration just because it supports MCP.

<a id="doc-transport"></a>

## Transport and endpoint

Streamable HTTP uses /api/mcp/stream. The existing SSE integration uses /api/mcp. Both authenticate an API key with Authorization: Bearer \<api-key\>. Use HTTPS on the deployment host; the browser login cookie is not an API key.

The connection values below are not a universal client configuration file. Put them in the fields required by your client and choose the matching transport. Keep the real key in its secret or credential settings, not in a URL.

<a id="doc-scope"></a>

## Choose scope, then verify

In Settings → API Keys, use the workspace/project scope and read or read-write mode appropriate to the task. The key cannot grant more access than its owning account. Never broaden a key merely to make an example work.

After connecting, list the available tools, select your project and ask for existing context. Test reading before asking the agent to save a note. If access is refused, check the project, key scope and client transport with the administrator; do not keep retrying with other credentials.

```json
{
  "streamableHttp": "https://example.invalid/api/mcp/stream",
  "legacySse": "https://example.invalid/api/mcp",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY"
  }
}
```

<a id="agent-rules"></a>

## Make your agent read past decisions

A connection does not make an agent remember automatically. Add an instruction to its rules file: read project context before working, then save new decisions with their reasons. Review what the agent writes. The instruction contains no API key.

[Agent Skill](agent-skill.md#recipes)

- [Documentation](index.md)
- [Connect an MCP client](mcp-clients.md)
- [MCP protocol and tools](mcp-reference.md)
