Skip to content

docs: correct the MCP setup instructions in working-with-ai - #6216

Merged
cixzhang merged 4 commits into
meta:mainfrom
kyu-rong:docs/mcp-setup-instructions
Oct 16, 2026
Merged

cixzhang merged 4 commits into
meta:mainfrom
kyu-rong:docs/mcp-setup-instructions

Conversation

@kyu-rong

@kyu-rong kyu-rong commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The MCP Server section of the working-with-ai guide documents a config snippet that no MCP client accepts. It uses "type": "url", which is not a transport type, presents one block as valid for every tool when the shape differs per client, and names claude_desktop_config.json as the place to add a remote server, which is not how Claude Desktop connects to one.

The failure is silent. Claude Code parses the entry, does not recognise the type, and skips the server with a warning rather than an error — so a reader believes Astryx is connected and only notices that the tools never appear.

This reaches two surfaces, since apps/docsite generates its docs registry from the same source: astryx docs working-with-ai, and the guide published on the docsite. The MCP server itself is healthy, so this is docs-only.

Reproduction

  1. npx @astryxdesign/[email protected] docs working-with-ai — the MCP Server section
    prints the snippet.
  2. Save it as .mcp.json in any project.
  3. claude mcp list.

Same file, same directory, only type changed:

.mcp.json entry claude mcp list
"type": "url" (as documented) Skipped — unknown MCP server type "url"
url, no type Skipped — add "type": "http" (or "sse" / "ws")
"type": "http" xds: https://astryx.atmeta.com/mcp (HTTP) - ✔ Connected

The endpoint is fine: initialize returns astryx 2.0.0 and tools/list returns search and get.

Why these values

Valid transport types are http (alias streamable-http), sse, ws, stdio (Claude Code). The MCP registry uses streamable-http and sse for remote entries (spec). Cursor's documented .cursor/mcp.json examples pass a bare url, and its schema types that field as enum: ['http', 'sse'], defaulting to http when a url is given (Cursor). No client defines url as a transport type.

claude_desktop_config.json holds stdio servers (local); Claude Desktop adds remote ones through Settings, then Connectors, then Add custom connector
(remote).

Changes

packages/cli/assets/docs/working-with-ai.doc.mjs, MCP Server section:

  • Split the single "same for all tools" block into per-client snippets.
  • Replace the claude_desktop_config.json sentence with the Connectors UI path.
  • Add the claude mcp add --transport http one-liner, which writes the JSON itself.
  • Add a changeset.

apps/docsite/src/generated/ is gitignored and rebuilt by pnpm generate, so no
generated file is committed here.

After

// Claude Code (.mcp.json), Windsurf, Cline
{ "mcpServers": { "xds": { "type": "http", "url": "https://astryx.atmeta.com/mcp" } } }
// Cursor (.cursor/mcp.json) — remote servers take no type field
{ "mcpServers": { "xds": { "url": "https://astryx.atmeta.com/mcp" } } }
claude mcp add --transport http xds https://astryx.atmeta.com/mcp

Claude Desktop: Settings → Connectors → Add custom connector.

Test Plan

  • npx @astryxdesign/cli docs working-with-ai renders the new section cleanly
  • pnpm lint:strict (covers check:changesets)
  • pnpm test, pnpm build
  • pnpm --filter @astryxdesign/docsite generate and confirm the guide page
    shows the new snippets
  • claude mcp add --transport http xds <url> writes the documented snippet

Notes

Cursor and Claude Desktop behaviour is taken from their official docs linked above, not reproduced locally. The Claude Code rows in the table were measured.

@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 16, 2026 6:45pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 10, 2026
@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Sep 10, 2026
@kyu-rong
kyu-rong marked this pull request as ready for review September 10, 2026 15:58
@astracat-bot

astracat-bot Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 16, 2026, 7:08 PM UTC

github-actions Bot added a commit that referenced this pull request Sep 10, 2026
@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

