# Foundry MCP Overview

What Foundry's MCP server lets AI apps and coding agents do, the public and signed-in addresses, signing in with OAuth or a personal token, and the log of every change an agent makes.

Foundry runs one Model Context Protocol (MCP) server for the whole site. Connect Claude, ChatGPT, Claude Code, Codex, Cursor, or any other MCP client to read public Foundry data without signing in, or sign in to act within the areas and permissions you grant.

## What the Server Does

Without signing in, an agent can search the Marketplace, courses, projects and open roles, read public profiles and the public Alloy Home feed, and read a product's Package X-Ray summary and its publisher's Proofline. It can also look up the Glint SDK's rules, API and engine guides while it builds a game.

Signed in, it works with your stores and listings, your courses and lessons, your projects, Hubs and Kanban cards, Alloy Home and your inbox, only in the areas you allowed. Every call is checked again against your real permissions on Foundry at that moment. An agent can never do more than you could do yourself.

Foundry doesn't run an AI model for this. The app you connect runs the model, and Foundry's server answers its calls.

## Endpoints

| Address | Acts for | Sign-in |
| --- | --- | --- |
| `https://api.joinfoundry.xyz/mcp` | You | A connected app's OAuth access token, or a personal token. |
| `https://api.joinfoundry.xyz/mcp/public` | Anyone | None. Public tools only, showing what a signed-out visitor sees. An `Authorization` header is ignored. |

The signed-in address offers every public tool too. Configs made before November 26, 2026 may use `https://api.joinfoundry.xyz/api/mcp`, which works the same way; use `/mcp` for new setups.

### Protocol

- Transport: Streamable HTTP. Send JSON-RPC with `POST`. `GET` and `DELETE` return `405`.
- Revisions: the stateless 2026-07-28 revision, and for older clients the 2025 revisions (2025-11-25, 2025-06-18 and earlier).
- Server name: `foundry`, registry name `xyz.joinfoundry/foundry`.
- A browser request from a site other than Foundry's own gets `403`. MCP clients send no `Origin` header and aren't affected.
- Each request gets only the tools your connection's permissions allow, with server instructions that describe the areas, what the connection was granted and what agents can never do.
- Results are structured JSON, also sent as text, with stable ids and a link to the matching page on Foundry. Text people wrote, such as listings, posts and messages, is under `userContent`.

### Limits

| Limit | Counted for |
| --- | --- |
| 120 calls a minute | Each account and address, and each personal token or connected app, on `/mcp`. |
| 30 write calls a minute | Each personal token or connected app. |
| 120 calls a minute | Each address on `/mcp/public`. |

Each call in a JSON-RPC batch counts on its own. Some write tools also count toward the site's own limit for that action, such as posting or sending messages. Going over a call limit returns `429` with `Retry-After: 60`. Going over a write limit makes that tool call fail with a message to try again shortly.

## Signing In

The signed-in address needs a credential. A request without one gets `401` with a `WWW-Authenticate` header that points to Foundry's OAuth metadata, so apps that support MCP sign-in start it on their own. Setup for each app is in [Connect an AI Client](https://joinfoundry.xyz/help/developers/mcp-clients).

### Connect an App With OAuth

Claude, ChatGPT, Claude Code, Codex and Cursor open Foundry in your browser when you connect them. You sign in with your usual Foundry sign-in, including two-step sign-in, and see a consent page with:

- The app's name, the site that publishes it, and the address it returns to. If it returns to a program on your own computer, Foundry warns you to connect it only if you started this from an app you trust.
- A Read and a Write checkbox for each area the app asked for, all checked. Uncheck anything it shouldn't have, then select **Allow** or **Decline**. An app that doesn't ask for particular areas is offered every area.

The app only ever gets areas it asked for and you approved. Every connection is approved on this page, and Foundry never reuses an earlier approval. Your account needs a verified email to approve an app.

### Use a Personal Token

A personal token is for config-file clients and any MCP client that doesn't sign in on its own. Create one in [AI Agents settings](https://joinfoundry.xyz/workspace/agents), choose its areas, and send it as `Authorization: Bearer` followed by the token.

- Tokens start with `fdy_`. Foundry shows a token once and keeps only a hash of it.
- You can have 10 active tokens. Give each a name of up to 60 characters, such as the device or agent that uses it.
- Creating a token needs a verified email and a sign-in confirmed in the last five minutes, with your password, a code sent to your email, or Google or GitHub.

> [!WARNING]
> Anyone who has one of your tokens can use it within its areas until you revoke it. Keep tokens secret, like a password.

### OAuth Reference for Client Developers

| Item | Value |
| --- | --- |
| Issuer | `https://api.joinfoundry.xyz/oauth` |
| Authorization server metadata | `https://api.joinfoundry.xyz/oauth/.well-known/oauth-authorization-server`, also at `https://api.joinfoundry.xyz/.well-known/oauth-authorization-server/oauth` and `https://api.joinfoundry.xyz/.well-known/openid-configuration/oauth` |
| Protected resource metadata | `https://api.joinfoundry.xyz/.well-known/oauth-protected-resource/mcp` |
| Authorization endpoint | `https://api.joinfoundry.xyz/oauth/auth` |
| Token endpoint | `https://api.joinfoundry.xyz/oauth/token` |
| Dynamic Client Registration | `https://api.joinfoundry.xyz/oauth/reg` |
| Token revocation | `https://api.joinfoundry.xyz/oauth/token/revocation` |
| Scopes | The ten area scopes in [Permissions and Scopes](https://joinfoundry.xyz/help/developers/mcp-permissions). `offline_access` is also accepted. |

- The flow is the authorization code flow with PKCE. PKCE is required for every client, and only `S256` is accepted.
- Resource indicators (RFC 8707) bind each access token to the endpoint it was issued for. `https://api.joinfoundry.xyz/mcp` is the default resource.
- Every authorization response includes the `iss` parameter (RFC 9207).
- A client identifies itself with a Client ID Metadata Document (an `https://` client id) or registers at `/oauth/reg`. It can list up to 5 redirect URIs, each HTTPS or a loopback `http` address, and a name of up to 100 characters. A registered client is removed 60 days after it was last used.
- Access tokens are opaque and last one hour. Refresh tokens last 30 days and rotate on every use. No ID tokens are issued.
- Requests are limited per address: 20 registrations an hour, 60 authorization requests a minute and 120 token requests a minute.

## When Access Ends

- You disconnect the app or revoke the token in [AI Agents settings](https://joinfoundry.xyz/workspace/agents). It loses access at once.
- You change or reset your password, change your sign-in email, change two-step sign-in or use Sign Out of All Devices. Every token and connection made before that ends. An administrator signing your account out does the same. See [Account and Sign-In](https://joinfoundry.xyz/help/foundry/account-and-sign-in).
- The app revokes its own token, or its approval reaches 400 days. Connect it again to keep using it.
- An approval the app doesn't complete within 15 minutes is dropped.

Ending a connection removes every token and code it was issued.

## Activity Log

Every write call is recorded before it runs: the app or token by name, the tool and the time, then the item it changed, or that it didn't complete. You see it under **Agent Activity** in [AI Agents settings](https://joinfoundry.xyz/workspace/agents), and entries are kept for 180 days. Read tools aren't logged, and neither is `foundry_get_upload_part_url`, which only hands out an upload address; starting and completing the upload are logged.

What Foundry keeps, and how to end access, is in [Privacy and Agent Limits](https://joinfoundry.xyz/help/developers/mcp-privacy). Every tool is listed in the [Tool Reference](https://joinfoundry.xyz/help/developers/mcp-tools).
