About S2 Docs
S2 Docs is an MCP server published by adobe in the Documentation category: design data, including design tokens, component schemas, and tooling for Spectrum, Adobe's design system. Conduid read 44 tools from its source: add_mode, authoring_session_cancel, authoring_session_commit, authoring_session_get, authoring_session_list, authoring_session_step_classification and 38 more. It is published to npm as @adobe/s2-docs-mcp and starts with npx.
The adobe/spectrum-design-data monorepo this package is published from has 161 stars and 37 forks, is licensed Apache-2.0, and its last commit was on 2 Dec 2026. The latest release is design-data-cli@0.54.0 (18 Nov 2026): Native CLI binary for design-data v0.54.0. It follows @adobe/spectrum-tokens@15.8.0 (18 Nov 2026), and the 5 most recent releases go back to @adobe/spectrum-design-data@3.21.0 (18 Nov 2026). It passes all 4 static checks Conduid ran on the repository. Its topics include design-system and design-tokens.
Install
claude mcp add s2-docs -- npx -y @adobe/s2-docs-mcpnpx -y @adobe/s2-docs-mcpgit clone https://github.com/adobe/spectrum-design-dataTools (44)
add_modeAppend a new mode to an existing mode-set file.| Parameter | Type | Description |
|---|---|---|
| make_default | boolean | Make this the default mode. |
| mode * | string | Name of the new mode to add. |
| mode_set_file * | string | Path to the mode-set JSON file. |
authoring_session_cancelCancel a session and delete its on-disk file.| Parameter | Type | Description |
|---|---|---|
| session_id * | string |
authoring_session_commitBuild and write the token to disk as a cascade array element, then remove the session. Requires schema_url (the JSON Schema URL for the token type) and target (the *.tokens.json cascade file to write into).| Parameter | Type | Description |
|---|---|---|
| is_override | boolean | True when this token overrides an existing foundation/platform token. |
| product_context | string | Path to product-context.json for rationale capture. |
| rationale | string | Why this token is being created. |
| schema_path | string | Path to schemas directory containing token-types/ and token-file.json. Defaults to the @adobe/design-data-spec schemas when omitted. |
| schema_url * | string | The $schema URL for the token type, e.g. https://opensource.adobe.com/spectrum-design-data/schemas/token-types/color.json |
| session_id * | string | |
| target * | string | Target *.tokens.json cascade file to write into (created if absent, upserted if present). |
authoring_session_getGet the current state of an authoring session.| Parameter | Type | Description |
|---|---|---|
| session_id * | string |
authoring_session_listList all active authoring sessions.authoring_session_step_classificationSet the layer, property, and name-object fields for the token. name_fields is an array of {key, value} objects. Classification is validated against the active fields catalog.| Parameter | Type | Description |
|---|---|---|
| layer * | string | Token layer. |
| name_fields | array | Additional name-object fields beyond property. |
| property * | string | Token property, e.g. 'background-color'. |
| session_id * | string |
authoring_session_step_intentUpdate the intent for a session and get ranked existing-token suggestions. Returns suggestions and can_alias (true when a high-confidence match exists).| Parameter | Type | Description |
|---|---|---|
| intent * | string | Natural-language description of what the token is for, e.g. 'accent background color'. |
| session_id * | string |
authoring_session_step_valuesSet the value rows for the token. Each row specifies mode conditions and either a literal value or an alias target. Most tokens need one row with empty mode_combo.| Parameter | Type | Description |
|---|---|---|
| rows * | array | Value rows. Each: { mode_combo: [[key,val],...], kind: 'Literal'|'Alias', alias_target: string, literal: string } |
| session_id * | string |
create_mode_setAuthor a new mode-set file for a new cascade dimension. The file must not already exist. default must be a member of modes.| Parameter | Type | Description |
|---|---|---|
| default * | string | Default mode — must be a member of modes. |
| description | string | Human-readable description embedded in the file. |
| mode_set_file * | string | Destination path for the new mode-set JSON file (must not exist). |
| modes * | array | Ordered list of mode names, e.g. ['light', 'dark']. |
| name * | string | Logical name used as the key in token name objects, e.g. 'colorScheme'. |
data_createCreate a new non-token data object (component, field, registry entry, mode-set, or guideline). Validates the JSON document against the category schema before writing. Fails if the file already exists — use data_edit to overwrite.| Parameter | Type | Description |
|---|---|---|
| category * | string | Data category to create in. |
| dataset | string | Path to the dataset root (packages/design-data). Defaults to DESIGN_DATA_PATH minus /tokens. |
| document * | object | Full JSON document to write. Must include the category's required fields (e.g. `name`, `$schema`, `specVersion`). The filename is derived from the `name` field. |
| spec_schemas | string | Path to the design-data-spec schemas dir. Defaults to DESIGN_DATA_SPEC_SCHEMAS or auto-probed. |
data_editReplace an existing non-token data object with a new JSON document. Validates the document against the category schema before writing. Fails if the file does not exist — use data_create to create it. Edit is a full document replace, not a patch.| Parameter | Type | Description |
|---|---|---|
| category * | string | Data category to edit in. |
| dataset | string | Path to the dataset root (packages/design-data). Defaults to DESIGN_DATA_PATH minus /tokens. |
| document * | object | Full replacement JSON document. The `name` field must match the existing file. |
| spec_schemas | string | Path to the design-data-spec schemas dir. Defaults to DESIGN_DATA_SPEC_SCHEMAS or auto-probed. |
deprecate_tokenStamp a deprecation marker onto a cascade token. Optionally record a replacement UUID and a planned-removal spec version.| Parameter | Type | Description |
|---|---|---|
| deprecated_comment | string | Human-readable deprecation explanation / migration guidance. |
| planned_removal | string | Spec version at which the token will be removed. |
| rationale | string | Why the token was deprecated. |
| replaced_by | string | Replacement token UUID (string) or JSON array of UUIDs. |
| schema_path | string | Schemas directory for validation. |
| spec_version * | string | Dataset specVersion string to stamp into the deprecated value, e.g. '1.0.0'. |
| target * | string | Path to the *.tokens.json cascade file containing the token. |
| uuid * | string | UUID of the token to deprecate. |
describe_componentReturn the JSON schema and token relationships (bindings) for a design system component by its ID.| Parameter | Type | Description |
|---|---|---|
| id * | string | Component ID, e.g. button |
describe_guidelineReturn the full documentBlocks content and metadata for a Spectrum design guideline by its slug ID — the read-back counterpart to data_create/data_edit for the guidelines category. Guideline IDs are kebab-case, e.g. colors, motion, typography-fundamentals.| Parameter | Type | Description |
|---|---|---|
| id * | string | Guideline ID (kebab-case slug), e.g. colors, motion |
diff_datasetsCompare two design data datasets and return a JSON diff of added, removed, and changed tokens.| Parameter | Type | Description |
|---|---|---|
| filter | string | Optional filter expression to narrow results |
| newPath * | string | Path to the new/updated dataset |
| oldPath * | string | Path to the old/baseline dataset |
edit_tokenMerge field updates into an already-committed cascade token, then re-validate. The token's uuid is always preserved and silently ignored if included in updates.| Parameter | Type | Description |
|---|---|---|
| rationale | string | Why the token changed. |
| schema_path | string | Schemas directory for validation (default: auto-resolved from target). |
| target * | string | Path to the *.tokens.json cascade file containing the token. |
| tokens_root | string | Root tokens directory — required when updates contains a $ref. |
| updates * | object | Fields to merge into the token object, e.g. { "value": "#ff0000" }. |
| uuid * | string | UUID of the token to edit. |
find-s2-component-by-use-caseFind S2 components by use case or design pattern| Parameter | Type | Description |
|---|---|---|
| useCase * | string | Use case or design pattern (e.g., "form input", "navigation", "feedback", "selection") |
get-component-schemaGet full JSON schema for one component.| Parameter | Type | Description |
|---|---|---|
| component * | string | Component name |
get-component-tokensGet tokens whose name contains a component (e.g. button, input).| Parameter | Type | Description |
|---|---|---|
| componentName * | string | Component name substring |
get-s2-componentGet documentation for a specific Spectrum 2 component| Parameter | Type | Description |
|---|---|---|
| category | string | Component category (optional, helps with lookup) |
| name * | string | Component name (e.g., "Button", "Action Button") or slug (e.g., "button", "action-button") |
get-s2-statsGet statistics about the Spectrum 2 component documentationget-token-detailsGet full token data by path (flat token name).| Parameter | Type | Description |
|---|---|---|
| category | string | Category to search in |
| tokenPath * | string | Token path/name |
list-componentsList all components (names and summary, no full schema).list-s2-componentsList all available Spectrum 2 components| Parameter | Type | Description |
|---|---|---|
| category | string | Filter by category (${getCategories().join(", ")}) |
list_guidelinesList available Spectrum design guidelines and their metadata. Optionally filter the catalog by category before calling describe_guideline.| Parameter | Type | Description |
|---|---|---|
| category | string | Optional guideline category, e.g. designing or implementing |
primerLoad the design data primer: full token taxonomy, resolved values, component list, and field definitions. Call this at the start of an agent session.query-tokensSearch Spectrum tokens by name, type, or category. Categories: color-aliases, color-component, color-palette, icons, layout, layout-component, semantic-color-palette, typography.| Parameter | Type | Description |
|---|---|---|
| category | string | Filter by category |
| limit | number | Max results (default: 50) |
| query | string | Filter by name, type, or description |
| type | string | Filter by token type |
query-tokens-by-valueFind tokens by direct or resolved value (follows aliases).| Parameter | Type | Description |
|---|---|---|
| exact | boolean | Exact match (default: true) |
| limit | number | Max results (default: 50) |
| value * | string | Value to match (e.g. 1px, #000) |
query_tokensQuery design tokens using a filter expression. Returns matching token entries; alias tokens add `value` (the token's own resolved value in its own mode), and `chain` with view=full.| Parameter | Type | Description |
|---|---|---|
| filter * | string | Filter expression, e.g. "property=background-color". Valid keys: property, component, variant, state, colorScheme, scale, contrast, uuid, $schema, tier (primitive, semantic or component), object, anatomy, colorRole. Results include purposeFields. Note: "component" is not currently populated on tokens — component=<id> always returns []; use describe_component instead. |
| view | any |
remove_modeRemove a mode from a mode-set file. Aborts if any token references that mode value or if the mode is the current default.| Parameter | Type | Description |
|---|---|---|
| mode * | string | Mode name to remove. |
| mode_set_file * | string | Path to the mode-set JSON file. |
| tokens_root * | string | Root tokens directory for reference guard. |
remove_mode_setDelete a mode-set file. Aborts if any token in the dataset references this dimension.| Parameter | Type | Description |
|---|---|---|
| mode_set_file * | string | Path to the mode-set JSON file to remove. |
| tokens_root * | string | Root tokens directory for reference guard. |
remove_tokenDelete a token from a cascade file. Aborts if any other token in the dataset holds a $ref pointing at this token's UUID.| Parameter | Type | Description |
|---|---|---|
| target * | string | Path to the *.tokens.json cascade file containing the token. |
| tokens_root * | string | Root tokens directory for inbound-reference guard. |
| uuid * | string | UUID of the token to remove. |
rename_modeRename a mode in a mode-set file and propagate the change to all token files under tokens_root that use that mode value.| Parameter | Type | Description |
|---|---|---|
| mode_set_file * | string | Path to the mode-set JSON file. |
| new * | string | Replacement mode name. |
| old * | string | Existing mode name to rename. |
| tokens_root * | string | Root tokens directory for propagation. |
rename_tokenAssign a new name object to a cascade token, preserving its UUID. Optionally set a replaced_by pointer on the token being renamed.| Parameter | Type | Description |
|---|---|---|
| new_name * | any | New name — either a JSON object ({"property":"…","component":"…"}) or a plain string. |
| rationale | string | Why the token was renamed. |
| replaced_by_target | string | UUID to set as the replaced_by pointer (for retiring the old name). |
| schema_path | string | Schemas directory for validation. |
| target * | string | Path to the *.tokens.json cascade file containing the token. |
| uuid * | string | UUID of the token to rename. |
resolve_tokenResolve a design token property to its final value for a given context. Use component, variant, state, or colorRole to disambiguate shared properties; inspect ambiguous and deprecated in the result.| Parameter | Type | Description |
|---|---|---|
| colorRole | string | Optional color role such as accent, negative, or positive. |
| colorScheme | string | Color scheme: light or dark |
| component | string | Optional component name-object field. It is sparsely populated; prefer variant, state, or colorRole when available. |
| contrast | string | Contrast: regular or high |
| excludeDeprecated | boolean | Exclude tokens with lifecycle.deprecatedIn from candidate resolution. |
| property * | string | Bare token property name (the name.property segment, e.g. "background-color", "corner-radius" — see primer().properties for the full list). Not a flattened legacyKey. |
| scale | string | Scale: desktop or mobile |
| state | string | Optional token state used to narrow shared properties (including array-valued state). |
| variant | string | Optional token variant used to narrow shared properties. |
rewire_aliasChange the $ref target on an alias token. The new ref target must resolve in the cascade. Rejects if the token is not an alias.| Parameter | Type | Description |
|---|---|---|
| new_ref * | string | New $ref value — must be a UUID that resolves in the cascade. |
| rationale | string | Why the alias target changed. |
| schema_path | string | Schemas directory for validation. |
| target * | string | Path to the *.tokens.json cascade file containing the token. |
| tokens_root * | string | Root tokens directory for ref-resolution verification. |
| uuid * | string | UUID of the alias token to rewire. |
search-components-by-featureFind components that have a property matching a name (e.g. size, disabled).| Parameter | Type | Description |
|---|---|---|
| feature * | string | Property name substring |
search-s2-docsSearch Spectrum 2 documentation by component name or content| Parameter | Type | Description |
|---|---|---|
| query * | string | Search query |
| searchContent | boolean | Search within component content (slower but more thorough) |
start_authoring_sessionStart a new token authoring session. Returns a session_id and the initial wizard state. The session persists across calls — use the returned session_id in subsequent steps.| Parameter | Type | Description |
|---|---|---|
| dataset_path | string | Path to the token dataset directory. Defaults to DESIGN_DATA_PATH. |
suggest_tokenSuggest Spectrum tokens matching a natural-language intent using Jaccard similarity scoring over token name segments, name-object fields, and description text. Returns matches ranked by confidence with token name, layer, value, and name object. Use when the user describes what they need rather than knowing the token name.| Parameter | Type | Description |
|---|---|---|
| intent * | string | Natural-language description of the design need, e.g. "primary CTA button background color" |
| limit | number | Maximum number of suggestions to return (default: 5) |
| view | any |
token_refinementsShow a token's semantic specificity (tier, then purpose-field count, derived from its name) and the same-property tokens that are narrower (add purpose fields) or broader (drop them). Each neighbor lists `fields` it adds or lacks and a `valueMatch`: "drop-in" (same value in every mode) or "consider" (differs; see `differingModes`). Specificity only orders tokens; check the added fields fit the use before swapping.| Parameter | Type | Description |
|---|---|---|
| limit | number | Maximum narrower and broader tokens, each (default: 10) |
| token * | string | Token name (e.g. neutral-content-color-hover), uuid or conceptId. The older field text, such as `property=corner-radius scaleIndex=500`, is also accepted. |
validate-component-propsValidate props against a component schema.| Parameter | Type | Description |
|---|---|---|
| component * | string | Component name |
| props * | object | Props to validate |
validate_usageValidate design token usage in a dataset. Runs Layer-1 JSON-Schema structural validation and Layer-2 relational rules. Returns a JSON report of violations and warnings.| Parameter | Type | Description |
|---|---|---|
| path | string | Path to dataset to validate (defaults to DESIGN_DATA_PATH) |
| schema_path | string | Path to schemas directory containing token-types/ and token-file.json. Defaults to the @adobe/design-data-spec schemas. Set DESIGN_DATA_SCHEMAS env var or pass explicitly for custom schema sets. |
| strict | boolean | Treat warnings as errors |
writeWrite agent-generated design context to the dataset (e.g. product-context.json). Returns a confirmation message.| Parameter | Type | Description |
|---|---|---|
| output | string | Output file path (defaults to product-context.json inside DESIGN_DATA_PATH) |
| rationale | string | Rationale or summary to embed in the written file |
Security checks
From the adobe/spectrum-design-data monorepo, not this package alone.
- ✓README presentThe repository's README runs to about 563 words.
- ✓License declaredThe repository declares the Apache-2.0 license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
2 checks have not been run yet.
Releases
From the adobe/spectrum-design-data monorepo.
README
The repository's README runs to about 563 words, fetched 12 days ago. The original in the repository is authoritative.
Read full README