Skip to content

docs: MCP vs CLI feature comparison (#20)#26

Merged
let-sunny merged 3 commits intomainfrom
docs/mcp-vs-cli
Mar 24, 2026
Merged

docs: MCP vs CLI feature comparison (#20)#26
let-sunny merged 3 commits intomainfrom
docs/mcp-vs-cli

Conversation

@let-sunny
Copy link
Copy Markdown
Owner

@let-sunny let-sunny commented Mar 24, 2026

Summary

CLI와 MCP 경로 간 기능 차이점을 문서화.

주요 차이점

Feature CLI (FIGMA_TOKEN) MCP (Figma MCP)
Component master trees
Component metadata
Annotations (dev mode) ❌ private beta ✅ data-annotations
FIGMA_TOKEN required

변경 파일

  • CLAUDE.md — Architecture 섹션에 비교 테이블 + 사용 가이드 추가
  • src/mcp/server.ts — docs tool의 setup 문서에 비교 테이블 추가

Test plan

  • pnpm lint — clean
  • pnpm test:run — 302 tests passed

Closes #20

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive CLI vs MCP feature comparison table clarifying capabilities (node structure, styles, component metadata, master trees, annotations, screenshots, token requirements).
    • Added guidance mapping workflows to CLI (accurate/offline/CI analysis with token) versus MCP (quick checks and annotation-aware flows).
    • Clarified annotation availability (private beta) and that the MCP skill is Figma-MCP–specific.

Add feature comparison table to CLAUDE.md and MCP docs tool:
- Component masters: CLI only (componentDefinitions)
- Annotations: MCP only (data-annotations, REST API is private beta)
- Component metadata: CLI only
- Usage guidance: CLI for component analysis, MCP for quick checks

Closes #20

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 24, 2026

📝 Walkthrough

Walkthrough

Documentation was updated across multiple README/skill/docs files to add a new "CLI vs MCP Feature Comparison" and guidance on when to use each path. Changes clarify that CLI (with FIGMA_TOKEN) exposes component master trees and component metadata via componentDefinitions, while MCP lacks those and offers dev-mode annotations.

Changes

Cohort / File(s) Summary
Top-level docs
CLAUDE.md, README.md
Added a "CLI vs MCP (feature comparison)" section with a table comparing node structure, style values, component metadata, component master trees (componentDefinitions), annotations availability, screenshot support, and FIGMA_TOKEN requirement; added "When to use which" guidance mapping workflows to CLI vs MCP.
MCP server docs
src/mcp/server.ts
Appended the inline docs "setup" topic with the CLI vs MCP comparison table and guidance, and clarified that REST API annotations are private beta (not available via CLI docs).
CLAUDE skill docs
.claude/skills/canicode/SKILL.md
Clarified that the skill covers the Figma MCP path only, added the same feature-comparison table and usage guidance recommending CLI+FIGMA_TOKEN for component-master analysis and MCP for annotation-aware quick checks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰
I hopped through docs with tidy paws,
Drew tables, notes, and helpful laws.
"Use CLI for masters, MCP for speed"—
A carrot-coded guide for every need. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change—adding MCP vs CLI feature comparison documentation—matching the pull request's primary objective.
Linked Issues check ✅ Passed The pull request fully addresses all coding-related objectives from issue #20: comparison tables added to CLAUDE.md, README.md, .claude/skills/canicode/SKILL.md, and src/mcp/server.ts; guidance provided to direct users to CLI for accurate component analysis and MCP for quick checks.
Out of Scope Changes check ✅ Passed All changes are directly scoped to documentation updates comparing CLI and MCP features; no code logic or runtime behavior modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/mcp-vs-cli

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CLAUDE.md`:
- Around line 67-83: The "Annotations (dev mode)" row in the CLAUDE.md feature
table uses "Private beta" while src/mcp/server.ts uses "private beta"; update
the CLAUDE.md entry to use "private beta" (lowercase) so the wording is
consistent across the codebase—locate the table row containing "Annotations (dev
mode)" and replace "Private beta" with "private beta".

In `@src/mcp/server.ts`:
- Around line 284-295: Update the capitalization in the MCP vs CLI table: change
the lowercase phrase "private beta" in the table row for "Annotations (dev
mode)" to "Private beta" so it matches the capitalization used in CLAUDE.md;
locate the string in src/mcp/server.ts inside the CLI vs MCP table text and
replace only that token to preserve surrounding formatting and punctuation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 840640e9-dbc7-47fc-9051-462273c4613b

📥 Commits

Reviewing files that changed from the base of the PR and between 129644d and 7d94948.

📒 Files selected for processing (2)
  • CLAUDE.md
  • src/mcp/server.ts

Comment on lines +284 to +295
\`\`\`

## CLI vs MCP

| Feature | CLI (FIGMA_TOKEN) | MCP (Figma MCP) |
|---------|:-:|:-:|
| Component master trees | ✅ | ❌ |
| Component metadata | ✅ | ❌ |
| Annotations (dev mode) | ❌ private beta | ✅ data-annotations |
| FIGMA_TOKEN required | ✅ | ❌ |

Use CLI for accurate component analysis. Use MCP for quick checks and annotation-aware workflows.`,
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.

🧹 Nitpick | 🔵 Trivial

CLI vs MCP comparison added to setup documentation.

The inline comparison table provides focused, context-relevant guidance for MCP users. The subset of rows (4 vs 7 in CLAUDE.md) appropriately highlights component-related differences critical for choosing between CLI and MCP workflows.

Minor: Inconsistent capitalization with CLAUDE.md.

Line 292 uses lowercase "private beta" while CLAUDE.md line 75 uses "Private beta" (capitalized). Consider standardizing the capitalization across both files for consistency.

✍️ Suggested capitalization fix
-| Annotations (dev mode) | ❌ private beta | ✅ data-annotations |
+| Annotations (dev mode) | ❌ Private beta | ✅ data-annotations |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
\`\`\`
## CLI vs MCP
| Feature | CLI (FIGMA_TOKEN) | MCP (Figma MCP) |
|---------|:-:|:-:|
| Component master trees | | |
| Component metadata | | |
| Annotations (dev mode) | private beta | data-annotations |
| FIGMA_TOKEN required | | |
Use CLI for accurate component analysis. Use MCP for quick checks and annotation-aware workflows.`,
``
## CLI vs MCP
| Feature | CLI (FIGMA_TOKEN) | MCP (Figma MCP) |
|---------|:-:|:-:|
| Component master trees | | |
| Component metadata | | |
| Annotations (dev mode) | Private beta | data-annotations |
| FIGMA_TOKEN required | | |
Use CLI for accurate component analysis. Use MCP for quick checks and annotation-aware workflows.`,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/mcp/server.ts` around lines 284 - 295, Update the capitalization in the
MCP vs CLI table: change the lowercase phrase "private beta" in the table row
for "Annotations (dev mode)" to "Private beta" so it matches the capitalization
used in CLAUDE.md; locate the string in src/mcp/server.ts inside the CLI vs MCP
table text and replace only that token to preserve surrounding formatting and
punctuation.

- Align Annotations row wording to lowercase private beta in CLAUDE.md
- Add CLI vs MCP feature table to README (issue #20 scope)
- Add CLI vs skill comparison table to canicode SKILL.md
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/skills/canicode/SKILL.md:
- Line 46: The guidance wording in SKILL.md ("reliable component-master
analysis") is inconsistent with README.md and CLAUDE.md ("accurate component
analysis"); update the sentence that currently reads 'Use **CLI + token** when
the user needs reliable component-master analysis. Use **this skill** for fast
checks and workflows that rely on dev annotations.' to use the same phrase
"accurate component analysis" (or explicitly document the deliberate distinction
if intentional) so the docs are consistent; verify and, if intentional, add a
short note explaining the difference.
- Around line 37-44: Add a new "Screenshots" row to the feature comparison table
in SKILL.md so it matches README/CLAUDE.md; insert a table row reading "|
Screenshots | ✅ via API | ✅ `get_screenshot` |" into the existing markdown table
(keep the pipe-aligned format and the header separator row intact) and ensure
the `get_screenshot` cell uses backticks like other code items.

In `@CLAUDE.md`:
- Line 80: Replace or clarify the internal term "Stage 4 style override" in the
phrase "Accurate component analysis (Stage 4 style override, missing-component)"
by either removing "Stage 4" and changing it to "Accurate component analysis
(style overrides, missing-component)" or adding a brief parenthetical
explanation after "Stage 4" that explains its meaning; update the string
containing "Stage 4 style override" accordingly so external readers see the
simplified "style overrides" wording or an inline clarification.

In `@README.md`:
- Line 87: Split the single guidance sentence under the "When to use which:"
header into a short bulleted list for readability; replace the long inline
sentence with three bullets referencing the existing options: "CLI with
FIGMA_TOKEN" for accurate component analysis (style overrides, missing-component
rules), "MCP" for quick structure/style checks or annotation-aware flows, and
"CLI with saved fixtures (`save-fixture`)" for offline/CI use so each use case
is easy to scan.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3279c224-274e-4e7c-87b7-2653ff708087

📥 Commits

Reviewing files that changed from the base of the PR and between 7d94948 and 56cb4f7.

📒 Files selected for processing (3)
  • .claude/skills/canicode/SKILL.md
  • CLAUDE.md
  • README.md

Comment on lines +37 to +44
| Feature | CLI (REST API) | This skill (Figma MCP) |
|---------|:-:|:-:|
| Node structure | ✅ Full tree | ✅ XML metadata |
| Style values | ✅ Raw Figma JSON | ✅ React+Tailwind from design context |
| Component metadata (name, desc) | ✅ | ❌ |
| Component master trees | ✅ `componentDefinitions` | ❌ |
| Annotations (dev mode) | ❌ private beta | ✅ `data-annotations` in code |
| FIGMA_TOKEN | Required for live API | Not required when Figma MCP is connected |
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the Screenshots row presence across all comparison tables

echo "=== README.md Screenshots row ==="
rg -n "Screenshots" README.md

echo -e "\n=== SKILL.md Screenshots row ==="
rg -n "Screenshots" .claude/skills/canicode/SKILL.md

echo -e "\n=== CLAUDE.md Screenshots row ==="
rg -n "Screenshots" CLAUDE.md

Repository: let-sunny/canicode

Length of output: 268


Add the missing Screenshots row to the feature comparison table.

The feature comparison table in SKILL.md is missing the Screenshots row that appears in README.md and CLAUDE.md. Since the skill includes get_screenshot functionality, add the row for consistency:

| Screenshots | ✅ via API |`get_screenshot` |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/canicode/SKILL.md around lines 37 - 44, Add a new
"Screenshots" row to the feature comparison table in SKILL.md so it matches
README/CLAUDE.md; insert a table row reading "| Screenshots | ✅ via API | ✅
`get_screenshot` |" into the existing markdown table (keep the pipe-aligned
format and the header separator row intact) and ensure the `get_screenshot` cell
uses backticks like other code items.

| Annotations (dev mode) | ❌ private beta | ✅ `data-annotations` in code |
| FIGMA_TOKEN | Required for live API | Not required when Figma MCP is connected |

Use **CLI + token** when the user needs reliable component-master analysis. Use **this skill** for fast checks and workflows that rely on dev annotations.
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.

🧹 Nitpick | 🔵 Trivial

Consider aligning the guidance wording with README.md for consistency.

The usage guidance here says "reliable component-master analysis" while README.md (line 87) and CLAUDE.md (line 80) say "accurate component analysis". The terms are similar but not identical.

For consistency across documentation surfaces, consider using the same wording. If the subtle difference is intentional to fit the skill context better, that's fine—just verify it's a deliberate choice.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/canicode/SKILL.md at line 46, The guidance wording in
SKILL.md ("reliable component-master analysis") is inconsistent with README.md
and CLAUDE.md ("accurate component analysis"); update the sentence that
currently reads 'Use **CLI + token** when the user needs reliable
component-master analysis. Use **this skill** for fast checks and workflows that
rely on dev annotations.' to use the same phrase "accurate component analysis"
(or explicitly document the deliberate distinction if intentional) so the docs
are consistent; verify and, if intentional, add a short note explaining the
difference.

CLAUDE.md Outdated
| FIGMA_TOKEN required | ✅ | ❌ |

**When to use which:**
- Accurate component analysis (Stage 4 style override, missing-component) → **CLI with FIGMA_TOKEN**
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.

🧹 Nitpick | 🔵 Trivial

Clarify or remove internal terminology "Stage 4".

The guidance mentions "Stage 4 style override" which appears to be internal terminology that may not be clear to external users or contributors. This term doesn't appear elsewhere in the document.

Consider either:

  1. Removing "Stage 4" and simplifying to: "Accurate component analysis (style overrides, missing-component)"
  2. Adding a brief parenthetical explanation if "Stage 4" has specific meaning users should understand
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` at line 80, Replace or clarify the internal term "Stage 4 style
override" in the phrase "Accurate component analysis (Stage 4 style override,
missing-component)" by either removing "Stage 4" and changing it to "Accurate
component analysis (style overrides, missing-component)" or adding a brief
parenthetical explanation after "Stage 4" that explains its meaning; update the
string containing "Stage 4 style override" accordingly so external readers see
the simplified "style overrides" wording or an inline clarification.

README.md Outdated
| Screenshots | ✅ via API | ✅ `get_screenshot` |
| FIGMA_TOKEN required | ✅ | ❌ |

**When to use which:** accurate component analysis (e.g. style overrides, missing-component rules) → **CLI with FIGMA_TOKEN**. Quick structure/style checks or annotation-aware flows → **MCP**. Offline/CI → **CLI with saved fixtures** (`save-fixture`).
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.

🧹 Nitpick | 🔵 Trivial

Consider splitting the guidance sentence for better readability.

The "When to use which" guidance packs three distinct use cases into a single sentence. Consider reformatting as a bulleted list for easier scanning:

**When to use which:**
- Accurate component analysis (e.g. style overrides, missing-component rules) → **CLI with FIGMA_TOKEN**
- Quick structure/style checks or annotation-aware flows → **MCP**
- Offline/CI → **CLI with saved fixtures** (`save-fixture`)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 87, Split the single guidance sentence under the "When to
use which:" header into a short bulleted list for readability; replace the long
inline sentence with three bullets referencing the existing options: "CLI with
FIGMA_TOKEN" for accurate component analysis (style overrides, missing-component
rules), "MCP" for quick structure/style checks or annotation-aware flows, and
"CLI with saved fixtures (`save-fixture`)" for offline/CI use so each use case
is easy to scan.

- Remove internal term "Stage 4" from CLAUDE.md guidance
- Add Screenshots row to SKILL.md comparison table
- Align wording "reliable" → "accurate component analysis" in SKILL.md
- Reformat README.md "When to use which" as bulleted list

Made-with: Cursor
@let-sunny let-sunny merged commit b77b433 into main Mar 24, 2026
2 checks passed
@let-sunny let-sunny deleted the docs/mcp-vs-cli branch March 24, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: MCP vs CLI 기능 차이점 문서 업데이트

1 participant