Skip to content

Commit 4672950

Browse files
committed
consolidate to single Cadence MCP — flow mcp (Flow CLI)
Per team confirmation that Peter Argue (Flow DX) ported Hao's MCP into the Flow CLI in onflow/flow-cli#2306 (merged 2026-04-03), the canonical Cadence MCP is now `flow mcp` — bundled with every Flow CLI install, zero extra dependencies. flow-ai-tools' install script registers it this way already. The /onflow/cadence-lang.org redesign PR was carrying a parallel `mcp-server/` (Hao's npm @outblock/cadence-mcp source). Two MCPs both registering as 'cadence-mcp' in Claude Code is a footgun. Consolidating to one canonical path. CHANGES: Docs — replace every '@outblock/cadence-mcp' install snippet with 'flow mcp' equivalent across: - content/docs/ai-tools/mcp-server.mdx — full rewrite around Flow CLI - content/docs/ai-tools/integrations/{claude,cursor,antigravity,opencode}.mdx - content/docs/ai-tools/integrations/index.mdx (table + intro) - content/docs/ai-tools/skills.mdx (Next steps; description re-counted) - content/docs/ai-tools/index.mdx - src/routes/index.tsx — homepage hero MCP card - README.md — install commands - AGENTS.md, CLAUDE.md — repo overview Source — remove duplicate implementation: - mcp-server/ (entire dir): 21 files, ~8200 lines deleted - .github/workflows/publish-mcp.yml — npm publish CI no longer needed Skill-count phrasing — replaced hardcoded '11 skills' / '11 Cadence + Flow skills' with 'full Cadence + Flow skill suite' / 'Flow's full skill suite' across all 8 affected files. The skill table in skills.mdx still documents every skill by name with its description — count-free wording. Follow-up issues to file post-merge: - Upstream Hao's 3 unique tools (cadence_security_scan, cadence_validate_args, doc-search trio) into onflow/flow-cli/internal/mcp - Deprecate @outblock/cadence-mcp on npm with redirect notice pointing at 'flow mcp' - Confirm Flow DX team owns flow mcp going forward (Peter Argue) Verified: types:check clean, build clean (96 sitemap URLs), zero '@Outblock' / '@outblock/cadence-mcp' / 'mcp-server/' source references remain in shipped content.
1 parent a3c0fc3 commit 4672950

41 files changed

Lines changed: 84 additions & 8362 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.

AGENTS.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Guidance for AI coding agents working in this repository. Loaded into agent cont
44

55
## Overview
66

7-
`cadence-lang.org` is the documentation and marketing site for the Cadence smart contract programming language (Flow network). Built with TanStack Start (file-based routing + Nitro SSR) + Fumadocs (MDX docs engine) + Tailwind CSS v4 + Bun. Deployed on Vercel. Includes a standalone MCP server (`mcp-server/`, published to npm as `@outblock/cadence-mcp`), AI chat (`/api/chat`), Orama-powered search, and `/llms.txt` + `/llms-full.txt` LLM-optimized endpoints.
7+
`cadence-lang.org` is the documentation and marketing site for the Cadence smart contract programming language (Flow network). Built with TanStack Start (file-based routing + Nitro SSR) + Fumadocs (MDX docs engine) + Tailwind CSS v4 + Bun. Deployed on Vercel. Includes AI chat (`/api/chat`), Orama-powered search (federated with onflow/docs via the `external/onflow-docs` submodule), and `/llms.txt` + `/llms-full.txt` LLM-optimized endpoints. The Cadence MCP server is built into the Flow CLI as `flow mcp` ([source](https://github.com/onflow/flow-cli/tree/master/internal/mcp)), not bundled in this repo.
88

99
## Build and Test Commands
1010

@@ -17,16 +17,9 @@ Bun ≥ 1.0 required. Node ≥ 22 (Vercel uses 24.x).
1717
- `bun run types:check``fumadocs-mdx && tsc --noEmit`. May report errors against the `external/onflow-docs` submodule's own files; those are out-of-scope for this repo.
1818
- `git submodule update --init --recursive` — populate `external/onflow-docs` (required before search index can include onflow-docs content)
1919

20-
MCP server (separate workspace at `mcp-server/`):
20+
The Cadence MCP server is bundled with the Flow CLI as `flow mcp` (Flow CLI ≥ v2.16.0). Source at [onflow/flow-cli/internal/mcp](https://github.com/onflow/flow-cli/tree/master/internal/mcp); maintained by Flow DX. Not bundled in this repo.
2121

22-
- `cd mcp-server && bun install`
23-
- `bun test:unit` — unit tests only (no Flow CLI required)
24-
- `bun test:integration` — integration tests (requires Flow CLI installed)
25-
- `bun run build` — bundle for npm publish
26-
- `bun run start` — stdio MCP transport
27-
- `bun run start:http` — HTTP transport (Hono) on configurable port
28-
29-
CI: `.github/workflows/publish-mcp.yml` publishes `@outblock/cadence-mcp` to npm on tagged releases. No site-build CI in this repo — Vercel builds previews on every PR push.
22+
No site-build CI in this repo — Vercel builds previews on every PR push.
3023

3124
## Architecture
3225

@@ -53,7 +46,6 @@ CI: `.github/workflows/publish-mcp.yml` publishes `@outblock/cadence-mcp` to npm
5346
- `ai-tools/` — MCP server, skills, LLM endpoints, integration guides (claude/cursor/codex/gemini/antigravity/opencode)
5447
- top-level pages: anti-patterns, design-patterns, security-best-practices, solidity-to-cadence, testing-framework, contract-upgrades, json-cadence-spec, project-development-tips, measuring-time, why, index
5548
- `content/docs/**/meta.json` — fumadocs section / page ordering; replaces Docusaurus `_category_.json`
56-
- `mcp-server/` — standalone Bun workspace, published to npm
5749
- `external/onflow-docs` — git submodule of `onflow/docs`, indexed for cross-site search; **not** rendered in the docs nav
5850
- `public/` — static assets served at root: `robots.txt`, `assets/`, `fonts/`, etc.
5951
- `vercel.json` — URL redirects (legacy paths, type-page moves). Update here when restructuring URLs.
@@ -80,23 +72,22 @@ CI: `.github/workflows/publish-mcp.yml` publishes `@outblock/cadence-mcp` to npm
8072
- **`/api/chat`** — Anthropic streaming via `@ai-sdk/anthropic`. `ANTHROPIC_API_KEY` is server-only and never reaches the browser bundle.
8173
- **Search** — Orama index built from `content/docs/` + `external/onflow-docs/` content. Search panel at `src/components/search.tsx`, Cmd+/ hotkey, localStorage persistence.
8274
- **`/llms.txt`** / **`/llms-full.txt`** — TanStack server routes that emit LLM-optimized markdown summaries / corpus.
83-
- **MCP server** at `mcp-server/` — exposes `cadence_check`, `cadence_search`, `cadence_execute_script`, `cadence_validate_args`, `cadence_security_scan`, `get_contract_source`. Both stdio and HTTP transports.
75+
- **MCP server** `flow mcp` (Flow CLI built-in). Exposes `cadence_check`, `cadence_hover`, `cadence_definition`, `cadence_symbols`, `cadence_completion`, `get_contract_source`, `get_contract_code`, `cadence_execute_script`. stdio transport. Source: [onflow/flow-cli/internal/mcp](https://github.com/onflow/flow-cli/tree/master/internal/mcp).
8476

8577
## Conventions and Gotchas
8678

87-
- **Bun is the toolchain.** Don't introduce npm/yarn lock files — `bun.lock` is the source of truth. Top-level `package.json` and `mcp-server/package.json` are independent workspaces.
79+
- **Bun is the toolchain.** Don't introduce npm/yarn lock files — `bun.lock` is the source of truth.
8880
- **`NODE_OPTIONS=--max-old-space-size=8192`** is required for the build (baked into `package.json` script). The SSR `source-*.mjs` chunk grew past the 4GB default heap when the `external/onflow-docs` submodule was added.
8981
- **Submodule pinning matters.** `external/onflow-docs` is pinned to a specific commit (not branch-tracking). Bumping the pin is a semi-supply-chain action; review the diff before updating.
9082
- **Tailwind v4 has no config file.** Theme tokens are CSS variables in `src/styles/app.css`. Use `cn()` from `src/lib/cn.ts` for class merging (clsx + tailwind-merge).
9183
- **Dark mode uses the `dark` class on `<html>`** (Fumadocs convention).
9284
- **URL redirects belong in `vercel.json`**, not page frontmatter. When moving / renaming pages, add the redirect there.
9385
- **Don't edit `routeTree.gen.ts`, `.source/`, or `.vercel/output/`.** All auto-generated.
94-
- **Cadence MCP HTTP endpoint is currently hosted on Outblock's Railway** (`https://cadence-mcp.up.railway.app/mcp`). The integration guides reference this URL — coordinate with @onflow before changing.
9586
- **Licensing is split:** source under Apache 2.0 (`LICENSE.txt`), content under CC-BY-4.0 (`CC-BY-4.0.txt`); see `LICENSE.md`.
9687

9788
## Files Not to Modify
9889

99-
- `bun.lock`, `mcp-server/bun.lock`, `mcp-server/package-lock.json` — regenerated by `bun install`
90+
- `bun.lock` — regenerated by `bun install`
10091
- `.source/`, `.vercel/output/`, `node_modules/`, `build/` — build artifacts
10192
- `src/routeTree.gen.ts` — auto-generated by TanStack
10293
- `external/onflow-docs/` — submodule pointer; modify by bumping the pin in a deliberate commit

CLAUDE.md

Lines changed: 2 additions & 8 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,7 +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`)
4135
- `.source/` — Auto-generated by Fumadocs (do not edit)
4236

4337
### 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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ Quick index: https://cadence-lang.org/llms.txt
1818
Resources use `@` prefix and must be moved with `<-`. Use `access(all)` for public access (not `pub`). Capability-based access control with entitlements.
1919
```
2020

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 11 Cadence + Flow skills (see [Skills](../skills)).
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)).
2222

2323
## Add MCP server
2424

25-
Add the Cadence MCP server to your Antigravity configuration — runs locally via stdio:
25+
Add the Cadence MCP server to your Antigravity configuration — calls the Flow CLI's built-in `flow mcp` subcommand:
2626

2727
```json
2828
{
2929
"mcpServers": {
30-
"cadence": {
31-
"command": "npx",
32-
"args": ["-y", "@outblock/cadence-mcp"]
30+
"cadence-mcp": {
31+
"command": "flow",
32+
"args": ["mcp"]
3333
}
3434
}
3535
}
3636
```
3737

38-
This gives Antigravity access to all [MCP tools](../mcp-server)documentation search, code checking, type inspection, security scanning, and more. Requires the [Flow CLI](https://developers.flow.com/tools/flow-cli) installed locally for the LSP-based tools.
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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Configure Claude to work with Cadence via skills, MCP, or context injection.
88

99
### Install Flow's skill library
1010

11-
The official [onflow/flow-ai-tools](https://github.com/onflow/flow-ai-tools) marketplace ships 11 Cadence + Flow skills under one plugin:
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:
1212

1313
```bash
1414
/plugin marketplace add onflow/flow-ai-tools
@@ -20,10 +20,10 @@ See [Skills](../skills) for the full skill list.
2020
### Add MCP server
2121

2222
```bash
23-
claude mcp add cadence-mcp -- npx -y @outblock/cadence-mcp
23+
claude mcp add --scope user cadence-mcp -- flow mcp
2424
```
2525

26-
This runs the [Cadence MCP server](../mcp-server) locally via stdio — gives Claude Code access to documentation search, Cadence code checking, type inspection, security scanning, and more. Requires the [Flow CLI](https://developers.flow.com/tools/flow-cli) installed locally for the LSP-based tools.
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.
2727

2828
## Claude Desktop
2929

@@ -32,9 +32,9 @@ Add the Cadence MCP server to your `claude_desktop_config.json`:
3232
```json
3333
{
3434
"mcpServers": {
35-
"cadence": {
36-
"command": "npx",
37-
"args": ["-y", "@outblock/cadence-mcp"]
35+
"cadence-mcp": {
36+
"command": "flow",
37+
"args": ["mcp"]
3838
}
3939
}
4040
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Key conventions:
2222
- Use capability-based access control with entitlements
2323
```
2424

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 11 Cadence + Flow skills (see [Skills](../skills)).
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)).
2626

2727
## Context injection
2828

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,14 @@ Full Cadence reference: https://cadence-lang.org/llms-full.txt
2424
Quick index: https://cadence-lang.org/llms.txt
2525
```
2626

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 11 Cadence + Flow skills (see [Skills](../skills)).
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)).
2828

2929
## Add MCP server
3030

31-
[![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](cursor://anysphere.cursor-deeplink/mcp/install?name=cadence&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBvdXRibG9jay9jYWRlbmNlLW1jcCJdfQ==)
31+
In Cursor settings → MCP → Add new server:
3232

33-
Or manually add in Cursor settings:
34-
35-
- **Name**: `cadence`
33+
- **Name**: `cadence-mcp`
3634
- **Type**: `command`
37-
- **Command**: `npx -y @outblock/cadence-mcp`
35+
- **Command**: `flow mcp`
3836

39-
This runs the [Cadence MCP server](../mcp-server) locally via stdio — gives Cursor access to documentation search, Cadence code checking, type inspection, security scanning, and more. Requires the [Flow CLI](https://developers.flow.com/tools/flow-cli) installed locally for the LSP-based tools.
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Key conventions:
2424
- Use capability-based access control with entitlements
2525
```
2626

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 11 Cadence + Flow skills (see [Skills](../skills)).
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)).
2828

2929
## Gemini API
3030

0 commit comments

Comments
 (0)