К основному содержанию
команда CX Codex официальный · Anthropic

bootstrap · anthropics — команда для Claude Code: что делает и как установить

Команда bootstrap для Claude Code, которая настраивает endpoint для динамической конфигурации и управления серверами MCP. Запускается при инициализации расширения для загрузки параметров пользователей.

Apache-2.0 ★ 41 441 обновлён 2026-09-21

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add anthropics/financial-services
/plugin install claude-for-msft-365-install@claude-for-financial-services
Открыть на GitHub

Что делает bootstrap

Bootstrap передаёт структурированные данные — списки серверов mcp_servers и доступные skills — которые нельзя задать простыми строковыми атрибутами. При запуске расширение обращается к HTTPS GET-обработчику, передавая Entra-токен, а в ответ получает JSON, переопределяющий манифест для конкретного пользователя.

Для корректной работы сервиса нужно настроить CORS-заголовки. Доступ должен быть открыт для https://pivot.claude.ai через заголовок Access-Control-Allow-Origin. Без этого браузер внутри панели задач заблокирует ответ, даже если сервер вернёт 200 OK. При использовании токенов SSO необходимо валидировать JWT на стороне сервера, проверяя поля aud, iss, exp и oid.

Какие задачи решает

  • загрузить индивидуальные настройки для пользователей
  • динамически подключать сервера MCP
  • передавать структурированные конфигурации в расширение
  • управлять списком доступных скиллов

Примеры запросов агенту

  • Используй bootstrap для настройки моего профиля
  • Примени конфигурацию bootstrap для загрузки серверов MCP
  • Проверь работу bootstrap endpoint

Как установить bootstrap

1Через маркетплейс плагинов

/plugin marketplace add anthropics/financial-services
/plugin install claude-for-msft-365-install@claude-for-financial-services

2Вручную: положить файлы

.claude/commands/bootstrap.md

Вызов — /bootstrap. Для всех проектов — ~/.claude/commands/

Вопросы о bootstrap

Как установить bootstrap в Claude Code?

Выполните последовательно команды /plugin marketplace add anthropics/financial-services, /plugin install claude-for-msft-365-install@claude-for-financial-services и используйте .claude/commands/bootstrap.md.

Что делает bootstrap?

Команда задаёт endpoint для передачи динамических параметров и конфигураций в расширение, позволяя управлять серверами MCP и наборами скиллов для каждого пользователя.

Что нужно для работы bootstrap?

Необходим HTTPS-сервер с поддержкой CORS для https://pivot.claude.ai и, при использовании SSO, сервер для валидации JWT-токенов Entra.

Исходный текст

bootstrap.md · Apache-2.0
---
description: Build the bootstrap endpoint — per-user MCP servers, skills, dynamic config
---

# Bootstrap endpoint

You host an HTTPS GET handler. The add-in calls it at startup with the user's
Entra token, you return per-user JSON, the response overrides manifest and
extension attrs for that user. This is how you push structured config —
`mcp_servers`, `skills` — that flat string attrs can't carry.

## Ask first

Figure out which mode you're in before walking the spec:

- **Just want to understand it?** Answer from the sections below. Common
  questions: what's the response shape, how does `{{...}}` work, why is CORS
  biting me.
