Follow Discord
Sweep 24 Nov 2026 · 22:58Z Build v2.1.332 549 read Stable v2.1.325 Latest v2.1.331 Next v2.1.332 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · claude-docs

One read of Claude Documentationclaude-docs-20261124T170704Z

16 pages moved out of 299 read.

Pages moved 16 significant first
Pages read 299 in this capture
Captured 17:07 UTC
Corpus hash 7cf3a0b311f9 corpus-hash

What this read moved

1-16 of 16

connectors/building/directory-vs-custom Changed · +7 / -6 lines

from line 2
22 
33> Compare directory-listed and custom connectors: Anthropic review, in-product discovery, install links, Suggested Connectors, and per-tenant URL listings.
44 
5A directory connector is an MCP server listed in Anthropic's directory after review, and a custom connector is one that a user or an organization Owner adds to Claude by entering its URL. Both run on the same MCP infrastructure: the runtime, transport, authentication, and tool-calling code paths are identical. The difference is review, discoverability, and distribution.
5A directory connector is an MCP server listed in Anthropic's directory after review, and a custom connector is one that a user or an organization Owner adds to Claude by entering its URL. Both run on the same MCP infrastructure, with the same transport and authentication. They differ in review, discoverability, distribution, and some features, such as [file transfers](https://claude.com/docs/connectors/building/files.md).
66 
77This page is for developers deciding whether to list a server in the directory, distribute it as a custom connector, or do both. It compares the two, shows the install link each one gets, and covers listing patterns for enterprise and multi-tenant servers.
88 
from line 12
1212 
1313## Compare directory and custom connectors
1414 
15Directory and custom connectors differ only in what surrounds the runtime: who reviews the server, how users find it, and which Anthropic-side features it can use.
15Directory and custom connectors differ in what surrounds the runtime: who reviews the server, how users find it, and which Anthropic-side features it can use.
1616 
1717| | Directory connector | Custom connector |
1818| - | - | - |
19| **Runtime** | Same | Same |
19| **Runtime** | Same | Same, but plan for an MCP App's views to [lose some device features](https://claude.com/docs/connectors/building/mcp-apps/embedded-sites.md#device-features-in-views-that-embed-sites) |
2020| **Anthropic review** | Yes | No |
2121| **In-product discovery** | Browse, search, Suggested Connectors | None |
2222| **Distribution** | [Directory link](#share-an-install-link) | [Install link](#share-an-install-link) or manual URL entry |
2323| **Anthropic-held client credentials** | Available | Not available |
24| **[External link](https://claude.com/docs/connectors/building/mcp-apps/external-links.md) confirmation** | Can allowlist destinations to skip the modal | Always shows the modal |
24| **[External link](https://claude.com/docs/connectors/building/mcp-apps/external-links.md) confirmation** | Can allowlist destinations to skip the modal | Can't allowlist destinations |
2525| **[Websites embedded](https://claude.com/docs/connectors/building/mcp-apps/embedded-sites.md) in an MCP App** | Load only if the listing is Verified and allows their origins | Where available, load only after the person allows them in a conversation |
26| **[Entry points](https://claude.com/docs/connectors/building/mcp-apps/entry-points.md) for an MCP App** | Only under a Verified listing | No listing needed |
26| **[Entry points](https://claude.com/docs/connectors/building/mcp-apps/entry-points.md) for an MCP App** | Where available, only under a Verified listing | Where available, no listing needed |
27| **[File transfers](https://claude.com/docs/connectors/building/files.md)** | In beta, for a listing that meets the [requirements](https://claude.com/docs/connectors/building/files.md#requirements-for-file-transfers) | Not available |
2728| **Appears as** | Named card with logo | **Custom** |
2829 
2930## Share an install link
from line 97
9697 
9798### Per-tenant URLs
9899 
99If your server URL varies per tenant, such as `{tenant}.mcp.example.com`, submit one directory listing with a URL pattern. Each user enters their own URL when they connect. A listing with a URL pattern can be published only once it has the **Verified** label. See [Servers with per-customer URLs](https://claude.com/docs/connectors/building/authentication.md#servers-with-per-customer-urls) for how this choice limits your authentication options.
100If your server URL varies per tenant, such as `{tenant}.mcp.example.com`, submit one directory listing with a URL pattern. Each user enters their own URL when they connect. A listing with a URL pattern can be published only once it has the **Verified** label. See [Servers with per-customer URLs](https://claude.com/docs/connectors/building/authentication.md#servers-with-per-customer-urls) for how this choice limits your authentication options. Claude [doesn't transfer files](https://claude.com/docs/connectors/building/files.md#requirements-for-file-transfers) for a listing with a URL pattern.
100101 
101102## Next steps
102103 

connectors/building/files New page · 612 lines, new page

# Support file uploads and downloads ## Requirements for file transfers ### Request approval for your hosts ### URLs, headers, and fields of a target ### Targets with `include` credentials ## Advertise the extension ### Check what each call declares ## Receive a file in a tool ### Mark the file argument ### Return an upload target #### Build the `requestState` value ### Accept the bytes of an upload ### Finish the upload on the second call ### SDK support for file transfers ## Return a file from a tool ### List the file in the result ### Serve the download ## Limits on file transfers ## Test file transfers ### Test your server with curl ### Test in Claude Code ## Troubleshoot file transfers ## Next steps

A whole new page. There's nothing to diff it against, so here is what it says.

# Support file uploads and downloads

> Let a tool on your MCP server receive files from Claude and return files to it: requirements, host approval, uploads, downloads, limits, and testing.

File transfers let a tool on your MCP server receive a user's file from Claude (an upload) or return a file to Claude (a download). For example, when a user asks Claude to save a PDF to a folder in your product, your tool receives the PDF. When a user asks for an export from your product, your tool returns the export.

This page is for developers whose remote MCP server already works as a connector in Claude. File transfers are in beta and use an experimental MCP extension, [File Uploads and Downloads](https://github.com/modelcontextprotocol/experimental-ext-file-uploads/blob/main/specification/draft/file-uploads.md) (`io.modelcontextprotocol/files`). Expect breaking changes to the extension.

> [!NOTE]
>
> These cases are covered on other pages:
>
> * **Saving a file from an MCP App's view to the user's device**: see [Download files from your MCP App](https://claude.com/docs/connectors/building/mcp-apps/download-files.md)
> * **Building your first MCP server**: see [Build your first MCP server for Claude](https://claude.com/docs/connectors/building/quickstart.md)

First, [check the requirements](#requirements-for-file-transfers) and [advertise the extension](#advertise-the-extension). Then build uploads, downloads, or both:

* **Uploads**: [receive a file in a tool](#receive-a-file-in-a-tool)
* **Downloads**: [return a file from a tool](#return-a-file-from-a-tool)

## Requirements for file transfers

Before you build, check that your connector, server, storage, and account meet these requirements:

* **Directory listing**: Claude transfers files for connectors that people add from the [Connectors Directory](https://claude.com/docs/connectors/directory.md). The address that they connect to must exactly match an address on your listing. Adding your server by URL doesn't link the connector to your listing. If a connector isn't linked, Claude sends it no files and removes any files from its tools' results. Your server receives no error.
* **Server URL**: your listing needs one URL that every user connects to, or a fixed set under [**Multiple URLs**](https://claude.com/docs/connectors/building/authentication.md#servers-with-per-customer-urls). If each customer enters their own URL, such as with a **URL pattern**, Claude doesn't transfer files.
* **MCP revision**: serve [MCP revision 2026-07-28](https://modelcontextprotocol.io/specification/2026-07-28) over Streamable HTTP, along with the revisions that you serve today
* **Library**: use a version that supports revision 2026-07-28. To receive uploads, it must also let a tool return the `upload_required` result type, which the extension adds. See the tested versions under [SDK support for file transfers](#sdk-support-for-file-transfers). Version 1.32.2 of `@modelcontextprotocol/sdk`, the package that the [quickstart](https://claude.com/docs/connectors/building/quickstart.md) uses, supports neither uploads nor downloads.
* **Storage**: for uploads, your storage must accept a whole file in one `PUT` or `POST` request. For downloads, it must serve a file to a `GET` request, in byte ranges if it can.
* **Approved hosts**: Anthropic must approve the hosts that store your connector's files. Your connector needs at least one approved host, even if every file goes through your MCP server. [Request approval for your hosts](#request-approval-for-your-hosts) before you build on them. Claude can also get files from your MCP server's own host, and send files to it with [`include` credentials](#targets-with-include-credentials). Claude refuses a URL on any other host, on an IP address, or on another company's storage or CDN host that all its customers share.
* **Account for testing**: use a Claude account that has access to file transfers. Name the account when you [request approval for your hosts](#request-approval-for-your-hosts). If it doesn't have access, or you aren't sure, ask Anthropic in the same email to turn on file transfers for testing. Use made-up files in your tests, not real ones. On Team and Enterprise plans, an Owner must also go to [**Organization settings > Connectors**](https://claude.ai/admin-settings/connectors). Under **File transfers**, the Owner turns on the **File uploads to connectors** toggle, the **File downloads from connectors** toggle, or both. Some organizations can't use file transfers, such as those with HIPAA settings, zero data retention, customer-managed encryption keys, an IP allowlist, or a default workspace that keeps data outside the US.

### Request approval for your hosts

Before Claude transfers files for a listing, Anthropic approves the listing's hosts. If your connector isn't listed yet, [submit it](https://claude.com/docs/connectors/building/submission.md) first. To request approval, email `[email protected]` with the subject `Connector file hosts: <connector name>` and these details:

* **Listing**: your listing's name and its server URLs
* **Hosts**: the full name of each host that Claude sends files to or gets files from, in every region. You can name up to 50. If files go through your MCP server, include its host. If your storage generates host names, you can ask for a wildcard, such as `*.downloads.example.com`. Anthropic reviews each one, and you must control every name under it.
* **Use of each host**: whether it's for production or testing, whether all your customers share it, and whether it's behind a CDN
* **Ownership**: for a host on another domain of yours, a public page that shows that the domain is yours. For a bucket or account host on a storage provider's domain, a statement that the exact host name is yours.
* **Test organization**: the email address of the Claude account that you test with. If that account is in a Team or Enterprise organization, also the **Organization ID**, which you copy from [**Organization settings > Organization and access**](https://claude.ai/admin-settings/organization).

Wait for Anthropic to confirm the hosts and the test organization before you rely on them. An approval covers the hosts that Anthropic confirmed and the server URLs that your listing had at that time. Before you use a host that it doesn't cover, or a new server URL, email again. Claude doesn't transfer files there until Anthropic approves it.

### URLs, headers, and fields of a target

A target is an object in your server's response that says where Claude sends or gets one file. In each upload target and download target, follow these rules:

* **Address**: use `https` on port 443 and a host name that resolves to public IPv4 addresses, with a certificate from a public certificate authority. Use TLS 1.3, or TLS 1.2 with an ECDHE suite that uses AES-GCM or ChaCha20-Poly1305. Use a host on a domain that you own where you can.
* **Authorization**: make the URL carry its own authorization, such as a short-lived signature, and set the target's `credentials` field to `"omit"`. If you sign the URL with temporary credentials, such as a cloud role's, use ones that last at least as long as the URL. Anyone who has the URL can use it until it expires, so make each URL work for one file, and either for its upload or for its download. For a URL on your MCP server itself, see [targets with `include` credentials](#targets-with-include-credentials).
* **Characters**: percent-encode spaces and other characters that a URL's query can't contain, and leave out `#`
* **Headers**: in the target's `headers` field, list only the headers that your storage needs, each name once. Headers that Claude refuses include `Authorization`, `Cookie`, `Host`, `Content-Length`, `Date`, and `User-Agent`.
* **Fields**: add no fields that the extension doesn't define
* **Logs**: keep target URLs, target headers, form fields, inline file data, and an upload's [`requestState`](#return-an-upload-target) out of logs, traces, and error reports

If a target's host, query, header, or field breaks a rule, expect these results:

* **Upload**: Claude refuses your server's whole response, including the targets for other files
* **Download**: Claude leaves that target's file out of the result, or replaces the result with an error

Have your storage answer at the target's URL directly. A redirect fails the transfer. Don't put a sign-in page, a bot challenge, or a filter on `User-Agent` or source address in front of the URL.

### Targets with `include` credentials

If a target's URL has the same scheme, host, and port as your connector's address, you can set `credentials` to `"include"`. Claude then sends or gets the file with the `Authorization` header that it sent on the tool call. For an `include` target, follow these rules:

* **Application**: name a URL that your MCP server's own application serves. Don't name one that another application on the same host serves, because that application would receive the user's token.
* **User**: check that the token belongs to the user that you issued the target to
* **Token lifetime**: a large upload can reach your server 20 minutes after the tool call, with that call's token. If your server can refuse the token by then, use `"omit"` for large files.
* **Several uploads**: use `"omit"` if you return several upload targets. With `"include"`, Claude has to start each upload within five minutes of your response, and it can send the files one after another.
* **Large downloads**: use `"omit"` for a large file. With `"include"`, Claude gets the whole file in one `GET` and doesn't resume it.
* **Refusal**: use `"omit"` if Claude calls your server without an `Authorization` header, or if your listing says that the connector handles personal health data. Claude refuses `include` targets in these cases, and for some other connectors.

## Advertise the extension

In your response to `server/discover`, list `io.modelcontextprotocol/files` under `capabilities.extensions`. If you take uploads, set it to `{ "upload": {} }`. If you only return files, set it to `{}`. `download` is a client setting, so leave it out. This example leaves out the response's other members:

```json theme={null}
{
  "supportedVersions": ["2026-07-28"],
  "capabilities": {
    "extensions": {
      "io.modelcontextprotocol/files": { "upload": {} }
    }
  }
}
```

Answer `server/discover` well within two seconds, in the same way for every user and on every instance of your server. A `401` for a missing or expired token has no effect on the extension. If any instance responds with another error, such as `-32601`, Claude can stop using the extension with your server for about a day after the last error.

### Check what each call declares

In `params._meta`, each `tools/call` request of revision 2026-07-28 can declare that the client supports `upload`, `download`, both, or neither. Treat a request of an older revision as declaring neither. Read the declaration on every call. If the declaration has a `revision` field with a value that you don't know, treat the extension as not declared. This `_meta` value declares both:

```json theme={null}
{
  "io.modelcontextprotocol/clientCapabilities": {
    "extensions": {
      "io.modelcontextprotocol/files": { "upload": {}, "download": {} }
    }
  }
}
```

If a call doesn't declare what a tool needs, respond in this way:

* **You advertise `upload`, the call doesn't declare it, and a [file argument](#mark-the-file-argument) has a `size` above 0 and no `data`**: return error `-32021` and don't run the tool. `data` is the extension's field for a file's bytes in the call itself. Claude doesn't send it in a call that declares `upload`.
* **The call doesn't declare `download`**: respond without a download target. In `content`, say that no file was delivered and, if you can, where the user can get it. If the tool can't work without the download, return error `-32021` and don't run the tool.

Name what is missing in the error's `data.requiredCapabilities`. On a call of revision 2026-07-28, send the error as a JSON body with HTTP status `400`. This error leaves out `jsonrpc` and `id`:

```json theme={null}
{
  "error": {
    "code": -32021,
    "message": "This app can't send files to this connector, so the tool didn't run.",
    "data": {
      "requiredCapabilities": {
        "extensions": { "io.modelcontextprotocol/files": { "upload": {} } }
      }
    }
  }
}
```

## Receive a file in a tool

In an upload, Claude calls your tool twice, and the bytes go to your storage between the two calls:

1. Claude calls the tool with the file's name, type, size, and digest
2. Your server responds with an upload target for the file
3. Anthropic's servers send the bytes to the target
4. Claude calls the tool again with the same arguments, and your server runs the tool

The JSON examples of uploads leave out `jsonrpc`, `id`, and `_meta`.

### Mark the file argument

A file argument is a tool argument that takes a user's file. To mark a file argument, add `x-mcp-file` to the object schema of a top-level argument. This tool takes a folder ID and a PDF:

```json theme={null}
{
  "name": "save_to_folder",
  "description": "Save a file to a folder",
  "annotations": { "title": "Save to folder", "readOnlyHint": false, "destructiveHint": true },
  "inputSchema": {
    "type": "object",
    "properties": {
      "folderId": { "type": "string" },
      "file": {
        "type": "object",
        "description": "A PDF of up to 50 MiB.",
        "x-mcp-file": { "accept": ["application/pdf"], "maxSize": 52428800 },
        "properties": {
          "id": { "type": "string", "minLength": 1, "maxLength": 128 },
          "name": { "type": "string" },
          "mimeType": { "type": "string" },
          "size": { "type": "integer", "minimum": 0 },
          "digest": {
            "type": "object",
            "properties": {
              "algorithm": { "const": "sha-256" },
              "value": { "type": "string" }
            },
            "required": ["algorithm", "value"]
          }
        },
        "required": ["id", "mimeType", "size"]
      }
    },
    "required": ["folderId", "file"]
  }
}
```

Copy the file object's `properties` and `required`. If you change them, Claude might not recognize the argument, and then calls that set it don't reach your server, or don't declare `upload`. These variations work, with `x-mcp-file` on the file object itself:

* **Optional file**: an `anyOf` of the file object and `{"type": "null"}`
* **Several files**: an array whose `items` is the file object
* **Digest that you verify**: `digest` added to the file object's `required`

Keep `x-mcp-file`, `allOf`, `anyOf`, and `oneOf` off the root of `inputSchema`. If the root has any of them, calls of the tool might not reach your server. Other root keywords, such as `patternProperties`, can stop file transfers.

Design the tool with these rules in mind:

* **Size and type**: state your limits in `description` as well, and check the size and type yourself. Claude can refuse a file over `maxSize` before it calls your tool, and `accept` is a hint.
* **Unknown types**: Claude takes `mimeType` from the file's name or its first bytes, and sends `application/octet-stream` for types that it doesn't know. Accept that value on the first call, and `text/plain` too if you take text files, such as JSON. Check the bytes on the second call.
* **Unverified fields**: don't assume that a field of the file argument is correct. Rely on `digest`, the SHA-256 of the bytes in base64url with no padding, only after you verify it.
* **New tool**: add the file argument to a new tool. A client without the extension can't reliably fill a file argument, so adding one to a tool that people use today can break that tool.
* **Tool list**: include the tool in every `tools/list` response to an account that you show it to, even if the request doesn't declare the extension. Then [check what each call declares](#check-what-each-call-declares).
* **Annotations**: in `annotations`, give a tool that saves a file a `title`, `readOnlyHint: false`, and `destructiveHint: true`. See [Provide tool annotations](https://claude.com/docs/connectors/building/review-criteria.md#provide-tool-annotations).
* **Validation**: check each call's arguments in your own code, with a validator that accepts `x-mcp-file`
* **Questions to the user**: don't return an input request from a tool that moves a file

### Return an upload target

On the first call of an upload, Claude sends the file's details and no bytes:

```json theme={null}
{
  "name": "save_to_folder",
  "arguments": {
    "folderId": "fld_8c1a",
    "file": {
      "id": "file-1",
      "name": "Q3 report.pdf",
      "mimeType": "application/pdf",
      "size": 41204133,
      "digest": {
        "algorithm": "sha-256",
        "value": "uU0nuZNNPgilLlLX2n2r-sSE7-N6U4D6ZVe-_rYh2sU"
      }
    }
  }
}
```

Check that the user can write to the destination, and check the quota, the type, and the size. If you can take the file, don't run the tool yet. Respond with a result whose `resultType` is `upload_required`, which asks Claude to send the file. This result is an upload request. List one target for each file that has a `size` above 0 and no `data`:

```json theme={null}
{
  "result": {
    "resultType": "upload_required",
    "uploads": [
      {
        "fileId": "file-1",
        "url": "https://upload.example.com/u/01JD3V7K2M?sig=...",
        "headers": { "Content-Type": "application/pdf" },
        "credentials": "omit"
      }
    ],
    "requestState": "..."
  }
}
```

Return the upload request as your response to Claude's first `tools/call`, and follow these rules:

* **Refusal**: if you can't take the file, return a result with `resultType` `"complete"`, `isError: true`, and a sentence in `content` that the user can act on. Refuse a call in which two files have the same `id`, or a file has `data` that you don't accept.
* **Target**: set `fileId` to the file's `id`. Claude sends a `PUT` unless you set `method` to `"POST"`. If your MCP server takes the upload itself, list `Content-Type: application/octet-stream`, so that its JSON parser leaves the body alone.
* **Form uploads**: if your storage takes nothing but `multipart/form-data`, use a target with the extension's [`form` field](https://github.com/modelcontextprotocol/experimental-ext-file-uploads/blob/main/specification/draft/file-uploads.md#upload-request). Set `method` to `"POST"` and list no `Content-Type` header. The form's fields can carry the authorization and the staging place instead of the URL.
* **Lifetime**: keep the URL valid for at least 20 minutes after you return it, or 75 minutes if you return several targets. A large file can reach your storage that late.
* **Staging**: point each URL at its own randomly named place in a staging location, which takes one write and enforces the declared size. Show no staged file to users until the second call succeeds.
* **Signed headers**: if the URL's signature can cover headers, have it cover `Content-Length` and a write-once condition as headers, not in the query. Use a condition that your storage enforces, such as `If-None-Match: *`. List it in the target's `headers`, and leave `Content-Length` out. Without `form`, Claude sets `Content-Length` to the file's `size`.
* **Signed headers with `boto3`**: create the client with the bucket's region and `Config(signature_version="s3v4", s3={"addressing_style": "virtual"})`. In some regions, the default signature covers neither header. Use a bucket with no dot in its name. A dot puts the URL on a host that all customers share.
* **Checksum of an empty body**: if your signed URL's query holds `x-amz-checksum-crc32=AAAAAA%3D%3D`, it names the checksum of an empty body. Create your storage's JavaScript client with `requestChecksumCalculation: "WHEN_REQUIRED"`.
* **Empty files**: return no target for a file whose `size` is 0. If your schema requires `digest` and the digest doesn't match, return a result with `isError: true`. If no file needs a target, run the tool and return its result.
* **Repeated calls**: the first call can arrive more than once. Respond with a new target and a new `requestState` each time.

#### Build the `requestState` value

With `requestState`, your server matches the second call to the upload request that it issued. Your server creates this string, and Claude sends it back unchanged. Build it with these properties:

* **Contents**: tie it to the tool name, the arguments, each target, and the signed-in user's ID, and record that you issued an upload request. Leave out the access token, which can change between the two calls.
* **Protection**: keep the contents in storage that all your instances share, and use a random ID that looks them up as `requestState`. If you put the contents in the string itself, seal them with authenticated encryption and a key that all your instances hold.
* **Expiry**: make it expire after about an hour, or about two hours if you return several targets. Each target has to stop working before `requestState` expires.

### Accept the bytes of an upload

After your server returns an upload request, Anthropic's servers send each file to its target at most once. Unless the target has a `form` field, the body of the request is the file, with a `Content-Type` if you listed one. With `form`, the request is `multipart/form-data`. Each request has a `Content-Length` and the headers that you listed.

* **Success**: respond with a `2xx` status only after the whole file is stored. Claude ignores the response body. Send the response uncompressed.
* **Time**: receive the file within the [limits on file transfers](#limits-on-file-transfers)
* **Failure**: any other status fails the upload. If an upload fails, your server receives no second call, so delete staged bytes after `requestState` expires.

### Finish the upload on the second call

The second call of an upload has the same arguments as the first and adds `requestState` to `params`. The call doesn't prove that the bytes arrived. Complete these steps in order:

1. **State**: verify that you issued `requestState`, and that it hasn't expired or been used. If a check fails, return JSON-RPC error `-32602`.
2. **Call**: compare the tool name, the arguments, and the user with what `requestState` holds. Compare the arguments as JSON values, so that member order and number spelling don't matter. If they differ, return `-32602`.
3. **Files**: if the target can still overwrite the staged file, copy the file to a place in staging that is new for each call and that the target can't write. Use the copy from here on. Confirm with your storage that each file that you gave a target arrived, and check its size. Check its bytes if the tool restricts the type, and verify its digest if your schema requires one. If a check fails, return a result with `isError: true` and don't run the tool.
4. **Repeats**: if it's unsafe to run the tool twice, mark `requestState` as used in one atomic write to storage that all your instances share. If the string holds sealed contents, mark a random ID that you sealed in them, because another string can decode to the same contents. Keep the mark until `requestState` expires. If another call used it first, return `-32602`.
5. **Result**: finalize the file that you checked, copying it out of staging. Run the tool, and return its result. If you can't finalize the file, return a result with `isError: true` and don't run the tool. Keep the staged bytes until `requestState` expires.

Follow these rules as you check the files and return the result:

* **Digest**: hash the bytes yourself, or compare a SHA-256 that your storage computed. A value from the client or a weaker hash doesn't verify the file.
* **No second upload request**: don't answer the second call with another upload request
* **Secrets**: keep the upload URL and `requestState` out of results and errors
* **Time**: respond well within 60 seconds. If Claude doesn't receive your response in 60 seconds, it can tell the user that it doesn't know whether the tool ran.

### SDK support for file transfers

To receive uploads, use the low-level `Server` in the TypeScript or Python SDK. The samples were run with these versions:

* **TypeScript**: `@modelcontextprotocol/server` 2.4.0, served with `createMcpHandler`. Add `"content": []` to the upload request. Without it, the SDK responds with error `-32602`.
* **Python**: `mcp` 2.3.0. Return results as dictionaries that include `resultType`, and in `tools/list` results also `ttlMs` and `cacheScope`. Put a valid `content` list in each tool result. Without one, the SDK can drop `isError`, and a refusal looks like a success. Don't add `RequestStateBoundary`, which refuses the second call.

In Python, `MCPServer` in `mcp` 2.3.0 and `FastMCP` in `fastmcp` 4.0.10 turn an upload request that a tool returns into an ordinary result, so Claude sends no file.

The samples advertise the extension, require sign-in, read what a call declares, and answer the first call of an upload. They leave out your other tools, empty files, and your checks of the user's permissions, the quota, the type, and the size. Define these names yourself, above the sample:

* **Tools**: `listTools`, `createTarget`, and `secondCall` (in Python, `list_tools`, `create_target`, and `second_call`). `createTarget` returns a signed URL and `requestState`.
* **Sign-in in TypeScript**: `signIn` is Express middleware. It responds with a `401` that names [your discovery metadata](https://claude.com/docs/connectors/building/authentication.md#serve-discovery-metadata) to a request whose token is missing, invalid, expired, or issued for another server. For a valid token, it sets `req.auth`, which your code reads as `ctx.http?.authInfo`.
* **Sign-in in Python**: `AUTH` is an `AuthSettings` from the SDK, with your authorization server's URL as `issuer_url` and your connector's address as `resource_server_url`. Keep `AUTH` and `TOKEN_VERIFIER` in the sample. Without them, a call with no token reaches your tool.
* **Token check in Python**: `TOKEN_VERIFIER` is an object with an async `verify_token` method. It returns `None` for a token that is invalid, expired, or issued for another server, and an `AccessToken` for a valid one. Your code reads that with `get_access_token()` from `mcp.server.auth.middleware.auth_context`.

> [tab] TypeScript
>

Cut at 300 lines. The page has the rest.

connectors/building/index Changed · +7 / -1 lines

### Decide whether to support file uploads and downloads

from line 58
5858 
5959* Resource subscriptions
6060* Sampling
61* Advanced or draft capabilities
61* Advanced or draft capabilities, apart from [file transfers](https://claude.com/docs/connectors/building/files.md), which are in beta
6262 
6363If you plan to list the server in the directory, [Design tools that pass review](https://claude.com/docs/connectors/building/review-criteria.md#design-tools-that-pass-review) covers how to name, describe, and annotate tools.
6464 
from line 70
7070| - | - | - |
7171| Maximum tool result size | \~150,000 characters | 25,000 tokens, configurable with `MAX_MCP_OUTPUT_TOKENS` |
7272| Tool call timeout | 240 seconds per tool call | Configurable with `MCP_TOOL_TIMEOUT` |
73 
74Once your server advertises file transfers, also follow the [limits on file transfers](https://claude.com/docs/connectors/building/files.md#limits-on-file-transfers).
75 
76### Decide whether to support file uploads and downloads
77 
78File transfers, which are in beta, let a tool receive a user's file from Claude or return a file to Claude, with the bytes outside the tool call and its result. To build them, see [Support file uploads and downloads](https://claude.com/docs/connectors/building/files.md).
7379 
7480### Decide whether to add interactive UI
7581 

connectors/building/mcp-apps/app-tools Changed · +5 / -5 lines

from line 4
44 
55With an app tool, Claude can change what your [MCP App](https://claude.com/docs/connectors/building/mcp-apps/getting-started.md) shows while a user has it open. For example, in a shopping list app, a user asks Claude to add milk, and milk appears in the list on screen.
66 
7This page is for developers whose MCP App already renders in Claude. App tools are available to a limited set of organizations, and not in every conversation, so [check whether your organization has access](#check-whether-your-organization-has-access-to-app-tools).
7This page is for developers whose MCP App already renders in Claude. App tools aren't available in every organization or conversation, so [check whether your organization has access](#check-whether-your-organization-has-access-to-app-tools).
88 
99> [!NOTE]
1010>
from line 122
122122 
1231231. [Add your server to Claude as a custom connector](https://claude.com/docs/connectors/building/testing.md#test-in-claude-as-a-custom-connector)
1241242. Start a new conversation with the [unified Claude experience](https://support.claude.com/en/articles/16761823-claude-cowork-and-chat-are-one-claude), which combines chat and Cowork. If the message box offers a choice of **Chat** or **Cowork**, your account doesn't have it.
1253. Set the permission setting in the message box to **Manual**. In **Auto**, Claude can use a tool without asking.
1253. Set the permission setting in the message box to **Manual**
1261264. Ask Claude to open the app, and name your connector in the message
1271275. In a second message, ask for a change, such as adding milk to the list.
128128 
from line 130
130130 
131131### Check whether your organization has access to app tools
132132 
133App tools are available to a limited set of organizations, so the account that you test with may not have them. To check your access, follow these steps:
133The account that you test with may not have app tools. To check your access, follow these steps:
134134 
1351351. [Test a tool in Claude](#test-an-app-tool-in-claude)
1361362. If Claude doesn't ask you to approve the tool and doesn't run it, rule out the causes under [Claude finds no tools in the view](#claude-finds-no-tools-in-the-view)
1373. If none of those causes applies, your organization may not have access. Keep your app working without app tools, and test again later.
1373. If none of those causes applies, your organization may not have access. Keep your app working without app tools.
138138 
139139In an organization without app tools, the rest of the view continues to work.
140140 
from line 152
152152 
153153### Approval before an app tool runs
154154 
155Claude asks the user to approve a tool before the tool runs, unless the user's saved choice, such as **Always allow**, or the conversation's permission setting already applies to the call.
155Claude asks the user to approve an app tool before the tool runs, unless the user's saved choice, such as **Always allow**, already applies to the call.
156156 
157157* **What the prompt names**: the connector and the tool's `title`. If you set no `title`, the user sees the `name`.
158158* **What else the user can read**: the values that Claude is sending, your `description`, and the tool's inputs

connectors/building/mcp-apps/design-guidelines Changed · +4 / -4 lines

from line 46
4646 
4747> [!NOTE]
4848>
49> The [side panel](#side-panel) is available to a limited set of organizations, and not in every conversation. Where it isn't available, a fullscreen request opens your app full screen if Claude offers that mode. To check, see [Show your MCP App in the side panel or full screen](https://claude.com/docs/connectors/building/mcp-apps/display-modes.md).
49> The [side panel](#side-panel) isn't available in every organization or conversation. Where it isn't available, a fullscreen request opens your app full screen if Claude offers that mode. To check, see [Show your MCP App in the side panel or full screen](https://claude.com/docs/connectors/building/mcp-apps/display-modes.md).
5050 
51An MCP App appears inline in the conversation as a card or a carousel, in a side panel beside the conversation, or full screen. Each placement suits different content and carries its own constraints on desktop and on mobile. To declare and request display modes in code, see [Show your MCP App in the side panel or full screen](https://claude.com/docs/connectors/building/mcp-apps/display-modes.md).
51An MCP App appears inline in the conversation as a card or a carousel, in a side panel beside the conversation, or full screen. Each placement suits different content and carries its own constraints. To declare and request display modes in code, see [Show your MCP App in the side panel or full screen](https://claude.com/docs/connectors/building/mcp-apps/display-modes.md).
5252 
5353### Inline card
5454 
from line 170
170170 
171171### Content security policy
172172 
173All external origins are blocked by default. Declare the origins each `ui://` resource needs through `_meta.ui.csp`:
173All external origins are blocked by default. Declare the origins each `ui://` resource needs through `_meta.ui.csp`. Put it on the content item that your `resources/read` handler returns, with the rest of the resource's `_meta.ui`. This `_meta` object declares one origin of each kind:
174174 
175175```json theme={null}
176176{

connectors/building/mcp-apps/display-modes Changed · +7 / -6 lines

from line 12
1212 
1313Claude reports the display mode `inline` for a view in the conversation. It reports `fullscreen` for a view in the side panel and for a view that is full screen.
1414 
15The side panel is available to a limited set of organizations, and not in every conversation, so [check whether your organization has the side panel](#check-whether-your-organization-has-the-side-panel). Outside that section, assume that the conversation has the side panel.
15The side panel isn't available in every organization or conversation, so [check whether your organization has the side panel](#check-whether-your-organization-has-the-side-panel). Outside that section, assume that the conversation has the side panel.
1616 
1717> [!NOTE]
1818>
from line 31
3131* **`fullscreen` without `inline`**: a card appears in the conversation in place of the view.
3232 * When the user opens the view from the card, it opens in the side panel, or full screen where the panel can't open.
3333 * When Claude calls the tool, Claude also tries to open the view in the side panel without a click.
34 * Behind its card, the view can stop running, such as when the user hasn't seen it yet or after it requests `inline`. When it loads again, it starts from your HTML.
3435 
3536If you list a value that the [MCP Apps SDK](https://modelcontextprotocol.github.io/ext-apps/api/index.html) doesn't define, such as `sidebar`, [the view doesn't start](#invalid-params-error-when-a-view-starts-or-requests-a-mode).
3637 
from line 117
116117| You request `fullscreen` from the side panel | `fullscreen` | The view stays in the side panel |
117118| You request a value that the SDK doesn't define | None | The promise rejects with an invalid params error |
118119 
119To return the view to the conversation, request `inline`. If Claude refuses a request, check [what a request needs](#the-returned-mode-differs-from-the-mode-that-you-requested).
120To return a view that supports `inline` to the conversation, request `inline`. If Claude refuses a request, check [what a request needs](#the-returned-mode-differs-from-the-mode-that-you-requested).
120121 
121122## Lay out a view by the size that Claude reports
122123 
from line 147
1461472. Open your app in a conversation that has the [unified Claude experience](https://support.claude.com/en/articles/16761823-claude-cowork-and-chat-are-one-claude), which combines chat and Cowork. If the message box offers a choice of **Chat** or **Cowork**, your account doesn't have it.
1471483. Look for the expand button, an icon that Claude shows above an inline view. A user clicks it to open the view in the side panel, or full screen where the panel can't open.
148149 
149If Claude shows no expand button, your organization may not have access. Keep your app working without the side panel, and test again later.
150If Claude shows no expand button, your organization may not have access. Keep your app working without the side panel.
150151 
151152### Views in a conversation without the side panel
152153 
from line 165
164165 * The 15 seconds include reading the `ui://` resource and loading the view.
165166 * A view that starts later appears in the conversation, behind the full-screen view.
166167* **The open view is in the side panel**: the new view replaces it if both views came from the same connector
167* **The new view lists `fullscreen` but not `inline`**: the new view opens in place of anything that the side panel shows
168* **The new view lists `fullscreen` but not `inline`**: if the side panel shows something else, such as a file or another connector's view, the new view waits behind its card in the conversation
168169 
169The replaced view returns to the conversation, and its `displayMode` becomes `inline`. To stop that view from acting on outdated data, see [Supersede older widget instances](https://claude.com/docs/connectors/building/mcp-apps/instance-supersession.md).
170A replaced view that supports `inline` returns to the conversation, and its `displayMode` becomes `inline`. To stop a replaced view from acting on outdated data, see [Supersede older widget instances](https://claude.com/docs/connectors/building/mcp-apps/instance-supersession.md).
170171 
171172## Troubleshoot display modes
172173 

connectors/building/mcp-apps/download-files Changed · +7 / -2 lines

from line 6
66 
77Your app's UI runs in Claude in a sandboxed frame, where no download starts from an `<a download>` link, a `blob:` URL, or a `data:` URL. Send each export through [`app.downloadFile`](https://modelcontextprotocol.github.io/ext-apps/api/classes/app.App.html#downloadfile) instead.
88 
9This page is for developers whose MCP App already renders in Claude.
10 
911> [!NOTE]
1012>
11> This page is for developers whose MCP App already renders in Claude. If you don't have an MCP App yet, start with [Add an interactive UI to your MCP server](https://claude.com/docs/connectors/building/mcp-apps/quickstart.md).
13> These cases are covered on other pages:
14>
15> * **Building your first MCP App**: see [Add an interactive UI to your MCP server](https://claude.com/docs/connectors/building/mcp-apps/quickstart.md)
16> * **Returning a file to Claude from a tool**: see [Support file uploads and downloads](https://claude.com/docs/connectors/building/files.md)
1217 
1318## Send a file from a view
1419 
from line 116
111116* Claude closed the **Download file** dialog
112117* Claude couldn't start the download
113118 
114If no dialog appeared, check the [file types that Claude refuses](#file-types-that-claude-refuses). If the promise rejects and you receive no result, catch the error and [find its cause](#troubleshoot-a-rejected-download-request).
119If no dialog appeared, check the [file types that Claude refuses](#file-types-that-claude-refuses). Claude can also refuse a request while an approval request is waiting. If the promise rejects and you receive no result, catch the error and [find its cause](#troubleshoot-a-rejected-download-request).
115120 
116121## File types that Claude refuses
117122 

connectors/building/mcp-apps/embedded-sites Changed · +8 / -4 lines

from line 167
1671675. Ask Claude to open the view, and name your connector in the message
1681686. Allow the origins. Claude lists them in one of these places:
169169 * In the approval request for the tool that opens the view.
170 * In a review that you open from a line beside the view. If the permission setting in the message box is **Auto**, Claude can open the view without asking, so use the review.
170 * In a review that you open from a line beside the view. Use the review if no approval request lists them.
1711717. Confirm that the site renders in the view
172172 
173173After you allow the origins, each one appears in `app.getHostCapabilities()?.sandbox?.csp?.frameDomains`. A view that opened before you allowed them receives an empty list.
from line 217
217217To sign a user in, pass a token from your server to the site through the view:
218218 
2192191. On your server, add a tool that returns a short-lived, single-use token
2202. Set the tool's `_meta.ui.visibility` to `["app"]`, so that Claude can't call the tool
2202. Set the tool's `_meta.ui.visibility` to `["app"]`, which tells clients not to offer the tool to the model
2212213. In the view's script, call the tool with [`app.callServerTool()`](https://modelcontextprotocol.github.io/ext-apps/api/classes/app.App.html#callservertool)
2222224. From the view, send the token to the frame with `postMessage`, and set the target origin to the site's exact origin
2232235. On the site, exchange the token for a session
224224 
225If your sign-in pages can be framed, you can show a sign-in form inside the frame instead.
225> [!WARNING]
226>
227> Don't rely on `visibility` to keep the token secret, in any client. A client can still let the model call the tool. The token can then enter the conversation, and anyone who gets it from there can exchange it for a session until it expires.
226228 
229If your sign-in pages [can be framed](#allow-claude-to-frame-your-site), you can show a sign-in form inside the frame instead, so that no token passes through a tool.
230 
227231## Device features in views that embed sites
228232 
229233A view can't use the camera, the microphone, location, or clipboard write when Claude allows an origin for it. The sites that the view embeds can't use them either. The view loses these features even if you request them in `_meta.ui.permissions`.
from line 235
231235Plan for other views to lose the same features, including views that embed nothing:
232236 
233237* **Directory connector**: when the listing allows an origin, plan for the connector's other views to lose them
234* **Custom connector**: where [embedded sites are available for custom connectors](#availability-of-embedded-sites-for-custom-connectors), plan for every view of the connector to lose them
238* **Custom connector**: plan for every view of the connector to lose them
235239 
236240To see which features Claude granted a view, read `app.getHostCapabilities()?.sandbox?.permissions` in the view's script after `app.connect()` resolves. Each key is a granted feature. Claude on mobile doesn't report these features.
237241 

connectors/building/mcp-apps/entry-points Changed · +5 / -5 lines

from line 6
66 
77This page is for developers of a remote connector whose MCP App already renders in Claude. Check which organizations, connectors, and users can use entry points before you build:
88 
9* **Organizations**: a limited set of organizations has access, so [check whether your organization has access](#check-whether-your-organization-has-access-to-entry-points)
9* **Organizations**: [check whether your organization has access](#check-whether-your-organization-has-access-to-entry-points)
1010* **Connectors**: [Verified](https://claude.com/docs/connectors/verification.md#verified) directory connectors and [custom connectors](https://claude.com/docs/connectors/verification.md#custom) can have entry points. Connectors installed from a Community listing can't.
1111* **Users**: a user needs the unified Claude experience, which combines chat and Cowork
1212 
from line 50
50501. [Refresh the tools list](#refresh-the-tools-list-after-you-change-an-entry-point) for your connector
51512. Open the [**Artifacts**](https://claude.ai/artifacts) page in Claude on the web
5252 
53A listed app appears as its own tile, or as an item in the list that opens from the page's connectors tile.
53A listed app appears as its own tile. If you mark many tools on one connector, some of its apps may not get a tile, even if they meet every condition.
5454 
5555If your app isn't listed, check the [conditions for showing an app](#conditions-for-showing-an-app-on-the-artifacts-page).
5656 
from line 68
6868* **Icon**: Claude can show an [icon that you declare](https://claude.com/docs/connectors/building/mcp-apps/design-guidelines.md#declare-an-app-icon-for-claude) on the app's tile and over the open view
6969* **Display mode**: on the web, Claude shows the view full screen when the view supports `fullscreen`, so include `fullscreen` if you declare [`availableDisplayModes`](https://claude.com/docs/connectors/building/mcp-apps/design-guidelines#declare-supported-display-modes).
7070 * Without `fullscreen`, the view appears in the conversation.
71* **Approval**: if the tool's permission is **Needs approval**, Claude asks the user for approval before the view opens. If the conversation's permission setting is **Auto**, Claude can open the view without asking.
71* **Approval**: Claude can ask the user for approval before the view opens, so don't count on the view being the first thing that the user sees. Whether it asks can depend on the [tool's permission](https://claude.com/docs/connectors/getting-started.md#manage-or-disconnect-a-connector), such as **Needs approval**, and on the conversation's permission setting.
7272 
7373### Set the title, name, and description of the marked tool
7474 
from line 121
121121To check your own organization, follow these steps:
122122 
1231231. [Refresh the tools list](#refresh-the-tools-list-after-you-change-an-entry-point), then reload Claude on the web
1242. If your app isn't listed and meets all the other [conditions](#conditions-for-showing-an-app-on-the-artifacts-page), your organization may not have access
1253. Keep your app working without an entry point, and test again later
1242. If none of your apps is listed and they meet all the other [conditions](#conditions-for-showing-an-app-on-the-artifacts-page), your organization may not have access
1253. Keep your app working without an entry point
126126 
127127### Entry points that appear while you test and stay hidden for other people
128128 

connectors/building/mcp-apps/external-links Changed · +9 / -9 lines

from line 2
22 
33> Declare allowed link destinations so ui/open-link requests from your directory connector's MCP App open without Claude's confirmation modal.
44 
5When your MCP App sends a `ui/open-link` request, Claude shows an **Open external link** confirmation modal before navigating. The modal protects users from being silently redirected by an embedded app.
5When your MCP App sends a `ui/open-link` request for a web URL, Claude shows an **Open external link** confirmation modal before navigating. The modal protects users from being silently redirected by an embedded app.
66 
7If your connector is published in the [Connectors Directory](https://claude.com/docs/connectors/directory.md), you can declare a set of trusted destinations that open immediately without the modal. Custom connectors and locally configured servers always show it. To skip the modal for a directory connector, [allowlist your destinations](#allowlist-link-destinations) and send each request after a [real user gesture](#user-activation-requirement), then [design your app](#design-for-the-modal) for the cases where the modal still appears.
7If your connector is published in the [Connectors Directory](https://claude.com/docs/connectors/directory.md), you can declare a set of trusted destinations that open immediately without the modal. Custom connectors and locally configured servers can't declare them. To skip the modal for a directory connector, [allowlist your destinations](#allowlist-link-destinations) and send each request after a [real user gesture](#user-activation-requirement), then [design your app](#design-for-the-modal) for the cases where the modal still appears.
88 
99## Default link behavior
1010 
11A `ui/open-link` request displays a confirmation modal showing the destination URL. If the user confirms, the link opens in a new tab. If they dismiss the modal, the request resolves as cancelled.
11A `ui/open-link` request for a web URL displays a confirmation modal showing the destination URL. If the user confirms, the link opens in a new tab. On the web and in Claude Desktop, if they dismiss the modal, the result has `isError: true`. There, while an approval request is waiting, Claude can also refuse a `ui/open-link` request without showing the modal, with the same result.
1212 
1313## Allowlist link destinations
1414 
from line 19
1919| Entry shape | Example | Matches |
2020| - | - | - |
2121| HTTPS origin | `https://docs.example.com` | Any `https://` URL whose hostname is exactly `docs.example.com`, case-insensitive. Subdomains don't match implicitly, so list each one you need. Port isn't compared. |
22| Custom URI scheme | `example-app` or `example-app:` | Any URL with the scheme `example-app:`, typically a deep link into your native mobile or desktop app. |
22| Custom URI scheme | `example-app` or `example-app:` | Any URL with the scheme `example-app:`, typically a deep link into your native mobile or desktop app, though Claude Desktop doesn't open these links. |
2323 
2424Entries that don't fit one of these shapes are ignored. This includes bare hostnames such as `example.com`, `http://` origins, and malformed values.
2525 
from line 37
3737 
3838* `https://example.com/pricing`
3939* `https://docs.example.com/getting-started?ref=claude`
40* `example-app://open/project/123`
40* `example-app://open/project/123`, except in Claude Desktop
4141 
4242These destinations still show the confirmation modal:
4343 
from line 53
5353 
5454Claude bypasses the modal only when the `ui/open-link` request follows a real user gesture in your app, such as a button click.
5555 
56If your app sends `ui/open-link` without a preceding gesture, for example programmatically, on a timer, or after the browser's activation window has expired, Claude shows the modal so the user's confirmation click supplies the gesture the browser requires to open a new tab.
56If your app sends `ui/open-link` without a preceding gesture, for example programmatically, on a timer, or after the browser's activation window has expired, Claude doesn't bypass the modal, whose confirmation click supplies the gesture the browser requires to open a new tab.
5757 
5858> [!NOTE]
5959>
from line 63
6363 
6464Even with an allowlist configured, the modal still appears in some cases, so your app should remain usable when it does:
6565 
66* Custom and local connectors always show the modal, and your app may run outside the directory during development or in self-hosted deployments
67* Destinations not on your allowlist, or added since your last published directory update, show the modal
68* Requests without user activation show the modal
66* Custom and local connectors can't declare an allowlist, and your app may run outside the directory during development or in self-hosted deployments
67* Web destinations not on your allowlist, or added since your last published directory update, show the modal
68* Requests without user activation don't bypass the modal
6969 
7070Provide enough context in your UI that the destination URL shown in the modal is recognizable to the user.
7171 

connectors/building/mcp-apps/getting-started Changed · +4 / -4 lines

from line 18
1818 
1919* **Scoping an app, or extending one that already renders in Claude**: see [what an MCP App can do in Claude](#what-an-mcp-app-can-do-in-claude), such as open in the side panel, embed your website, or give Claude tools to call
2020* **New to MCP Apps**: [try an example in Claude Desktop](#try-an-example-mcp-app-in-claude-desktop) to see how an MCP App looks and behaves
21* **Ready to build**: [build your own MCP App](#build-your-own-mcp-app) from a quickstart, an example implementation, or the MCP Apps skills for AI coding agents
21* **Ready to build**: [build your own MCP App](#build-your-own-mcp-app) from a quickstart, an example implementation, or the MCP Apps skills for AI coding agents. First, [check what a capability requires](#check-what-a-capability-requires).
2222 
2323## What an MCP App can do in Claude
2424 
from line 33
3333 
3434Check requirements such as these before you build:
3535 
36* **Organization access**: before you build on a capability such as the side panel, entry points, or app tools, check whether your organization has access by following the steps on that capability's page
36* **Organization access**: the side panel, entry points, app tools, and embedded websites in custom connectors aren't available in every organization. Before you build on one, check whether your organization has access by following the steps on that capability's page. Test with the [unified Claude experience](https://support.claude.com/en/articles/16761823-claude-cowork-and-chat-are-one-claude), which combines chat and Cowork. Having that experience doesn't mean that your organization has access.
3737* **Remote server**: app tools, entry points, and embedded websites need a connector that's backed by a [remote server](https://claude.com/docs/connectors/building/index.md#choose-where-the-server-runs)
3838* **Verified listing**: for a directory connector, entry points and embedded websites are available only under a [Verified](https://claude.com/docs/connectors/verification.md#verified) listing.
3939 * People who install your connector from a [Community](https://claude.com/docs/connectors/verification.md#community) listing don't get either one, even if both worked while you tested with a custom connector.
from line 122
122122 
123123Once the server is connected, prompt Claude to use it. For example, with the customer segmentation server connected, ask Claude to show you recent customer data.
124124 
125Claude asks for permission to display the app. Click **Allow once**, or **Always allow** for a server you trust, and the MCP App renders inline in the conversation. If the permission setting in the message box is **Auto**, Claude can display the app without asking.
125If Claude asks for permission to display the app, click **Allow once**, or **Always allow** for a server you trust. The MCP App renders inline in the conversation.
126126 
127127If the tool runs but no app appears, [Troubleshoot MCP Apps](https://claude.com/docs/connectors/building/mcp-apps/troubleshooting.md#tool-call-appears-but-the-app-is-invisible) lists what to check.
128128 
from line 144
144144 
145145### Set `ui.domain` for Claude
146146 
147Each host defines its own format for the [`Resource._meta.ui.domain`](https://modelcontextprotocol.github.io/ext-apps/api/interfaces/app.McpUiResourceMeta.html#domain) field, the sandbox origin your app is served from.
147Each host defines its own format for the [`Resource._meta.ui.domain`](https://modelcontextprotocol.github.io/ext-apps/api/interfaces/app.McpUiResourceMeta.html#domain) field, the sandbox origin your app is served from. Put the field on the content item that your `resources/read` handler returns, with the rest of the resource's `_meta.ui`.
148148 
149149For Claude, the value is the first 32 hex characters of the SHA-256 of your server URL, followed by `.claudemcpcontent.com`. Compute it with this command, replacing `https://example.com/mcp` with your server URL:
150150 

connectors/building/mcp-apps/instance-supersession Changed · +9 / -8 lines

from line 2
22 
33> Keep only the newest copy of an MCP App widget active when Claude calls its tool more than once in a conversation, using a server key and BroadcastChannel.
44 
5Each time Claude calls a tool that renders an MCP App, Claude mounts a separate iframe in the conversation. No host API unmounts earlier instances when a newer one appears, so by default several live copies of the same widget stay in the conversation. Each copy independently pushes [model-context updates](https://modelcontextprotocol.github.io/ext-apps/api/classes/app.App.html#updatemodelcontext), the data a widget feeds into Claude's context for the next turn, and [messages](https://modelcontextprotocol.github.io/ext-apps/api/classes/app.App.html#sendmessage) to Claude.
5Each time Claude calls a tool that renders an MCP App, Claude mounts a separate iframe in the conversation. No host API unmounts earlier instances when a newer one appears, so by default several live copies of the same widget stay in the conversation. Each copy independently sends [messages](https://claude.com/docs/connectors/building/mcp-apps/send-messages.md) and [model-context updates](https://modelcontextprotocol.github.io/ext-apps/api/classes/app.App.html#updatemodelcontext), the data a widget makes available for Claude to read through a tool call, not with the user's message.
66 
77This page is for MCP App developers whose widget represents a single piece of state, such as a shopping cart or a dashboard, where only the most recent instance should remain interactive. It shows how to use [`BroadcastChannel`](https://developer.mozilla.org/docs/Web/API/BroadcastChannel) so earlier instances disable themselves: [mint an election key on the server](#mint-the-election-key-on-the-server), [run the election in the widget](#run-the-election-in-the-widget), then [handle the production edge cases](#handle-production-edge-cases).
88 
from line 14
1414 
1515The supersession pattern uses that shared `BroadcastChannel` to elect the newest instance:
1616 
171. **The server stamps each tool result with an election key**: it returns a `{createdAt, seq}` pair in [`structuredContent`](https://modelcontextprotocol.io/specification/latest/server/tools#structured-content), the typed JSON payload slot of an MCP tool result. `createdAt` is server wall-clock time and `seq` is a monotonic counter. Tool results are stored in the conversation transcript, so every device and every remount of the widget sees the same key.
182. **Each widget announces its key on a shared channel**: shortly after `connect()` resolves, the host delivers the tool result that mounted this widget, including its `structuredContent`, through the SDK's [`toolresult` event](https://modelcontextprotocol.github.io/ext-apps/api/types/app.AppEventMap.html). The widget reads its key from that event, opens a `BroadcastChannel`, and broadcasts the key.
193. **Any widget that sees a younger sibling marks itself superseded**: it greys out its UI, disables its buttons, and short-circuits all calls that mutate model context or inject messages.
171. **The server stamps each tool result with an election key**: it returns a `{createdAt, seq}` pair in [`structuredContent`](https://modelcontextprotocol.io/specification/latest/server/tools#structured-content), the typed JSON payload slot of an MCP tool result. `createdAt` is server wall-clock time and `seq` is a monotonic counter. Tool results are stored in the conversation transcript.
182. **A widget announces its key on a shared channel**: shortly after `connect()` resolves, the host delivers the tool result that mounted this widget, through the SDK's [`toolresult` event](https://modelcontextprotocol.github.io/ext-apps/api/types/app.AppEventMap.html). The widget opens a `BroadcastChannel` and, if that event carries its key, broadcasts the key.
193. **A widget that sees a younger sibling marks itself superseded**: it greys out its UI, disables its buttons, and short-circuits all calls that mutate model context or inject messages.
2020 
2121## Mint the election key on the server
2222 
from line 43
4343 const createdAt = Date.now();
4444 return {
4545 content: [{ type: "text", text: `Cart rendered with ${list.length} item(s).` }],
46 // The election key travels with the tool result in the transcript,
47 // so rehydrated widgets on any device recover the same ordering.
46 // The election key travels with the tool result in the transcript.
4847 structuredContent: { items: list, seq, createdAt },
4948 };
5049 },
from line 52
5352 
5453### Understand why the key comes from the server
5554 
56Client mount time doesn't reflect tool-call order. When a user reopens a stored conversation, Claude lazy-mounts widget cells as they scroll into view, so an older widget can mount after a newer one and would rank as newest in an election based on client timestamps. The server-minted key is written into the transcript at tool-call time and is identical everywhere.
55Client mount time doesn't reflect tool-call order. When a user reopens a stored conversation, Claude lazy-mounts widget cells as they scroll into view, so an older widget can mount after a newer one and would rank as newest in an election based on client timestamps. The server-minted key is written into the transcript at tool-call time.
5756 
5857## Run the election in the widget
5958 
from line 91
9291const instanceId = hostContext?.toolInfo?.id ?? crypto.randomUUID();
9392```
9493 
94If the event carries no key, this listener doesn't call `announce()`, and the widget stays live when a newer copy appears.
95 
9596### Broadcast and compare on a shared channel
9697 
9798Broadcast the key and compare against every sibling you hear from. The comparison is `createdAt`, tie-broken by `seq`, then by instance ID for determinism. Ignore inbound messages until your own key is finalized so you never reply with an undefined key:
from line 232
231232 
232233On claude.ai on the web, [`hostContext.toolInfo.id`](https://modelcontextprotocol.github.io/ext-apps/api/interfaces/app.McpUiHostContext.html#toolinfo) is the stable tool-use ID, so you can persist the resolved server key to `localStorage` keyed by that ID and reuse it on the next mount without waiting for the `toolresult` event again.
233234 
234Treat the `localStorage` cache as an optimization rather than a correctness guarantee. On Claude iOS, `toolInfo.id` is `undefined` when a stored conversation is rehydrated, so there is no stable per-instance cache key. Detect that case and skip the cache; the server key from the `toolresult` event is the only ordering source that works on every platform.
235Treat the `localStorage` cache as an optimization rather than a correctness guarantee. On Claude iOS, `toolInfo.id` is `undefined` when a stored conversation is rehydrated, so there is no stable per-instance cache key. Detect that case and skip the cache.
235236 
236237### If you bypass the SDK `App` class
237238 

connectors/building/submission Changed · +3 / -3 lines

from line 87
8787 
8888### Allowed link URIs
8989 
90If your connector uses the `ui/open-link` capability to open URLs in the user's browser or native apps, provide the list of link targets your server will request. Claude uses this list to suppress the **Open external link** confirmation prompt for destinations you've declared. Links to any other destination still work, but users are asked to confirm before the link opens.
90If your connector uses the `ui/open-link` capability to open URLs in the user's browser or native apps, provide the list of link targets your server will request. Claude uses this list to suppress the **Open external link** confirmation prompt for destinations you've declared. Links to any other web destination still work, but users are asked to confirm before the link opens.
9191 
92The allowed link URIs list is optional. If you omit it, your connector functions normally, and users see a confirmation prompt each time it opens a link.
92The allowed link URIs list is optional. If you omit it, users see a confirmation prompt each time your connector opens a web link.
9393 
9494Provide each entry in one of these forms:
9595 
9696* **HTTPS origin**: `https://example.com`. Only the scheme and hostname are matched, and paths, ports, and query strings are ignored. Subdomains aren't implied, so list each one, such as `https://app.example.com` and `https://docs.example.com`
97* **Custom URI scheme**: `myapp:` for deep links into a native app you own. Only the scheme is matched
97* **Custom URI scheme**: `myapp:` for deep links into a native app you own. Only the scheme is matched. Claude Desktop doesn't open these links
9898 
9999Every origin and scheme you list must be owned by you, the submitting organization. You may not list third-party domains or URI schemes registered to apps you don't publish. Entries you don't own are removed during review. [Open external links from MCP Apps](https://claude.com/docs/connectors/building/mcp-apps/external-links.md) explains how Claude matches entries and when the prompt still appears.
100100 

third-party/claude-desktop/ssh-remote-sessions Changed · +57 / -3 lines

### Refuse sessions on a host without a working sandbox #### What refuse does on a host #### Where sessions still run under refuse #### What refuse leaves out ### A required sandbox isn't available

from line 296
296296 
297297A device that gets its SSH keys from a managed profile, a registry policy, or the profile's bootstrap server moves to the configuration from the [Enterprise Admin Console](https://claude.com/docs/third-party/claude-desktop/admin-console.md) when its user signs in to an organization that uses the console and chooses that organization in the dialog that follows. The app then restarts. A device that used such an organization before its profile arrived, and whose user hasn't signed out of the app since, moves back at its first launch on Claude Desktop 2.37337.0 or later, with no new sign-in and without asking the user, even if the stored sign-in has expired. To prevent that, add `disableDeploymentModeChooser` to the profile before devices update. `forceLoginOrgUUID` prevents it only for organizations it leaves out. Before Claude Desktop 2.37337.0, a device with such a profile ignores the admin console.
298298 
299After the move, `sshHostAllowlist`, `sshConfigs`, `disableDesktopLocalSessions`, `sshTransport`, and `sshClientPath` from the profile, or from the profile's bootstrap server, don't apply, even where the console leaves them unset. For the profile's other settings, see [Which settings apply on a device with a managed profile](https://claude.com/docs/third-party/claude-desktop/admin-console.md#which-settings-apply-on-a-device-with-a-managed-profile).
299After the move, `sshHostAllowlist`, `sshConfigs`, `disableDesktopLocalSessions`, `sshTransport`, `sshClientPath`, and `sshHostSandboxUnavailable` from the profile, or from the profile's bootstrap server, don't apply, even where the console leaves them unset. For the profile's other settings, see [Which settings apply on a device with a managed profile](https://claude.com/docs/third-party/claude-desktop/admin-console.md#which-settings-apply-on-a-device-with-a-managed-profile).
300300 
301301* **Which hosts**: the console's `sshHostAllowlist` applies. If the console leaves the key unset (**Not set**), or the app hasn't yet downloaded the console's configuration at this launch (the copy a device keeps of the last download holds no lists), `sshHostAllowlist` from Claude Code's managed settings on the device applies. With neither, SSH remote sessions are off.
302302* **Which SSH client**: the console's `sshTransport` and `sshClientPath` apply. On a Windows device, a client that the console's `sshClientPath` names makes the connection only if it is Microsoft's OpenSSH. With `system-openssh`, SSH connections fail under any other client. A key that the console leaves unset takes its default under [Host requirements](#host-requirements). Until the app has downloaded the console's configuration at a launch, both keys count as unset, so no client is pinned. Until then the built-in client makes the connection on a Windows device, even where the console sets `system-openssh`. The device's OpenSSH client makes it on a macOS or Linux device, even where the console sets `builtin`.
from line 407
407407* `disabledBuiltinTools`, `builtinToolPolicy`, `autoModeEnabled`, and `disableBypassPermissionsMode`.
408408* [`allowedWorkspaceFolders`](https://claude.com/docs/third-party/claude-desktop/configuration#allowedworkspacefolders), evaluated against the host's filesystem. `~` is the SSH user's home on the host, `%VAR%` entries are ignored, and Claude Desktop refuses to start a session in a directory outside every entry, so with a fleet value such as `~/Documents/Claude`, remote sessions start only under that path in the SSH user's home. List the folders that users work in on the host rather than `~` or a folder that contains it, such as `/home`. The SSH user's home holds SSH keys and shell startup files, which Claude can read in a listed folder, and setting `mode` to `ro` on `~` doesn't keep Claude from changing them. For an entry with `mode` set to `ro`, see [Read-only folders on the remote host](#read-only-folders-on-the-remote-host).
409409* [`blockReadsOutsideWorkingDirectories`](https://claude.com/docs/third-party/claude-desktop/configuration#blockreadsoutsideworkingdirectories), evaluated on the host, so the working directories and the home directory it hides from shell commands are the SSH user's there. Hiding files from shell commands needs the host's sandbox dependencies (next item). On a host without those dependencies, or a Windows host, the key still confines Claude's file tools. For shell commands, the key can only ask the user to approve those that Claude Code recognizes as reading outside the working directories, or whose command lines it can't analyze. Files a user attaches to a remote session stay readable, except on a Windows host, where the session's plugin files and attachments stay outside the file tools' reach under this key.
410* `coworkEgressAllowedHosts`, as Claude Code managed settings. The network and filesystem sandbox it produces with `allowedWorkspaceFolders` depends on the host having Claude Code's sandbox dependencies installed (see [Claude Code sandboxing](https://code.claude.com/docs/en/sandboxing)). Without them, commands run unsandboxed. See [Sandbox status on the remote host](#sandbox-status-on-the-remote-host) for the message the session shows.
410* `coworkEgressAllowedHosts`, as Claude Code managed settings. The network and filesystem sandbox it produces with `allowedWorkspaceFolders` depends on the host having Claude Code's sandbox dependencies installed (see [Claude Code sandboxing](https://code.claude.com/docs/en/sandboxing)). Without them, commands run unsandboxed, unless you [refuse such sessions](#refuse-sessions-on-a-host-without-a-working-sandbox). See [Sandbox status on the remote host](#sandbox-status-on-the-remote-host) for the message the session shows.
411411* `managedMcpServers`, as the Claude Code managed setting that keeps the session from loading MCP servers that users define in Claude Code's own configuration on the host. The managed servers themselves are reached from the device (see [Where MCP servers run in a remote session](#where-mcp-servers-run-in-a-remote-session)).
412412* Plugins from your [allowed marketplaces](https://claude.com/docs/third-party/claude-desktop/extensions.md), copied to the host. A plugin's `hooks` directory is not copied, so its hooks do not run in a remote session, and a plugin whose manifest declares hooks elsewhere is not copied at all. To run your organization's hooks on the host, see [Run a hook for every user](https://claude.com/docs/third-party/claude-desktop/extensions.md#run-a-hook-for-every-user).
413413 
from line 439
439439* **Folders**: Claude Desktop doesn't compare the folders that the sandbox allows with the folders in your policy.
440440* **Network hosts**: if the answer lists the network hosts that the sandbox allows, and a network host from your policy is missing from the list, Claude Desktop reports the reason `overridden`. Claude Desktop doesn't check for network hosts that the remote host's own settings add. Requires Claude Desktop 3.6556.1 or later.
441441 
442When the sandbox isn't confirmed, the session continues and shell commands can run outside the sandbox. To keep Claude Code from starting on a host whose operating system has no sandbox or that lacks a dependency, set [`sandbox.failIfUnavailable`](https://code.claude.com/docs/en/sandboxing#enforce-sandboxing-with-managed-settings) to `true` and [`parentSettingsBehavior`](https://claude.com/docs/third-party/claude-desktop/code#interaction-with-claude-code%E2%80%99s-own-managed-settings) to `"merge"` in the host's Claude Code managed settings. With `"merge"`, that setting applies together with your policy.
442When the sandbox isn't confirmed, the session continues and shell commands can run outside the sandbox. To keep Claude Code from starting on a host whose operating system has no sandbox or that lacks a dependency, set [`sandbox.failIfUnavailable`](https://code.claude.com/docs/en/sandboxing#enforce-sandboxing-with-managed-settings) to `true` and [`parentSettingsBehavior`](https://claude.com/docs/third-party/claude-desktop/code#interaction-with-claude-code%E2%80%99s-own-managed-settings) to `"merge"` in the host's Claude Code managed settings. With `"merge"`, that setting applies together with your policy, where no server-managed or gateway settings apply. To require the sandbox from Claude Desktop's configuration, see [Refuse sessions on a host without a working sandbox](#refuse-sessions-on-a-host-without-a-working-sandbox).
443443 
444444Find the message, or the `reason` your collector received, for the cause and the fix.
445445 
from line 472
472472* **`sandbox_on`**: `false` when Claude Code reports no sandbox running, `true` when it reports one that Claude Desktop can't match to your policy, and absent when Claude Code doesn't say
473473* **`session_id`**: Claude Desktop's ID for the session
474474* **`backend_kind`**: `ssh`
475* **`refuse_set`**: `true` when Claude Desktop sent the [`refuse`](#refuse-sessions-on-a-host-without-a-working-sandbox) requirement with the session's start, and absent otherwise.
475476 
476477The event doesn't name the host. To find the host, ask the user that the [user attribution](https://claude.com/docs/third-party/claude-desktop/telemetry.md#user-attribution) attributes identify.
477478 
479### Refuse sessions on a host without a working sandbox
480 
481To stop Code sessions over SSH on a host where the [sandbox](https://claude.com/docs/third-party/claude-desktop/code.md#applied-as-managed-policy) from your policy can't start, set [`sshHostSandboxUnavailable`](https://claude.com/docs/third-party/claude-desktop/configuration#sshhostsandboxunavailable) to `refuse` in Claude Desktop's configuration. With the key unset or set to `warn`, such sessions run with a [warning](#sandbox-status-on-the-remote-host), and shell commands can run outside the sandbox.
482 
483Deliver the key as follows:
484 
485* **Versions**: update your devices first, and a Claude apps gateway that delivers your configuration, because an older gateway doesn't start with the key. Earlier versions of Claude Desktop run sessions as under `warn`, and on Windows and Linux a profile with the key [can turn off their other settings](https://claude.com/docs/third-party/claude-desktop/mdm.md#keys-that-an-earlier-version-does-not-recognize). The [configuration changelog](https://claude.com/docs/third-party/claude-desktop/configuration-changelog.md) gives the versions.
486* **Source**: where a bootstrap server or the Enterprise Admin Console delivers your configuration, set the key there, not in a device management profile, whose value Claude Desktop then drops. Elsewhere, add the key to a profile that holds your whole configuration, because a profile that sets it replaces the local configuration. A device's first profile [changes more than that](https://claude.com/docs/third-party/claude-desktop/mdm.md#what-a-profile-or-policy-changes-on-a-device). A device that gets the key from a profile, or from the profile's bootstrap server, can move to an Enterprise Admin Console organization, and that `refuse` then doesn't apply: see [Devices that move to an admin console organization](#devices-that-move-to-an-admin-console-organization).
487* **Value**: write `refuse` or `warn` in lower case. Any other value that isn't empty, such as `Warn`, counts as `refuse`.
488* **Restart**: expect Claude Desktop to ask users to restart it after the key changes, whether or not they use SSH.
489 
490#### What refuse does on a host
491 
492Claude Code on the host checks the sandbox each time it starts for a session, and exits if the sandbox isn't available. The session shows the card [A required sandbox isn't available](#a-required-sandbox-isn%E2%80%99t-available), and tries again when the user sends a message.
493 
494* **Linux hosts**: the check fails, for example, where a [sandbox dependency](https://code.claude.com/docs/en/sandboxing#set-up-linux-and-wsl2) is missing or AppArmor keeps bubblewrap from starting.
495* **Windows hosts**: Claude Code reports no sandbox there, so sessions don't start, apart from the [cases where sessions still run](#where-sessions-still-run-under-refuse).
496* **Sessions that are already running**: they continue until their next start. A resumed session, a scheduled run, and a side chat each count as a start.
497 
498#### Where sessions still run under refuse
499 
500Check your policy and your hosts for these cases:
501 
502* **Your configuration asks for no sandbox**: it asks for none where `coworkEgressAllowedHosts` contains `*` and `allowedWorkspaceFolders` is unset. On a device whose only configuration is the local configuration file, [an unset `coworkEgressAllowedHosts` doesn't turn on the sandbox by itself](https://claude.com/docs/third-party/claude-desktop/web-tools#unset-allowlist-in-code-sessions) either. Both keys reach well beyond SSH, so read the entries for [`coworkEgressAllowedHosts`](https://claude.com/docs/third-party/claude-desktop/configuration#coworkegressallowedhosts) and [`allowedWorkspaceFolders`](https://claude.com/docs/third-party/claude-desktop/configuration#allowedworkspacefolders) before you change them.
503* **Claude Code managed settings on the host replace your policy**: they do so unless `parentSettingsBehavior` there is `"merge"`, and settings from a policy helper do so either way. `refuse` then applies only if settings on the host turn a sandbox on. Where none do, a Windows host starts sessions too.
504* **Server-managed or gateway settings replace your policy**: with the [Claude API](https://claude.com/docs/third-party/claude-desktop/claude-api.md) as the inference provider, Claude Code on the host fetches the [server-managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) of the organization that owns the credential. If that organization has any, they replace your policy on every host, even one with no managed settings of its own, unless `parentSettingsBehavior` in them is `"merge"`. While they apply, Claude Code by default ignores most keys in a file or profile on the host, `"merge"` among them. A [Claude apps gateway's `code` settings](https://claude.com/docs/third-party/claude-desktop/code#interaction-with-claude-code%E2%80%99s-own-managed-settings) rank the same way, but merge unless they set `"first-wins"`.
505* **Managed settings loosen the sandbox**: even under `"merge"`, the values in the host's managed settings, the server-managed settings, or a gateway's `code` settings win over yours, for example `sandbox.enabled` or `sandbox.failIfUnavailable` set to `false`.
506* **A launcher on the host locates Claude Code itself**: with [`claudeCodeProcessWrapperEnabled`](https://claude.com/docs/third-party/claude-desktop/configuration#claudecodeprocesswrapperenabled) on, a session through such a launcher gets no sandbox settings from your policy, whatever `parentSettingsBehavior` says. A launcher that the host's managed settings name in `processWrapper` is different. `refuse` applies through it where those settings set `"merge"`, no server-managed or gateway settings apply, and the launcher passes its arguments on.
507* **The sandbox passes the check and fails later**: the session starts with no card, and each shell command that would run in the sandbox fails or is refused. Have the host's administrator repair the sandbox.
508 
509Where Claude Code's managed settings replace your policy, set `parentSettingsBehavior` to `"merge"` in them, as [Interaction with Claude Code's own managed settings](https://claude.com/docs/third-party/claude-desktop/code.md#interaction-with-claude-code%E2%80%99s-own-managed-settings) describes. `"merge"` counts for every application that starts Claude Code under those settings, Claude Desktop's local Code sessions included, and lets that application's allow rules and sandbox allowlists apply: see [Let an embedding host add policy](https://code.claude.com/docs/en/managed-settings#let-an-embedding-host-add-policy), which also says which source Claude Code reads the key from. If the same settings set `sandbox.failIfUnavailable` to `true`, the sessions for which your policy asks for a sandbox then [don't start on Windows](https://code.claude.com/docs/en/sandboxing#enforce-sandboxing-with-managed-settings), or on any machine where the sandbox can't start.
510 
511The rest is Claude Code's own policy, which binds every Claude Code that reads it, in a terminal too. To require a sandbox there, which is the only way behind a launcher that locates Claude Code, follow [Enforce sandboxing with managed settings](https://code.claude.com/docs/en/sandboxing#enforce-sandboxing-with-managed-settings) and [How Claude Code combines managed sources](https://code.claude.com/docs/en/managed-settings#how-claude-code-combines-managed-sources) in the Claude Code documentation. Settings that you create for this replace your policy too, unless they set `"merge"`.
512 
513Where a sandbox starts that didn't run before, a `true` for [`sandbox.autoAllowBashIfSandboxed`](https://code.claude.com/docs/en/settings-reference#sandbox-autoallowbashifsandboxed) in a user's, a project's, or a local settings file on the host takes effect: sandboxed Bash commands then run without a prompt, even past an ask rule for all of Bash.
514 
515To find sessions that started under `refuse` and run without a confirmed sandbox, look for `refuse_set` on the [`desktop_ssh_sandbox_check_failed`](#sandbox-status-on-the-remote-host) event. The attribute is absent for a session through a launcher that locates Claude Code, and for a process that started before you set the key. A sandbox that fails later and a refused start send no such event, so a missing event is no proof that the sandbox runs.
516 
517#### What refuse leaves out
518 
519Don't count on `refuse` to keep everything on the host inside the sandbox:
520 
521* **A refused host**: Claude Desktop still connects to it and installs Claude Code there, and MCP servers and `SessionStart` hooks can run before Claude Code exits.
522* **Excluded commands**: the sandbox doesn't cover commands listed in Claude Code's `sandbox.excludedCommands`. Under `refuse`, Claude Desktop shows the [`overridden`](#sandbox-status-on-the-remote-host) warning where Claude Code reports such commands, and the session continues.
523* **Other programs**: MCP servers on the host, hooks, `!` commands, and the session's terminal (including commands that Claude runs there) run outside the sandbox.
524* **The SSH account and repositories**: `refuse` doesn't protect against the SSH user, or against settings in that account or in a repository.
525 
478526### Sandbox from the host's managed settings
479527 
480528Where your policy has no sandbox, Claude Desktop 4.16336.0 or later asks Claude Code whether managed settings on the host turn a sandbox on, and reports one that isn't running.
from line 929
881929* **`the name is the jump host's`**: the card's title is "This computer's ssh refuses the jump host's user name". In the user's `~/.ssh/config`, move the name from `ProxyJump` to a `User` line in the jump host's own `Host` block.
882930 
883931This card requires Claude Desktop 2.37337.0 or later.
932 
933### A required sandbox isn't available
934 
935Claude Code on the host requires a sandbox that isn't available there, so it exits as it starts. The requirement comes from [`sshHostSandboxUnavailable`](#refuse-sessions-on-a-host-without-a-working-sandbox) set to `refuse` in your configuration, or from `sandbox.failIfUnavailable` in Claude Code settings on the host, in server-managed settings or a gateway's `code` settings, or in what a policy helper returns.
936 
937The card's details give Claude Code's reason, such as `dependencies are missing`. They can end with Claude Code's own hint, `Set sandbox.failIfUnavailable=false to allow unsandboxed execution`. Don't follow that hint: it switches the requirement off. Where the reason names missing dependencies on a Linux host, install the [sandbox dependencies](https://code.claude.com/docs/en/sandboxing#set-up-linux-and-wsl2) with the distribution's package manager, then have the user send a message in the session. Claude Code reports no sandbox on a Windows host, so use a macOS or Linux host.
884938 
885939### Setup on the host fails after SSH connects
886940 

connectors/building/review-criteria Changed · +2 / -2 lines

from line 28
2828 
2929### Provide tool annotations
3030 
31Every tool must include a `title` and the applicable hint: `readOnlyHint: true` for read-only tools, and `destructiveHint: true` for tools that modify or delete data. These determine auto-permissions in Claude. Read-only tools can run without per-call confirmation, and destructive tools always prompt.
31Every tool must include a `title` and the applicable hint: `readOnlyHint: true` for read-only tools, and `destructiveHint: true` for tools that modify or delete data. Claude can use these hints to decide when to ask the user for confirmation. Read-only tools can run without per-call confirmation, and destructive tools can require it. Whether they do can depend on the user's settings, the organization's settings, and the conversation's permission setting.
3232 
3333### Keep tool names short
3434 
from line 77
7777 
7878Alongside the server itself, a submission carries links and terms acknowledgments that reviewers check:
7979 
80* **Allowed link URIs**: recommended if your server calls `ui/open-link`. Declared HTTPS origins and custom URI schemes open without a confirmation prompt, and anything else still prompts the user. See [Allowed link URIs](https://claude.com/docs/connectors/building/submission.md#allowed-link-uris)
80* **Allowed link URIs**: recommended if your server calls `ui/open-link`. Declared HTTPS origins open without a confirmation prompt, as do declared custom URI schemes outside Claude Desktop. Other web links still prompt the user. See [Allowed link URIs](https://claude.com/docs/connectors/building/submission.md#allowed-link-uris)
8181* **Public documentation**: required by your publish date. A blog post or help-center article is sufficient, and you can share docs privately with Anthropic during review
8282 
8383## Test before you submit

connectors/building/testing Changed · +2 / -2 lines

from line 2
22 
33> Test your MCP server against Claude as a custom connector before you submit it to the directory, including a local server exposed through a tunnel.
44 
5You test an MCP server against the real Claude client by adding it to Claude as a custom connector. There is no separate staging environment, so you test in production. Custom connectors use the same runtime as directory connectors, with an exception for MCP Apps. Where embedded sites are available for custom connectors, plan for a custom connector's views to [lose some device features](https://claude.com/docs/connectors/building/mcp-apps/embedded-sites.md#device-features-in-views-that-embed-sites), such as the camera, while you test. Apart from features that read your directory listing, what works as a custom connector will work after publication.
5You test an MCP server against the real Claude client by adding it to Claude as a custom connector. There is no separate staging environment, so you test in production. Custom connectors use the same runtime as directory connectors, with exceptions for MCP Apps and [file transfers](https://claude.com/docs/connectors/building/files.md). Plan for a custom connector's views to [lose some device features](https://claude.com/docs/connectors/building/mcp-apps/embedded-sites.md#device-features-in-views-that-embed-sites), such as the camera, while you test. Apart from features that read your directory listing or that aren't available to every organization, what works as a custom connector will work after publication.
66 
7For example, where embedded sites are available for custom connectors, a [website embedded in an MCP App](https://claude.com/docs/connectors/building/mcp-apps/embedded-sites.md#test-embedded-sites-with-a-custom-connector) loads while you test only after you allow it. After publication, the website loads only if your listing is Verified and allows its origin. An MCP App's [entry point](https://claude.com/docs/connectors/building/mcp-apps/entry-points.md#conditions-for-showing-an-app-on-the-artifacts-page) that appears while you test stays hidden for people who install a Community listing.
7For example, where embedded sites are available for custom connectors, a [website embedded in an MCP App](https://claude.com/docs/connectors/building/mcp-apps/embedded-sites.md#test-embedded-sites-with-a-custom-connector) loads while you test only after you allow it. After publication, the website loads only if your listing is Verified and allows its origin. An MCP App's [entry point](https://claude.com/docs/connectors/building/mcp-apps/entry-points.md#conditions-for-showing-an-app-on-the-artifacts-page) that appears while you test stays hidden for people who install a Community listing. For a custom connector, Claude [doesn't transfer files](https://claude.com/docs/connectors/building/files.md#test-in-claude-code), so test file transfers with a connector added from your listing.
88 
99This page is for developers with a running server, whether it's deployed or still on your machine. It covers adding the server to Claude, validating it with MCP Inspector, detecting Claude as the client, and preparing a test account for Verified review. If a connection fails while you test, [Troubleshoot your connector](https://claude.com/docs/connectors/building/troubleshooting.md) walks through each error message.
1010 
Feedback