Discovery, OAuth, project operations, and exact project MCP handoff for Spala backend projects.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Standalone public MCP front door for Spala agent discovery.
This service is intentionally separate from the Spala platform/project runtime. The production public MCP is served from:
https://mcp.spala.ai/mcphttps://mcp.spala.ai/mcp/install-manifesthttps://mcp.spala.ai/.well-known/oauth-protected-resourcehttps://mcp.spala.ai/.well-known/oauth-authorization-serverhttps://spala.ai/mcp-profile/https://spala.ai/mcp-smoke-test/https://github.com/spala-ai/agent-integrationshttps://www.npmjs.com/package/@spala-ai/mcp-installhttps://www.postman.com/paul-8c16afeb-1705125/spala-public-mcp/overviewhttps://documenter.getpostman.com/view/54332390/2sBY4QtKjdThe server exposes 16 tools. Every tool publishes a display title, description, input schema, and behavioral annotations through tools/list.
spala_start absorbs this status for the normal agent workflow.project_connect, with the same idempotent write behavior.The first six tools are public. The remaining tools require a public MCP bearer with scope api. The public MCP validates access and delegates project requests securely server-side; credentials are never shown in tool results or error messages.
mcp.spala.ai should be the public Spala MCP front door:
api scope and dashboard browser authorization;It should not directly mutate project backend resources. Project changes belong in the project MCP.
Default local URL:
For a production-style local start:
To run the optional cross-repository contract smoke against a local installer checkout while keeping ordinary CI self-contained:
The smokes pass generated project bind argv to the installer module directly,
verify the scoped /<slug>/mcp binding, confirm one-time POST consumption for
bootstrap clients, and confirm Claude Code binds successfully with empty stdin.
Copy .env.example to .env when running locally.
Important variables:
PUBLIC_BASE_URL: public origin for this service, for example https://mcp.spala.ai.SPALA_API_BASE_URL: validated platform API origin, for example https://api.spala.ai. Public MCP clients cannot override it.PUBLIC_OAUTH_ENCRYPTION_SECRET: required dedicated AES-GCM key material with at least 32 characters and UTF-8 bytes; never expose this value.PUBLIC_OAUTH_REPLAY_STATE_PATH: absolute path to a dedicated persistent OAuth replay-state directory below the filesystem root. Required whenever PUBLIC_BASE_URL is hosted on HTTPS. Every service worker must use the same path.PUBLIC_OAUTH_TICKET_LIFETIME_SECONDS and PUBLIC_OAUTH_CODE_LIFETIME_SECONDS: bounded lifetimes for encrypted local OAuth request mechanics.PUBLIC_OAUTH_RATE_LIMIT_MAX: maximum requests across all OAuth endpoints per client per 60-second window (default 120).PUBLIC_OAUTH_BODY_LIMIT_BYTES: maximum JSON or form body size accepted by OAuth endpoints (default 32768).PUBLIC_MCP_PLATFORM_SERVICE_SECRET: required dedicated service credential for the fixed internal public-MCP lifecycle and typed-operation API; never print or expose this value.PUBLIC_MCP_PLATFORM_TIMEOUT_MS: bounded timeout for fixed platform lifecycle and operation requests (default 8000).PUBLIC_MCP_PLATFORM_RESPONSE_LIMIT_BYTES: maximum streamed response body accepted from fixed platform and project-runtime requests (default 1048576).PUBLIC_MCP_TRUSTED_SHARED_RUNTIME_ORIGINS: optional comma-separated allowlist of exact HTTPS origins that may receive project-entry credentials for authoritative /<slug>/mcp shared-runtime mounts. Wildcards, paths, queries, credentials, and HTTP origins are rejected. Leave it empty when project MCPs use their authenticated project URL.SPALA_DASHBOARD_URL: dashboard origin, for example https://dashboard.spala.ai.SPALA_PRICING_URL: pricing page used for plan and payment recovery actions, for example https://spala.ai/pricing/.CORS_ALLOWED_ORIGINS: comma-separated exact HTTPS browser origins. Wildcards and credentials are rejected.MCP_BODY_LIMIT_BYTES: maximum JSON body size for MCP requests (default 1048576).MCP_RATE_LIMIT_MAX: maximum MCP POST requests per client per 60-second window (default 120).mcp.spala.ai is the only MCP URL agents configure. Browser authorization starts at the public OAuth endpoint and redirects to dashboard.spala.ai, where the human signs in or creates an account.
The public MCP does not invent a separate project identity. The dashboard uses its normal authenticated API to create a one-time approval proof, then submits only that proof and the encrypted public authorization request to mcp.spala.ai. The normal dashboard bearer is never submitted to the public service.
The public resource continues to advertise only the compatible api scope. Authenticated requests use:
Bearer syntax is not authentication. Access is scoped to the exact canonical resource https://mcp.spala.ai/mcp with api. The public OAuth metadata, authorization, token, revocation, and registration endpoints are served from mcp.spala.ai. Dynamic registration accepts loopback HTTP callbacks, the exact hosted Claude and VS Code callbacks, and the existing validated native callback schemes; arbitrary web origins, wildcard hosts, callback queries, and callback fragments remain rejected. Authorization creates an encrypted request ticket and redirects to dashboard.spala.ai/mcp/authorize; the dashboard obtains approvalProof from its normal authenticated API and submits JSON { "request": "...", "approvalProof": "..." } without Authorization to /oauth/dashboard/approve. The public service consumes that proof through its service-authenticated fixed platform API, and the local authorization code carries only the resulting one-time platform grant code. The platform issues opaque short access and rotating refresh credentials bound to the canonical resource. The public service encrypts the opaque platform access credential inside the public access token, unwraps it only for fixed typed platform operations, and never stores it in replay state. Upstream 5xx, network, timeout, and malformed-success failures return retryable temporarily_unavailable errors; exact approval, code-exchange, and refresh retries remain recoverable without allowing changed bindings. Invalid grants return 400; invalid protected access returns a reliable 401 Bearer challenge, while anonymous initialize, tools/list, and the six public discovery tools remain usable even when a stale credential is presented. An invalid scope returns 403 insufficient_scope, and OAuth rate limits return 429. Credentials are never logged, placed in public URLs or manifests, or returned by MCP tools.
Single-binding ticket and authorization-code claims are stored as hash-only markers under PUBLIC_OAUTH_REPLAY_STATE_PATH; exact duplicates reuse the same result, changed replays are rejected, and request contents and platform grant codes are not written there. Refresh rotation and replay protection are atomic on the platform issuer. The service requires 0700 on an existing state directory, creates new state and expiration-bucket directories with 0700, writes markers with 0600, creates each claim with atomic exclusive file creation, syncs it before returning credentials, and removes expired buckets during later claims. Pre-provision a dedicated production path or volume below the filesystem root with that mode and ownership by the service account. The path must persist across restarts and deployments. Multiple workers must share a filesystem with atomic cross-process O_EXCL behavior and run as the same service account. Hosted configuration refuses to start without an explicit path or platform service secret, and replay-state initialization or runtime I/O failures fail closed instead of falling back to process memory. Local HTTP development defaults to the gitignored .state/public-oauth-replay directory when no path is supplied. Legacy encrypted public-MCP refresh credentials are not rotated; this migration can require one final interactive reauthentication.
For Codex this safely writes the user-scoped MCP configuration and a managed Spala routing skill, owns one native browser OAuth flow when first configured, then requires a new or resumed session. Do not run a second login, manually open its authorization URL, inspect client credential stores, or hand-roll MCP HTTP calls to bypass the reload boundary.
The public MCP accepts an issued MCP OAuth token for https://mcp.spala.ai/mcp with scope api. Project listing and creation select a sole organization automatically; when multiple organizations are available, callers must provide one of the returned organizationId choices. Access checks remain enforced by Spala.
The upstream origin is configuration-only and never caller-controlled. Responses are parsed from documented fields; the service does not search arbitrary payloads for URLs or credentials.
After public MCP OAuth, call spala_start as the protected first call. If it reports missing account data, ask the human one concise terminal question for exactly those fields and call account_setup; never invent placeholder names. Then ask for or confidently derive the real project name. Reuse the project recorded in the current workspace's .spala/project.json when it exists. Otherwise call project_list, and call project_create only when the intended project does not already exist. Then call project_connect with the project and one of codex, roo, claude-code, or cursor. Public MCP requests the existing dashboard project access URL, keeps its temporary project-entry credential server-side, and calls that exact project backend directly. The project backend performs its normal permission checks and enables MCP through the existing project settings API. Codex, Roo, and Cursor receive a short-lived one-time bootstrap-consumption URL. Claude Code first creates a local verifier, then calls project_connect again with its non-secret request ID and S256 challenge; the returned one-time claim can only be redeemed with that local verifier. No second browser OAuth is required.
This repository includes server.json for MCP registries that accept source-backed remote server listings. The remote server URL is always:
The repository does not include platform secrets, registry private keys, build output, node_modules, or local .env files.
package.json versions the Node service implementation. server.json versions
the independently published MCP Registry listing. They are intentionally
separate release channels; update server.json only when publishing new
registry metadata.
Public MCP accepts only the complete public HTTPS mcpUrl and manifestUrl returned by the authenticated project handoff. Before sending the reusable project-entry credential to a runtime builder-auth endpoint, it requires the MCP mount base to match the authenticated projectUrl origin and path exactly. This supports standalone deployments and custom domains without extra configuration. A distinct shared-runtime origin is fail-closed unless it appears exactly in PUBLIC_MCP_TRUSTED_SHARED_RUNTIME_ORIGINS, and configured shared runtimes must use the authoritative /<slug>/mcp mount shape. Project MCP URLs may contain one canonical scope query composed only of builder, project, and data; arbitrary queries, credentials, fragments, duplicate scopes, and noncanonical URLs are rejected. The exact accepted string, including /mcp/ and scope query, is preserved.
Agentic workspace binding currently supports four client identifiers: codex, roo, claude-code, and cursor. Other applications may connect to the public MCP through their own MCP configuration, but project_connect does not return an executable project-binding plan for them. Without client, install-capable tools return client_selection_required and no executable plan.
Successful Codex, Roo, and Cursor connections return a protected-bootstrap argv. The Codex shape is:
Run the argv immediately as a direct process from the intended project root with tty:true and shell:false. Wait for the process tool to report a running process, then use the process stdin tool to send bootstrap.consumeUrl plus a newline. Never interpolate the capability into shell text or process arguments. The capability is short-lived and one-time. The installer consumes it and configures a local credential proxy, then creates or updates .spala/project.json. Do not run native or manual project OAuth for this agentic flow; manual UI OAuth is unrelated. Never install a project MCP globally. The handoff, top-level response, install plan, and bootstrap exchange use the same authorized scoped MCP endpoint; subset scopes are never widened. The remote manifestUrl is informational and must not be fetched or passed to the installer. Follow the installer JSON reload instruction for the selected client.
Claude Code uses two generated commands without --bootstrap-stdin. The first command creates a verifier in the user's protected credential store and returns only a non-secret request ID and S256 challenge:
Call project_connect again with those two non-secret values. Run the returned project bind argv immediately; it contains the one-time claim and request ID, but never the verifier. The installer redeems the claim, stores the project credential outside the workspace, and configures the project-scoped local proxy. Reload Claude Code and call spala_start on the new project MCP. Do not start native project OAuth for this flow.
After the authenticated contract returns an exact project MCP URL, the agent should connect to that project MCP and call:
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/spala-public-mcp-2)<a href="https://allmcps.com/mcp/spala-public-mcp-2"><img src="https://allmcps.com/api/badge/spala-public-mcp-2?style=directory" alt="Spala Public MCP on AllMCPs" /></a>