- **Building one?** Ask: new handler or editing an existing one? Lambda,
  Cloud Function, Express, Python, something else? Then jump to
  [Scaffolding](#scaffolding-a-handler) — the sections in between are the
  contract you're coding against.

## This vs extension attrs

Both deliver per-user config. Pick by what you're carrying.

| | [Extension attrs](update-user-attrs.md) | Bootstrap endpoint |
|---|---|---|
| You write | `az rest PATCH` per user | An HTTPS service |
| Carries | On Anthropic's app, only the eight keys listed there; flat strings, ≤256 chars | Any JSON — arrays, nested, base64 |
| Good for | Token rotation, region override | `mcp_servers`, `skills`, anything structured |
| Refresh | Token cache, ~1hr lag | `bootstrap_expires_at`, you control it |
| Auth | Entra token claims (passive) | You validate the JWT (active) |

If you only need to swap `gateway_token` per user, attrs are less work. The
moment you want a Linear MCP server for one team and a Jira one for another,
you're here.

## Template interpolation

`{{key}}` templates expand in one place only: the `url` and `headers` values
of an `mcp_servers` entry. The add-in substitutes against the **merged config
chain** — manifest params, then extension attrs, then this response, each layer
overriding the last. You don't echo a value back just so a template can see it;
if `gateway_token` is already in the manifest or an attr, or elsewhere in this
response, `{{gateway_token}}` resolves.

Every other value, `bootstrap_url` included, is used exactly as written, so a
`{{...}}` there stays literal. Tell users apart by the Entra token your endpoint
validates, not by a templated URL.

A `{{key}}` with no value (a typo, or a key never set anywhere) makes the add-in
skip that connector without showing an error, so if a connector is missing,
check its templates first.

## CORS — every URL needs it

The add-in is a browser. Every fetch — `bootstrap_url`, every
`mcp_servers[].url`, every `skills[].url` — happens browser-side from inside
the Office taskpane. Without `Access-Control-Allow-Origin:
https://pivot.claude.ai` on the response, the browser blocks it before the
add-in sees a byte. The server returns 200, the add-in gets nothing, and
nothing in the add-in's logs tells you why. This is the most common "it's not
working" cause.

| URL | Where CORS lives |
|---|---|
| `bootstrap_url` | Your handler's response headers. Behind API Gateway / Cloud Functions, also configure the `OPTIONS` preflight — the browser sends one before any request with custom headers. See the recommended preflight response below. |
| `mcp_servers[].url` | The MCP server itself. Public ones (Linear, Atlassian) already allow it. Internal ones almost certainly don't until you add it. |
| `skills[].url` | **The bucket, not the URL.** Presigned URLs auth the request — they don't grant CORS. S3 needs a bucket CORS config, GCS needs `gsutil cors set`, Azure needs blob service CORS rules. |
| `otlp_endpoint` | Your OTEL collector's HTTP receiver. Most collectors default to same-origin only — set `cors.allowed_origins` on the OTLP/HTTP receiver. |

For `bootstrap_url`, the recommended preflight response is:

```
Access-Control-Allow-Origin:  https://pivot.claude.ai
Access-Control-Allow-Methods: GET
Access-Control-Allow-Headers: Authorization, X-Claude-User-Agent, *
```

Allowing `*` for request headers is safe here — security comes from the Entra
token, not header filtering — and keeps preflights working if the add-in adds
headers in future. Keep `Allow-Origin` pinned to `https://pivot.claude.ai`.

The presigned-URL one bites hardest because `curl` works (curl ignores CORS),
the signature is valid, the object exists, and the skill still doesn't load.
Set bucket CORS once:

```json
// S3 — aws s3api put-bucket-cors --bucket <name> --cors-configuration file://cors.json
{ "CORSRules": [{ "AllowedOrigins": ["https://pivot.claude.ai"], "AllowedMethods": ["GET"], "AllowedHeaders": ["*"] }] }
```

```bash
# GCS — gsutil cors set cors.json gs://<bucket>
[{"origin": ["https://pivot.claude.ai"], "method": ["GET"], "responseHeader": ["*"]}]
```

```bash
# Azure — az storage cors add --services b --methods GET --origins https://pivot.claude.ai --allowed-headers '*' --account-name <name>
```

If you're debugging a CORS failure: open the browser devtools inside the
taskpane (right-click → Inspect on Windows, or attach via Safari's Develop
menu on Mac), look for the request in the Network tab. A CORS block shows as
a failed request with no response body and a console error naming the origin.

## Request

```
GET <bootstrap_url>                            # exactly as configured
Authorization: Bearer <entra_token>            # only if entra_sso=1 in manifest
X-Claude-User-Agent: claude-<app>/<version>    # always sent
```

`X-Claude-User-Agent` identifies which Office host the add-in is running in.
`<app>` is one of `word`, `excel`, or `powerpoint`; `<version>` is the add-in
build (e.g. `claude-excel/1.4.2`). Use it to return different skills or MCP
servers per Office product, or to gate the add-in to specific hosts for a user.

Without `entra_sso=1` there's no Authorization header — the request is
anonymous from the add-in's side. That's fine if the endpoint sits behind
network isolation, mTLS, or another auth layer the add-in doesn't see.

With `entra_sso=1`, validate the JWT before trusting it:

| Claim | Check |
|---|---|
| `aud` | `c2995f31-11e7-4882-b7a7-ef9def0a0266` — the add-in's default app ID, or your own app's GUID if you set `graph_client_id` in the [manifest](manifest.md#entra-sso). Anything else means the token wasn't minted for this. |
| `iss` | `https://login.microsoftonline.com/<YOUR_TENANT_ID>/v2.0` — your tenant. Reject other tenants. |
| `exp` | Not expired. Libraries handle this; don't hand-roll it. |
| `oid` | The user's stable object ID. This is your lookup key — email (`upn`/`preferred_username`) can change, `oid` doesn't. |

If you set `entra_scope` in the [manifest](manifest.md#entra-sso), the Bearer
is an **access token**, not an ID token. Validate `aud` = your API's
Application ID URI (`api://<guid>`, not the client GUID) and check `scp`
contains the scope(s) you defined — `scp` is a space-delimited list when
`entra_scope` names more than one. `iss`, `exp`, `oid`, and signature
verification are the same.

Signature verification needs Microsoft's JWKS
(`https://login.microsoftonline.com/<TENANT_ID>/discovery/v2.0/keys`). Use a
library — `jose` (Node), `PyJWT` + `cryptography` (Python), `Microsoft.IdentityModel.Tokens`
(.NET). Hand-rolled JWT verification is where security bugs live.

## Response

`200 OK`, `Content-Type: application/json`, CORS header per
[above](#cors--every-url-needs-it).

The body is a flat object. Every field is optional — return only what differs
for this user. Unknown keys are ignored, so you can add fields the current
add-in version doesn't read yet and they'll light up when it ships.

### Provider keys

Any of the cloud config keys from the [manifest](manifest.md#keys-by-cloud)
table — `gateway_url`, `gateway_token`, `aws_role_arn`, `gcp_region`, etc.
Same names, same meanings, just per-user.

If you return `gateway_api_format: "vertex"`, also return `gcp_project_id` and
`gcp_region` (or set them at a lower layer) — they're path segments in the
Vertex `:rawPredict` URL the add-in constructs. `"bedrock"` needs no extras.

### Telemetry

```json
"otlp_endpoint": "https://otel-collector.your-domain.com",
"otlp_headers": "Authorization=Bearer <collector-token>",
"otlp_resource_attributes": "team.name=platform,deployment.environment=prod"
```

`otlp_endpoint` is the base HTTPS URL of an OpenTelemetry collector you
operate; the add-in appends `/v1/traces` and posts OTLP/HTTP. `otlp_headers`
uses the standard `key1=value1,key2=value2` format.
`otlp_resource_attributes` uses the same format (matching the
standard `OTEL_RESOURCE_ATTRIBUTES` variable) and is merged into the
OpenTelemetry Resource on every span — use it when your collector requires
specific resource attributes for routing or attribution. The collector must
allow CORS from the add-in origin — see [above](#cors--every-url-needs-it).

### `inference_headers`

```json
"inference_headers": { "x-application-id": "app123" }
```

Extra HTTP headers attached to every request the add-in sends to your gateway
(`gateway_url`) — typically accounting tags the gateway uses for cost
allocation. Applies only to gateway deployments; direct cloud connections
ignore it. The add-in treats them as opaque pass-through; `Authorization`,
`x-api-key`,
`Content-Type`, `Host`, `Content-Length`, `User-Agent`, `Cookie`, and any
`anthropic-*` / `x-amz-*` / `x-goog-*` header are reserved and dropped.

### `mcp_servers`

Array of MCP servers the add-in connects to for this user.

```json
"mcp_servers": [
  { "url": "https://mcp.linear.app/sse", "label": "Linear" },
  {
    "url": "https://internal.yourcompany.com/mcp/risk",
    "label": "Risk Dashboard",
    "headers": { "Authorization": "Bearer {{gateway_token}}" }
  }
]
```

| Field | |
|---|---|
| `url` | MCP server endpoint. Interpolated. |
| `label` | Display name in the add-in UI. |
| `headers` | Optional. Sent on every request to that server. Values interpolated — this is how you thread a per-user token through without the endpoint ever seeing it. |

### `skills`

Array of skills loaded for this user. Each is either inlined as base64 or
fetched from a URL — set one or the other.

```json
"skills": [
  {
    "name": "deal-memo",
    "description": "Draft a deal memo from a term sheet",
    "url": "https://yourbucket.s3.amazonaws.com/skills/deal-memo.zip?X-Amz-..."
  },
  {
    "name": "compliance-check",
    "content": "IyBDb21wbGlhbmNlIGNoZWNrCgpSZXZpZXcgdGhlIGRvY3VtZW50IGZvci4uLg=="
  }
]
```

| Field | |
|---|---|
| `name` | Skill identifier. |
| `description` | Optional. Shown in the skill picker. |
| `content` | Base64 bytes. Either a zip (full skill bundle with `SKILL.md` + assets) or the raw `SKILL.md` text — the add-in sniffs which on decode. |
| `url` | Presigned URL (S3, GCS, Azure SAS). Bare GET, no auth headers added — bake auth into the signature. Response body sniffed the same way as `content`. |

Inline `content` is simplest for small text-only skills. Use `url` once
you're shipping zips with images or the base64 starts bloating the response.

### `disabled_features`

JSON array of feature slugs to lock for this user. Same vocabulary as the
[manifest key](manifest.md#disabled-features) — bootstrap is the per-user
layer. It replaces the manifest's list for that user rather than adding to it,
so repeat any org-wide slugs.

```json
"disabled_features": ["skills.authoring"]
```

### `available_models`

Model-picker override for this user — same semantics and entry forms as the
[manifest key](manifest.md#available_models). A JSON array of ids and/or
`{id, label}` objects; because it is an override, list every model the user
should keep.

```json
"available_models": [{ "id": "claude-opus-4-8", "label": "Opus 4.8" }, "claude-sonnet-5"]
```

### `access_policies`

Native JSON array of allow/deny statements — the per-user layer of the
[manifest key](manifest.md#access_policies); build the array with
[access-policies](access-policies.md). It replaces the manifest's array for
that user rather than adding to it, so repeat any org-wide statements. Pass it
as a real array, not a string:

```json
"access_policies": [
  { "effect": "deny", "action": "addin.access",
    "resource": { "type": "open_file",
      "identifiers": [{ "type": "mip_label_guid", "equals": "<guid>" }] } }
]
```

### `bootstrap_expires_at`

Epoch timestamp (seconds or milliseconds — auto-detected) for when this
config goes stale. The add-in re-fetches before expiry. Omit and the config
lives until the taskpane reloads.

Set this when you're vending short-lived tokens. Don't set it as a
keepalive — if nothing in the response expires, the refetch is wasted.

## Scaffolding a handler

A runnable Python/FastAPI reference with RBAC for `skills` and `mcp_servers`
lives at [`examples/python-bootstrap/`](../examples/python-bootstrap/) — point
them there if they want something to copy.

When they want one built, write it for them. The contract above is what
you're coding against. Get these right:

**JWT validation is the security boundary.** Verify signature against
Microsoft's JWKS, check `aud` and `iss` exactly, pull `oid` for the user
lookup. A handler that skips this and trusts `preferred_username` from an
unverified token is an open endpoint with extra steps.

**CORS on every URL you return,** not just the handler — see the
[CORS section](#cors--every-url-needs-it). Easy to ship a working handler that
returns presigned skill URLs from a bucket with no CORS config, and the skills
never load.

**User lookup is their business logic.** Leave a clear `// TODO: look up
config for oid` where the real work goes — DynamoDB, Postgres, a YAML file,
whatever they have. Don't guess; ask what their source of truth is.

**Return sparse.** Only the keys that differ from manifest defaults. An empty
`{}` is a valid response — means "this user gets the org-wide config."

Ask before writing: Lambda + API Gateway, Cloud Function, plain Express,
something else? And where does per-user config live — inline in the handler
(fine for a pilot), or read from a store?

© Anthropic · Apache-2.0 · anthropics/financial-services

Похожие слэш-команды

Все слэш-команды по теме «Настройка агента: память, контекст, субагенты» →

Сначала — bootstrap от других авторов.

bootstrap официальный Vercel Labs Команда bootstrap пошагово подготавливает репозиторий с сервисами Vercel: проверяет авторизацию CLI, подключает Neon, создаёт AUTH_SECRET и запускает проект. CX Codex GP ChatGPT +1 ★ 8 052звёзд репо dotnet-api-security wshaddix Скилл dotnet-api-security для Claude Code, Codex, Cursor и других платформ, который берёт на себя реализацию аутентификации и авторизации в ASP.NET Core. CX Codex +1 169установок extension-core-infrastructure caffeinelabs Скилл extension-core-infrastructure для Claude Code предоставляет базовую инфраструктуру для React-приложений Caffeine AI: подключение к бэкенду, аутентификацию через Internet Identity и точку входа приложения. CX Codex +1 32 200установок cloudflare-app-bootstrap cloudflare Скилл cloudflare-app-bootstrap для Claude Code связывает привязки, секреты и начальные данные Cloudflare Workers для проверки локальных запросов. CX Codex +1 8 000установок connecting-lambda-to-api-gateway aws Скилл connecting-lambda-to-api-gateway проводит агента по шагам подключения существующей Lambda к Amazon API Gateway: ресурсы, методы, прокси-интеграция, права и деплой. CX Codex +1 7 400установок cors-cross-origin-misconfiguration yaklang Скилл cors-cross-origin-misconfiguration помогает тестировать ошибки CORS и проверять доверие к заголовкам Origin при передаче учётных данных. Пригодится при аудите API и поиске проблем с кэшированием. CX Codex +1 4 100установок vapi-bootstrap-framework vapi Скилл vapi-bootstrap-framework для быстрого создания голосовых агентов Vapi из черновика. Генерирует полный проект на Bun + TypeScript с регистром сценариев, стеками языков и bootstrap-скриптом — нужны только ROUGH_DRAFT.md, Bun и API-ключ. CX Codex +1 314установок

Из того же набора116

Весь набор →
export-data Команда export-data для Claude Code копирует локальную историю чатов, скиллы и настройки надстройки перед пересборкой машины. CX Codex +1 ★ 41 441звёзд репо entra-app Команда entra-app для Claude Code описывает регистрацию приложения Microsoft Entra в собственном тенанте. Она помогает настроить вход для Outlook, шлюза, Foundry или sovereign cloud. CX Codex +1 ★ 41 441звёзд репо debug Команда debug для Claude Code, диагностирующая ошибки развёртывания надстроек Excel, Word и PowerPoint. Применяется при сбоях подключения, неверных конфигурациях и отсутствии надстройки в приложении. CX Codex +1 ★ 41 441звёзд репо consent Команда consent для Claude Code подготавливает согласие администратора Azure для Entra SSO и доступа Outlook к Microsoft Graph. Администратор арендатора открывает ссылку и подтверждает разрешения. CX Codex +1 ★ 41 441звёзд репо access-policies Помогает собрать конфигурацию access_policies в формате IAM. Администратор настраивает правила доступа надстройки к файлам с метками конфиденциальности. CX Codex +1 ★ 41 441звёзд репо verify Скилл verify для Claude Code проверяет административные скрипты и команды для пакета claude-for-msft-365-install в изолированном каталоге. Запускается при проверке изменений в скриптах управления. CX Codex +1 ★ 41 441звёзд репо claude-for-msft-365-install Плагин claude-for-msft-365-install для Claude Code настраивает доступ надстройки Claude для Microsoft 365 к облачной модели. Он создаёт манифест надстройки и помогает пройти согласие администратора Azure. ★ 41 441звёзд репо sp-global Подключает финансовую аналитику S&P Global к рабочим процессам ИИ. Помогает генерировать отчёты, сводки сделок и прогнозы отчётности на основе данных Capital IQ. ★ 41 441звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой