Skip to content

Commit 55f8d1d

Browse files
committed
consolidate Cadence MCP & Claude Code skills under onflow upstream
Two related tooling stories were tangled in the original PR — they're now consolidated to the canonical Flow Foundation paths. SKILLS — single Claude Code marketplace ------ Hao's redesign shipped an inline 'skills/cadence/SKILL.md' (single file, 873 lines) plus 'update-ai-files.yml' CI to keep it in sync. Meanwhile, onflow ships an official Claude Code plugin marketplace at [onflow/flow-ai-tools](https://github.com/onflow/flow-ai-tools) — bundles 'flow-dev' plugin with the full Cadence + Flow skill suite (cadence-lang, cadence-tokens, cadence-audit, cadence-scaffold, cadence-testing, flow-react-sdk, flow-project-setup, flow-cli, flow-dev-setup, flow-defi, flow-tokenomics — each with its own reference files). Inline skill is strictly subsumed. - skills/cadence/SKILL.md: DELETED - .github/workflows/update-ai-files.yml: DELETED (auto-sync CI obsolete) - content/docs/ai-tools/skills.mdx: rewritten around '/plugin marketplace add onflow/flow-ai-tools' install path. Skill table phrasing uses 'full Cadence + Flow skill suite' instead of hardcoded count (durable across upstream additions). MCP — single canonical install path (flow mcp) ------ Hao's redesign also shipped 'mcp-server/' as a TypeScript / Bun standalone package published to npm as '@outblock/cadence-mcp'. Meanwhile, Peter Argue (Flow DX) shipped a Go-native Cadence MCP server in [flow-cli #2306](onflow/flow-cli#2306), merged 2026-04-03 (one day after Hao's last npm publish) — inspired by Hao's PR #285 design but implemented from scratch in Go with no extra runtime dependencies. flow-ai-tools' install script ([scripts/install.sh L65–98](https://github.com/onflow/flow-ai-tools/blob/main/scripts/install.sh#L65)) already registers MCP via 'flow mcp', not Hao's npm package — i.e. anyone running the marketplace one-liner is already on the canonical path. Two MCPs both registering as 'cadence-mcp' in Claude Code is a footgun: same tool name, different binaries, surprising about which one served a response. Consolidating to one canonical install path. - mcp-server/: DELETED entirely (~7,000 lines, 21 files, ~330 tests) - .github/workflows/publish-mcp.yml: DELETED (npm publish CI obsolete) - content/docs/ai-tools/mcp-server.mdx: rewritten around 'flow mcp' (Flow CLI ≥ v2.16.0). Tool list updated to the 8 tools 'flow mcp' exposes (LSP-backed: cadence_check, cadence_hover, cadence_definition, cadence_symbols, cadence_completion + on-chain: get_contract_source, get_contract_code, cadence_execute_script). - content/docs/ai-tools/integrations/{antigravity,claude,cursor,opencode}.mdx: install snippets all reference 'claude mcp add --scope user cadence-mcp -- flow mcp' (or editor-equivalent). Cursor deeplink updated. - content/docs/ai-tools/integrations/index.mdx (NEW): per-editor matrix table summarizing project-context source / skills support / MCP support. Fixes broken '../integrations' link from skills.mdx (was 404 because fumadocs needs an index.mdx for directory routes). - content/docs/ai-tools/{,integrations/}meta.json: add '...' rest token so any future pages added to those dirs get auto-included. - content/docs/ai-tools/index.mdx: tweak MCP description to match new tool surface. - src/routes/index.tsx (homepage hero MCP card): replaces 'npx install-mcp @outblock/cadence-mcp --client $CLIENT' with the 'flow mcp' install command. Drops the now-superfluous client + mode selectors. (NOTE: src/routes/index.tsx homepage hero edit goes in the next commit with the rest of the index.tsx changes — bundled with a11y to keep one diff per file.) DOCS / META ------ - CLAUDE.md: removed 'skills/cadence/SKILL.md' line; removed 'mcp-server/' line. The MCP server now lives at onflow/flow-cli/internal/mcp. - README.md: 'AI Integration' section rewritten — Skills via flow-ai-tools marketplace, MCP via 'flow mcp'. Follow-up issues for the 3 unique tools Hao's mcp-server had that 'flow mcp' doesn't yet (cadence_security_scan, cadence_validate_args, doc-search trio): tracked at #307 for upstream contribution to onflow/flow-cli.
1 parent 89a0fc2 commit 55f8d1d

43 files changed

Lines changed: 190 additions & 9156 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish-mcp.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/update-ai-files.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

CLAUDE.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,10 @@ npm run dev # Dev server on port 3000
1313
npm run build # Production build + sitemap generation
1414
npm run start # Run built server (node .output/server/index.mjs)
1515
npm run types:check # TypeScript + MDX type checking (fumadocs-mdx && tsc --noEmit)
16-
17-
# MCP server (separate workspace in mcp-server/)
18-
cd mcp-server
19-
bun run build # Build
20-
bun test # All tests
21-
bun test:unit # Unit tests only
22-
bun test:integration # Integration tests (requires Flow CLI)
2316
```
2417

18+
The Cadence MCP server is bundled with the Flow CLI as `flow mcp` (Flow CLI ≥ v2.16.0); it lives at [onflow/flow-cli/internal/mcp](https://github.com/onflow/flow-cli/tree/master/internal/mcp), not in this repo.
19+
2520
## Architecture
2621

2722
### Framework Stack
@@ -37,8 +32,6 @@ bun test:integration # Integration tests (requires Flow CLI)
3732
- `src/components/` — React components; `ui/` has shadcn-style primitives
3833
- `src/lib/` — Utilities, Fumadocs source config, Cadence TextMate grammar
3934
- `content/docs/` — All MDX documentation files
40-
- `mcp-server/` — Standalone MCP server package (published to npm as `@outblock/cadence-mcp`)
41-
- `skills/cadence/SKILL.md` — Compact AI skill reference, auto-updated by CI
4235
- `.source/` — Auto-generated by Fumadocs (do not edit)
4336

4437
### Routing Patterns

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ Live at [cadence-lang.org](https://cadence-lang.org).
88

99
### Skills
1010

11-
Install the Cadence skill for your AI coding agent:
11+
Install Flow's Claude Code skill suite from the [`onflow/flow-ai-tools`](https://github.com/onflow/flow-ai-tools) marketplace. In Claude Code:
1212

13-
```sh
14-
npx skills add outblock/cadence-lang.org
13+
```bash
14+
/plugin marketplace add onflow/flow-ai-tools
15+
/plugin install flow-dev@flow-ai-tools
16+
/reload-plugins
1517
```
1618

1719
### MCP Server
1820

19-
Install the [Cadence MCP server](https://www.npmjs.com/package/@outblock/cadence-mcp) for AI-powered Cadence development — code checking, type info, and doc search:
21+
The Cadence MCP server is built into the [Flow CLI](https://developers.flow.com/tools/flow-cli) (≥ v2.16.0) as `flow mcp`. Source: [onflow/flow-cli/internal/mcp](https://github.com/onflow/flow-cli/tree/master/internal/mcp).
2022

2123
```sh
22-
npx install-mcp @outblock/cadence-mcp --client claude
24+
claude mcp add --scope user cadence-mcp -- flow mcp
2325
```
2426

25-
Supported clients: `claude`, `cursor`, `windsurf`, `copilot`, `vscode`
26-
2727
### LLM Context
2828

2929
| Endpoint | Description |

content/docs/ai-tools/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: AI Tools
55
Cadence is designed for AI-native development. Three integrations make Cadence documentation and language intelligence available to any AI agent:
66

77
- **[Skills](/docs/ai-tools/skills)** — inject Cadence knowledge into AI coding agents with one command
8-
- **[MCP Server](/docs/ai-tools/mcp-server)**give AI agents live access to documentation search and the Cadence language server
8+
- **[MCP Server](/docs/ai-tools/mcp-server)**`flow mcp` from the Flow CLI: gives AI agents type checking, symbol lookup, contract source fetching, and read-only on-chain script execution
99
- **[LLM Endpoints](/docs/ai-tools/llm-endpoints)** — plain-text documentation endpoints optimized for LLM context windows
1010

1111
## Agent integrations

content/docs/ai-tools/integrations/antigravity.mdx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,35 @@ title: Antigravity
44

55
Configure [Antigravity](https://antigravity.dev) to work with Cadence.
66

7-
## Install the Cadence skill
7+
## Add Cadence as project context
88

9-
```bash
10-
npx skills add outblock/cadence-lang.org
9+
Antigravity reads project-level context files automatically. Add a `CADENCE.md` (or merge into your existing `AGENTS.md`) pointing at the [`/llms-full.txt`](../llm-endpoints) endpoint so the model has the full reference loaded on startup:
10+
11+
```markdown
12+
## Cadence Development
13+
14+
This project uses Cadence, the smart contract language for the Flow blockchain.
15+
Full reference: https://cadence-lang.org/llms-full.txt
16+
Quick index: https://cadence-lang.org/llms.txt
17+
18+
Resources use `@` prefix and must be moved with `<-`. Use `access(all)` for public access (not `pub`). Capability-based access control with entitlements.
1119
```
1220

13-
Antigravity reads project-level context files automatically, so `SKILL.md` is picked up on startup.
21+
If you also use Claude Code, install the [flow-ai-tools](https://github.com/onflow/flow-ai-tools) marketplace there for richer skill coverage — it ships the full Cadence + Flow skill suite (see [Skills](../skills)).
1422

1523
## Add MCP server
1624

17-
Add the Cadence MCP server to your Antigravity configuration:
25+
Add the Cadence MCP server to your Antigravity configuration — calls the Flow CLI's built-in `flow mcp` subcommand:
1826

1927
```json
2028
{
2129
"mcpServers": {
22-
"cadence": {
23-
"command": "npx",
24-
"args": ["-y", "mcp-remote", "https://cadence-mcp.up.railway.app/mcp"]
30+
"cadence-mcp": {
31+
"command": "flow",
32+
"args": ["mcp"]
2533
}
2634
}
2735
}
2836
```
2937

30-
This gives Antigravity access to all [MCP tools](../mcp-server)documentation search, code checking, type inspection, and more.
38+
This gives Antigravity access to all [MCP tools](../mcp-server)Cadence code checking, type inspection, symbol lookup, contract source fetching, and read-only on-chain script execution. Requires [Flow CLI](https://developers.flow.com/tools/flow-cli) ≥ v2.16.0.

content/docs/ai-tools/integrations/claude.mdx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,24 @@ Configure Claude to work with Cadence via skills, MCP, or context injection.
66

77
## Claude Code
88

9-
### Install the Cadence skill
9+
### Install Flow's skill library
1010

11-
```bash
12-
npx skills add outblock/cadence-lang.org
13-
```
14-
15-
### Add MCP server
11+
The official [onflow/flow-ai-tools](https://github.com/onflow/flow-ai-tools) marketplace ships the full Cadence + Flow skill suite under one plugin:
1612

1713
```bash
18-
claude mcp add cadence-mcp -- npx -y mcp-remote https://cadence-mcp.up.railway.app/mcp
14+
/plugin marketplace add onflow/flow-ai-tools
15+
/plugin install flow-dev@flow-ai-tools
1916
```
2017

21-
Or use `install-mcp` for auto-configuration:
18+
See [Skills](../skills) for the full skill list.
19+
20+
### Add MCP server
2221

2322
```bash
24-
npx install-mcp @outblock/cadence-mcp --client claude-desktop
23+
claude mcp add --scope user cadence-mcp -- flow mcp
2524
```
2625

27-
This gives Claude Code access to all [MCP tools](../mcp-server)documentation search, code checking, type inspection, and more.
26+
This registers the [Cadence MCP server](../mcp-server)built into the Flow CLI as the `flow mcp` subcommand. Gives Claude Code access to Cadence code checking, type inspection, symbol lookup, contract source fetching, and read-only on-chain script execution. Requires [Flow CLI](https://developers.flow.com/tools/flow-cli) ≥ v2.16.0.
2827

2928
## Claude Desktop
3029

@@ -33,9 +32,9 @@ Add the Cadence MCP server to your `claude_desktop_config.json`:
3332
```json
3433
{
3534
"mcpServers": {
36-
"cadence": {
37-
"command": "npx",
38-
"args": ["-y", "mcp-remote", "https://cadence-mcp.up.railway.app/mcp"]
35+
"cadence-mcp": {
36+
"command": "flow",
37+
"args": ["mcp"]
3938
}
4039
}
4140
}

content/docs/ai-tools/integrations/codex.mdx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,26 @@ title: OpenAI Codex
44

55
Configure OpenAI Codex (the CLI agent) to work with Cadence.
66

7-
## Install the Cadence skill
7+
## Add Cadence to AGENTS.md
88

9-
```bash
10-
npx skills add outblock/cadence-lang.org
11-
```
12-
13-
Codex reads project-level context files, so `SKILL.md` is picked up automatically.
14-
15-
## Add instructions
16-
17-
Create or update your `AGENTS.md` file in the project root:
9+
Codex reads `AGENTS.md` from the project root automatically. Add a Cadence section that points it at the [`/llms-full.txt`](../llm-endpoints) endpoint:
1810

1911
```markdown
2012
## Cadence Development
2113

2214
This project uses Cadence, the smart contract language for the Flow blockchain.
23-
Refer to SKILL.md for the complete language reference.
15+
Full reference: https://cadence-lang.org/llms-full.txt
16+
Quick index: https://cadence-lang.org/llms.txt
2417

2518
Key conventions:
26-
- Use `access(all)` for public access, not `pub`
27-
- Resources use `@` prefix and must be moved with `<-`
19+
- Use `access(all)` for public access, not the deprecated `pub`
20+
- Resources use `@` prefix and must be moved with `<-` (never copied)
2821
- Always handle resources — they cannot be lost or copied
2922
- Use capability-based access control with entitlements
3023
```
3124

25+
If you also use Claude Code, install the [flow-ai-tools](https://github.com/onflow/flow-ai-tools) marketplace there for richer skill coverage — it ships the full Cadence + Flow skill suite (see [Skills](../skills)).
26+
3227
## Context injection
3328

3429
For direct API usage, inject the Cadence documentation into the system prompt:

content/docs/ai-tools/integrations/cursor.mdx

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,34 @@ title: Cursor
44

55
Configure Cursor to understand Cadence smart contracts.
66

7-
## Install the Cadence skill
7+
## Add Cadence as project context
88

9-
```bash
10-
npx skills add outblock/cadence-lang.org
11-
```
12-
13-
This adds a `SKILL.md` file to your project. Cursor reads it automatically as project context.
9+
Cursor reads `.cursor/rules/*.mdc` files automatically. Create `.cursor/rules/cadence.mdc` and point it at the [`/llms-full.txt`](../llm-endpoints) endpoint so the model has the full reference:
1410

15-
## Add project rules
11+
```mdc
12+
---
13+
description: Cadence smart contract development on Flow
14+
globs: *.cdc
15+
---
1616
17-
You can also create a `.cursor/rules` file to reinforce Cadence-specific behavior:
17+
When working with `.cdc` files, follow Cadence language conventions:
18+
- Use `access(all)` for public access (not the deprecated `pub`)
19+
- Resources use `@` prefix and must be moved with `<-` (never copied)
20+
- Always handle resources — they cannot be lost or copied
21+
- Use capability-based access control with entitlements
1822
19-
```
20-
When working with .cdc files, follow the Cadence language conventions.
21-
Refer to SKILL.md for the complete Cadence reference.
22-
Use resource-oriented patterns. Never copy resources — always move them with <-.
23+
Full Cadence reference: https://cadence-lang.org/llms-full.txt
24+
Quick index: https://cadence-lang.org/llms.txt
2325
```
2426

25-
## Add MCP server
27+
If you also use Claude Code, install the [flow-ai-tools](https://github.com/onflow/flow-ai-tools) marketplace there for richer skill coverage — it ships the full Cadence + Flow skill suite (see [Skills](../skills)).
2628

27-
[![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](cursor://anysphere.cursor-deeplink/mcp/install?name=cadence&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1jcC1yZW1vdGUiLCJodHRwczovL2NhZGVuY2UtbWNwLnVwLnJhaWx3YXkuYXBwL21jcCJdfQ==)
29+
## Add MCP server
2830

29-
Or manually add in Cursor settings:
31+
In Cursor settings → MCP → Add new server:
3032

31-
- **Name**: `cadence`
33+
- **Name**: `cadence-mcp`
3234
- **Type**: `command`
33-
- **Command**: `npx -y mcp-remote https://cadence-mcp.up.railway.app/mcp`
35+
- **Command**: `flow mcp`
3436

35-
This gives Cursor access to the Cadence [MCP tools](../mcp-server) for documentation search and code checking.
37+
This registers the [Cadence MCP server](../mcp-server) — built into the Flow CLI as the `flow mcp` subcommand. Gives Cursor access to Cadence code checking, type inspection, symbol lookup, contract source fetching, and read-only on-chain script execution. Requires [Flow CLI](https://developers.flow.com/tools/flow-cli) ≥ v2.16.0.

content/docs/ai-tools/integrations/gemini.mdx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,26 @@ Configure Google Gemini to work with Cadence.
66

77
## Gemini CLI
88

9-
### Install the Cadence skill
9+
### Add Cadence to GEMINI.md
1010

11-
```bash
12-
npx skills add outblock/cadence-lang.org
13-
```
14-
15-
Gemini CLI reads project context files, so `SKILL.md` is picked up automatically.
16-
17-
### Add instructions
18-
19-
Create a `GEMINI.md` file in your project root:
11+
Gemini CLI reads `GEMINI.md` from the project root automatically. Create or update it with a Cadence section that points at the [`/llms-full.txt`](../llm-endpoints) endpoint:
2012

2113
```markdown
2214
## Cadence Development
2315

2416
This project uses Cadence, the smart contract language for the Flow blockchain.
25-
Refer to SKILL.md for the complete language reference.
17+
Full reference: https://cadence-lang.org/llms-full.txt
18+
Quick index: https://cadence-lang.org/llms.txt
2619

2720
Key conventions:
28-
- Use `access(all)` for public access, not `pub`
29-
- Resources use `@` prefix and must be moved with `<-`
21+
- Use `access(all)` for public access, not the deprecated `pub`
22+
- Resources use `@` prefix and must be moved with `<-` (never copied)
3023
- Always handle resources — they cannot be lost or copied
3124
- Use capability-based access control with entitlements
3225
```
3326

27+
If you also use Claude Code, install the [flow-ai-tools](https://github.com/onflow/flow-ai-tools) marketplace there for richer skill coverage — it ships the full Cadence + Flow skill suite (see [Skills](../skills)).
28+
3429
## Gemini API
3530

3631
When using the Gemini API, inject Cadence context into the system instruction:

0 commit comments

Comments
 (0)