Sign-in, workspaces and permissions
OAuth 2.1 with a consent screen where you pick one workspace. Every call is checked against that binding, and your database row-level security has the final say.
Updated 2026-10-13
How a connection is made
- Your client calls the server with no token. It answers 401 with a
WWW-Authenticateheader that carries aresource_metadataaddress. - The client reads the protected-resource metadata. It names
https://pythe.app/mcpas the resource and the project’s authentication service as the authorization server. - The client registers itself dynamically, then sends you to sign in with PKCE (S256).
- On the consent screen (“Connect <app> to Pythe”) you pick the workspace and allow.
- The client receives a delegated token and refresh token.
The consent screen binds the client to one workspace. That row is what every tool checks.
What every call does
- Resolves the verified user and the OAuth client.
- Loads that client’s workspace binding. No binding, or a binding that is not ready, fails with “This app is not bound to a Pythe workspace. Disconnect it and connect again.”
- Forwards your delegated token to the database. Row-level security makes the final data check, so a tool can never see something you cannot.
- Stamps the binding with when it was last used.
Switching workspace
list_workspaces shows every workspace you can access and which is active. set_active_workspace rebinds the app to another one you can access. Do it only when the founder asks, and say so. Every read reports its workspace so a client can always confirm where it is.
Endpoints
| Address | What it is |
|---|---|
https://pythe.app/mcp | The Streamable HTTP MCP endpoint. |
/.well-known/oauth-protected-resource | RFC 9728 protected-resource metadata. |
/.well-known/oauth-authorization-server | OAuth authorization-server discovery (also under /mcp). |
/.well-known/openid-configuration | OpenID discovery. |
/oauth/authorize, /oauth/register, /oauth/token | Authorization, dynamic client registration and token endpoints. |
/.well-known/mcp/server-card.json | The MCP server card: tool list with effects. |
/oauth/sign-in | The sign-in screen for the authorization flow. |
The MCP function is deliberately reachable without a Supabase JWT. Unauthenticated initialisation has to reach the SDK so it can return the correct WWW-Authenticate challenge; the SDK then validates the delegated token itself.
Where you manage connections
The Deploy page lists Connected apps. Each shows when it was last used and which workspace it is bound to, and you can change that workspace from a menu. Disconnect removes the app’s workspace binding, so every tool it calls fails with “not bound to a Pythe workspace” until it is connected again.
Plans
| Works on | Needs Base or Premium |
|---|---|
| Reading the plan, the Library and memory. Saving notes and chats. Research. Plan edits. Following runs and approvals. | Giving a task to an AI employee (assign_task). Employees live on Base and Premium. |
Work you start from your agent uses the same credits and computer time as work started in the app.