Skip to content

MCP setup

Use the MCP screen in the Sleepwalker app to connect a client, generate tokens, and review access.

https://mcp.sleepwalker.ai/mcp

Use the endpoint shown in the app if it differs from the value above.

MethodBest forNotes
OAuthHosted clients that support remote MCP login.The client opens a Sleepwalker authorization page.
Bearer tokenLocal clients, proxies, scripts, and custom automation.You generate a revocable token in Sleepwalker and pass it as an Authorization header.

OAuth is the recommended path for hosted clients. Bearer tokens are best for local clients, scripts, proxies, and custom automation.

Use OAuth when your MCP client can open a browser-based authorization flow.

  1. Open the MCP or connector settings in your client.
  2. Add the Sleepwalker MCP endpoint.
  3. Start the authorization flow.
  4. Sign in to Sleepwalker.
  5. Review the requested access.
  6. Authorize the connection.

If you do not have a Sleepwalker account yet, create one from the same authorization page. Sleepwalker sends a verification code by email, then returns you to the connector flow after the code is confirmed.

After authorization, the client can read Sleepwalker reports and run the advertised Sleepwalker MCP actions. Billable actions use your Sleepwalker credits.

Use a bearer token when the client expects a header or when you are using a local MCP proxy.

  1. Log in to the Sleepwalker app.
  2. Open MCP from the left sidebar.
  3. Create a token.
  4. Copy the raw token immediately.
  5. Store the token in the client, password manager, or local secret store.

Tokens start with:

sw_mcp_live_...

Sleepwalker shows the raw token once. If you lose it, revoke it and create a new one.

Authorization: Bearer sw_mcp_live_...

Do not put MCP tokens in URLs, screenshots, support tickets, or shared logs.

Some desktop MCP clients run local stdio servers. For those clients, use an MCP remote proxy and pass the Sleepwalker bearer token as a header.

Example shape:

{
"mcpServers": {
"sleepwalker": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.sleepwalker.ai/mcp",
"--transport",
"http-only",
"--header",
"Authorization:${SLEEPWALKER_MCP_AUTH_HEADER}",
"--silent"
],
"env": {
"SLEEPWALKER_MCP_AUTH_HEADER": "Bearer sw_mcp_live_..."
}
}
}
}

Keep the token in the environment variable. Do not paste it into shared chat or issue trackers.

After connecting, ask your client to call:

list_sleepwalker_tests

A successful connection returns owned Sleepwalker tests only.

If the tool list is empty or only shows read tools, reconnect the client or review the connection in the Sleepwalker app.

Revoke unused or exposed tokens from the MCP screen in the Sleepwalker app.

Revocation is immediate for new tool calls.