38 of 478 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 754,077
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,188
Chat Full AI Chat probe light 238,087
Chat Full AI Chat probe dark 237,060
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
Chat Default neutral dark 33,205
Chat Default neutral light 32,876
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232
ProgressBar With Target Mark probe dark 7,895
ProgressBar With Target Mark probe light 7,895
TableRowExpansion Detail Panel neutral dark 5,150
TableRowExpansion Detail Panel neutral light 4,068
SideNav Resizable in AppShell probe dark 3,846
SideNav Resizable in AppShell probe light 3,846

and 18 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The client-specific setup is improved, but the Cline example still uses type: "http". Cline's current parser schema requires type: "streamableHttp"; builders who copy this example get no Astryx tools even though the endpoint itself initializes and lists tools correctly.

Please use Cline's supported transport value and keep the other client-specific examples unchanged.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for splitting the MCP setup per client — replacing the invalid generic entry with a measured Claude Code setup and client-matched instructions for Cline, Cursor, and Claude Desktop is the right fix.

Two bounded issues remain before this is reliable to copy:

  • The Claude Code Bash example is not copy-safe in the CLI output. Rendered through astryx docs working-with-ai, the block starts with // Claude Code, equivalent to the JSON above because the CLI formatter emits every code-block label as a // comment regardless of language. A shell rejects that line (//: is a directory), and “the JSON above” points at the Cursor snippet that immediately precedes it, not Claude Code's. Dropping that block's label, or rendering Bash labels with #, fixes it.
  • Windsurf's setup shape is unvalidated. The first snippet groups Windsurf with Claude Code's { "type": "http", "url": … } object, but no Windsurf documentation or reproduction is provided for that exact shape — and this guide's own premise is that an unrecognized entry is skipped silently. Please either cite Windsurf-specific evidence for that shape or remove Windsurf from the label.

Everything else checks out: the JSON snippets parse, the changeset is valid, and the Cline correction is in place.

[Automated review]

@kyu-rong
kyu-rong force-pushed the docs/mcp-setup-instructions branch from 6478957 to c6a983e Compare September 29, 2026 04:45

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the per-client split — and for following through on the earlier feedback.

Both issues from the previous review are fixed in this revision:

  • The Claude Code terminal command no longer has a code-block label, so the CLI output no longer renders an invalid // … first line into the Bash block, and the command now sits directly after the Claude Code JSON it writes, with the same astryx server name used in every snippet.
  • Windsurf is removed from the guide rather than grouped with Claude Code's shape, so no unverified client setup is claimed.

The three JSON snippets parse, use a consistent server name and URL, Cline keeps its separate streamableHttp entry, and Cursor and Claude Desktop each keep their client-matched path. This looks ready to merge.

[Automated review]

# Conflicts:
#	packages/cli/assets/docs/working-with-ai.doc.mjs

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the per-client rewrite. There are no blocking issues: the Claude Code and Cline entries match what those clients' config parsers accept for this endpoint, and the new section comes through intact in both the CLI output and the generated docsite data. One optional accuracy fix before landing: claude mcp add saves to Claude Code's private local scope by default, not to .mcp.json. Add --scope project to the command, or reword "write that entry" to say where the entry is stored.

[Automated review]

Comment on lines +202 to +207
text: 'Claude Code can also write that entry from the terminal:',
},
{
type: 'code',
lang: 'bash',
code: `claude mcp add --transport http astryx https://astryx.atmeta.com/mcp`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: claude mcp add defaults to --scope local. That saves the server privately for this project in Claude Code's local config, not in the .mcp.json entry shown above. To write that entry:

claude mcp add --transport http --scope project astryx https://astryx.atmeta.com/mcp

Or reword this sentence to say the default saves the server privately for this project.

@cixzhang
cixzhang enabled auto-merge (squash) October 16, 2026 23:04
@github-actions github-actions Bot removed the needs:code-review High-risk change (new package/component/API) — needs human code review before merge label Oct 16, 2026
@cixzhang
cixzhang merged commit e3ba631 into meta:main Oct 16, 2026
49 checks passed

This branch was successfully deployed

1 active deployment
Preview — 88a9cff2 Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants