Authentication
How to obtain a Alpha Ladder API key and understand the two authentication paths — OAuth 2.0 (hosted MCP) and direct token (local/npm MCP).
Alpha Ladder exposes a single public integration surface: an MCP server. There are two ways to authenticate against it, depending on which AI client you use.
API keys
A Alpha Ladder API key is a secret credential that identifies a single user account. It begins with sk- and looks like:
sk-a1b2c3d4e5f6...Where to get one: Log in to the Alpha Ladder dashboard, find the API Keys section, and click Generate New Key. Copy it immediately — it is shown only once.
One API key maps to exactly one user account. If you need to revoke access, delete the key from the API Keys section in the dashboard; a replacement key can be generated at any time with no downtime.
Hosted MCP (OAuth 2.0 + PKCE)
The hosted server at https://www.alphaladder.hk/mcp is protected by OAuth 2.0 with PKCE and dynamic client registration. This is the standard flow used by Claude.ai and other clients that connect via URL.
From an end-user perspective, the flow is simple: you enter the MCP URL into your client, click connect, and you are redirected to a Alpha Ladder consent page where you paste your sk-… API key and click Allow. That's it — you never see a client ID, code verifier, or token.
What actually happens behind the scenes (for reference):
- Your client sends
POST /mcpwithout credentials. - The server responds
401 Unauthorizedwith aWWW-Authenticateheader pointing to the discovery endpoints. - Your client fetches
/.well-known/oauth-protected-resourceand/.well-known/oauth-authorization-serverto discover the authorization server configuration. - Your client registers itself via
POST /oauth/register(dynamic client registration — no pre-registration required). - Your client redirects you to
GET /oauth/authorize, where the consent UI asks for your Alpha Ladder API key. - You paste your
sk-…key and approve. The server issues an authorization code. - Your client exchanges the code for tokens via
POST /oauth/token. - The server returns an access token (JWT, valid 1 hour) and a refresh token (valid 30 days). Your client stores and refreshes these automatically.
You do not need to manage tokens or handle the OAuth flow manually. Compliant MCP clients (Claude.ai, Cursor, Windsurf, Cline) implement this flow automatically.
Local / npm MCP (--token)
When running Alpha Ladder's MCP package locally via npm, authentication bypasses OAuth entirely. You pass your API key directly as a command-line flag:
npx -y --package @metacomp/agentx-mcp agentx-mcp --token YOUR_API_KEYThe package sends the key as a Bearer token in the Authorization header on every request. There is no token expiry or refresh — the key is valid until revoked.
Claude Desktop uses this path, configured via claude_desktop_config.json. Claude Code also uses the direct-token path (passed via --header), not OAuth. VS Code can also connect this way by setting the Authorization header in mcp.json.
Which client uses which
| Client | Auth path | How you provide the key |
|---|---|---|
| Claude.ai | OAuth 2.0 + PKCE (hosted MCP) | Paste sk-… once at the OAuth consent page |
| Claude Code | Direct Bearer token (header) | --header "Authorization: Bearer YOUR_API_KEY" on claude mcp add |
| Claude Desktop | Direct token (--token flag) | "--token", "YOUR_API_KEY" in claude_desktop_config.json |
| VS Code | Direct Bearer token (mcp.json headers) | "Authorization": "Bearer ${input:metacomp-api-key}" in mcp.json |
| Cursor / Windsurf / Cline | OAuth 2.0 + PKCE (hosted MCP) | Paste sk-… once at the OAuth consent page |
There is no public REST API. All access to Alpha Ladder's capabilities — for both end-users and automated agents — goes through MCP. For a conceptual overview of how MCP works and what products are available, see Core Concepts.