Connect Podsteps to your app
OAuth 2.1 authorization code flow with PKCE. Your users press Connect, approve once, and your app calls the MCP server as them.
1. Create an app
In Podsteps: Developer tools (in the menu under Connect; signed out, you are asked to sign in or create an account first) → New app. Add your redirect address (https, http://localhost:<port> or yourapp://). You get a client ID (psc_…) and a client secret (pss_…, shown once).
2. Send people to Approve
import crypto from "node:crypto";
const b64url = (b) => b.toString("base64url");
const verifier = b64url(crypto.randomBytes(32)); // keep it in the user's session
const challenge = b64url(crypto.createHash("sha256").update(verifier).digest());
const state = b64url(crypto.randomBytes(16)); // keep it too; compare on return
const url = new URL("https://www.podsteps.com/oauth/authorize");
url.search = new URLSearchParams({
response_type: "code", client_id: process.env.PODSTEPS_CLIENT_ID, redirect_uri: "https://yourapp.com/oauth/callback",
scope: "read write:drafts connections", state, code_challenge: challenge, code_challenge_method: "S256", resource: "https://www.podsteps.com/mcp",
}).toString();
res.redirect(url.toString());Podsteps signs the person in (with two-step verification), shows your app's name, the permissions and its return address, and sends them back with ?code=…&state=…&iss=https://www.podsteps.com — or ?error=access_denied.
3. Exchange the code
if (req.query.state !== session.state || req.query.iss !== "https://www.podsteps.com") throw new Error("bad state");
const r = await fetch("https://www.podsteps.com/oauth/token", {
method: "POST",
headers: { "content-type": "application/x-www-form-urlencoded",
authorization: "Basic " + Buffer.from(`${CLIENT_ID}:${CLIENT_SECRET}`).toString("base64") },
body: new URLSearchParams({ grant_type: "authorization_code", code: req.query.code, code_verifier: session.verifier,
redirect_uri: "https://yourapp.com/oauth/callback" }),
});
const t = await r.json(); // { access_token: "psa_…", token_type: "Bearer", expires_in: 3600, refresh_token: "psr_…", scope }4. Call Podsteps
const call = (method, params = {}) => fetch("https://www.podsteps.com/mcp", {
method: "POST",
headers: { "content-type": "application/json", accept: "application/json", authorization: `Bearer ${t.access_token}` },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),
}).then((r) => r.json());
await call("initialize", { protocolVersion: "2025-06-18", capabilities: {}, clientInfo: { name: "yourapp", version: "1" } });
const sites = await call("tools/call", { name: "list_workspaces", arguments: {} });5. Refresh and revoke
POST https://www.podsteps.com/oauth/token grant_type=refresh_token&refresh_token=psr_… (rotates: store the new refresh token)
POST https://www.podsteps.com/oauth/revoke token=psr_… (disconnects the person)| Token | Lifetime | Notes |
|---|---|---|
code | 60 seconds | Single use. Using it twice ends the connection. |
psa_… access | 1 hour | Send as Authorization: Bearer. Never in a URL. |
psr_… refresh | 30 days, rotating | A refresh token used twice ends the connection (leak protection). |
| connection | 365 days | Then the person approves again. |
Endpoints
| Metadata | https://www.podsteps.com/.well-known/oauth-authorization-server |
| Resource metadata | https://www.podsteps.com/.well-known/oauth-protected-resource |
| Authorize | https://www.podsteps.com/oauth/authorize |
| Token | https://www.podsteps.com/oauth/token |
| Revoke | https://www.podsteps.com/oauth/revoke |
| Dynamic registration | https://www.podsteps.com/oauth/register (public clients, for AI tools) |
Podsteps issues access to its own MCP server only. It is not an identity provider: there are no ID tokens and no “Sign in with Podsteps”.