MCP setup
Use the MCP screen in the Sleepwalker app to connect a client, generate tokens, and review access.
Hosted Endpoint
Section titled “Hosted Endpoint”https://mcp.sleepwalker.ai/mcpUse the endpoint shown in the app if it differs from the value above.
Choose an Auth Method
Section titled “Choose an Auth Method”| Method | Best for | Notes |
|---|---|---|
| OAuth | Hosted clients that support remote MCP login. | The client opens a Sleepwalker authorization page. |
| Bearer token | Local 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.
OAuth Connection
Section titled “OAuth Connection”Use OAuth when your MCP client can open a browser-based authorization flow.
- Open the MCP or connector settings in your client.
- Add the Sleepwalker MCP endpoint.
- Start the authorization flow.
- Sign in to Sleepwalker.
- Review the requested access.
- 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.
Bearer Token Connection
Section titled “Bearer Token Connection”Use a bearer token when the client expects a header or when you are using a local MCP proxy.
- Log in to the Sleepwalker app.
- Open MCP from the left sidebar.
- Create a token.
- Copy the raw token immediately.
- 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.
Header Format
Section titled “Header Format”Authorization: Bearer sw_mcp_live_...Do not put MCP tokens in URLs, screenshots, support tickets, or shared logs.
Desktop Clients With mcp-remote
Section titled “Desktop Clients With mcp-remote”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.
First Test
Section titled “First Test”After connecting, ask your client to call:
list_sleepwalker_testsA 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.
Revocation
Section titled “Revocation”Revoke unused or exposed tokens from the MCP screen in the Sleepwalker app.
Revocation is immediate for new tool calls.