Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.0.2 — Unreleased

- Ship only the shared router and `coinbase-mcp` in the ChatGPT distribution. Omit `coinbase-mcp/references/x402.md`, because `/mcp/chatgpt` does not expose x402 tools, and give ChatGPT its own package README.
- Let a distribution omit selected skill files and drop source lines marked `<!-- omit: <distribution> -->`. Other distributions still copy skills unchanged, and links to unselected skills or omitted files fail the build.
- Remove x402 from the ChatGPT listing copy and keywords, and replace its starter prompt with three prompts for portfolio review, rebalancing, and scaling in with limit orders.
- Describe paid research in the `coinbase-mcp` skill description without naming x402.
- Bump every distribution to 0.0.2.

## 0.0.1 — Unreleased

- Add the `wallet-mcp` skill (moved from `base/skills`, with `Base MCP` renamed to `Wallet MCP` and the install command pointed at `coinbase/agents`) as source only at `skills/wallet-mcp/`. It is not added to the shared router, `COINBASE_SKILL_PRODUCTS`, or any generated distribution, and no MCP configuration changes.
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

1. Fork or create a feature branch. Use a conventional PR title, such as `feat(cursor): update plugin metadata`.
2. Keep the shared `skills/coinbase/SKILL.md` as a product router, not a capability guide. Use one skill per product at `skills/<product>/SKILL.md`, with no additional product container. Coinbase CLI and hosted Coinbase MCP live under `skills/coinbase-cli/` and `skills/coinbase-mcp/`, with skill names matching their directories. Each product skill owns setup, authentication, shared safety, capability routing, and disconnecting. Put detailed capability workflows and their product-specific commands or tool contracts in that skill's `references/<capability>.md`; link them from the product skill and retain links back to its safety/setup and companion guides. Do not split capabilities into independently registered skills or mix CLI/MCP execution in a guide. Keep all approvals, scope checks, precision, and uncertain-outcome safeguards when updating either product.
3. Keep one `skills/` source tree. Add new products to the product tables in the shared router and README, not lists of every capability. The builder always includes the shared router and explicitly selects product skills through `COINBASE_SKILL_PRODUCTS`. It copies complete skill directories unchanged into the package's matching `skills/` layout. Links to unselected skills fail the build. To ship another product, update the product selection and approved client/MCP configuration together and test the generated package. Do not duplicate skill names or maintain client-specific skill copies. Portable source manifests live under `src/plugins/portable/` and target the published Agent Plugins 1.0.0 schemas; use documented client extensions rather than component-path overrides or credentials.
3. Keep one `skills/` source tree. Add new products to the product tables in the shared router and README, not lists of every capability. The builder always includes the shared router and explicitly selects product skills through `COINBASE_SKILL_PRODUCTS`. It copies complete skill directories unchanged into the package's matching `skills/` layout, except that a distribution may omit listed skill files and drop source lines marked `<!-- omit: <distribution> -->` (today only ChatGPT, which omits the CLI router row and x402 guidance its endpoint does not expose). Keep omissions to whole files and whole lines, never rewrite text. Links to unselected skills or omitted files fail the build. To ship another product, update the product selection and approved client/MCP configuration together and test the generated package. Do not duplicate skill names or maintain client-specific skill copies. Portable source manifests live under `src/plugins/portable/` and target the published Agent Plugins 1.0.0 schemas; use documented client extensions rather than component-path overrides or credentials.
4. Maintain native source metadata under `src/plugins/`. Keep common metadata, package versions, and endpoint configuration consistent. Run `python3 scripts/build-distributions.py dist` and inspect the generated packages rather than treating the repository root as a plugin. Validate native loading where available, and verify OAuth with a portfolio read, never a financial write. Record checks not run.
ChatGPT directory metadata lives in `src/plugins/chatgpt/plugin.json`, and its MCP configuration in `src/plugins/chatgpt/mcp.json` targets `https://agents.coinbase.com/mcp/chatgpt`. Keep this endpoint, directory-only URLs, subtitle limits, and generated icon sizing isolated from the other distributions, which use `https://agents.coinbase.com/mcp`. Reuse the canonical skills and icon artwork; do not maintain separate skill copies.
ChatGPT directory metadata lives in `src/plugins/chatgpt/plugin.json`, and its MCP configuration in `src/plugins/chatgpt/mcp.json` targets `https://agents.coinbase.com/mcp/chatgpt`. The ChatGPT distribution selects only `coinbase-mcp` (`CHATGPT_SKILL_PRODUCTS`), omits the files in `CHATGPT_OMITTED_SKILL_FILES`, and uses `src/plugins/chatgpt/README.md`. Keep this endpoint, directory-only URLs, subtitle limits, skill selection, and generated icon sizing isolated from the other distributions, which use `https://agents.coinbase.com/mcp`. Reuse the canonical skills and icon artwork; do not maintain separate skill copies.
5. Use [signed commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits), update the README/changelog, and open a PR using the template. Obtain review before merging.

Before release, run `python3 scripts/build-distributions.py dist`. It validates portable identity, schema identifiers, the exact MCP endpoint, extension assets, filesystem containment, skill frontmatter, local links, native metadata, and version parity before creating archives and checksums. CI validates the source manifests against the vendored official schemas. Inspect each generated layout and recheck tool names against current MCP contracts and CLI patterns against installed help/templates.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ Download versioned ZIP or tar archives from [Coinbase Agent Plugin downloads](ht

For local development, run `python3 scripts/build-distributions.py dist` and use the generated directories under `dist/site/packages/`. The repository root is not an installable plugin.

The existing distributions include three skills: the shared `coinbase` router, `coinbase-cli`, and `coinbase-mcp`. The builder copies the selected skill directories, including their `references/`, unchanged into the package's `skills/` directory and rejects links to unselected skills. Source and installed skill layouts match. Plugin names, `/coinbase:coinbase`, and installation paths are unchanged. Adding another product directory does not automatically ship it or configure its MCP server.
The portable, Claude Code, and Codex distributions include three skills: the shared `coinbase` router, `coinbase-cli`, and `coinbase-mcp`. The builder copies the selected skill directories, including their `references/`, unchanged into the package's `skills/` directory and rejects links to unselected skills. The ChatGPT distribution is the one exception (see below). Source and installed skill layouts match. Plugin names, `/coinbase:coinbase`, and installation paths are unchanged. Adding another product directory does not automatically ship it or configure its MCP server.

### ChatGPT directory submission

Use `coinbase-chatgpt-vX.Y.Z.zip` for the [OpenAI submission flow](https://developers.openai.com/plugins/deploy/submission). Its manifest and MCP configuration live under `src/plugins/chatgpt/`; it reuses the canonical skills and icon artwork without changing the portable, Claude Code, or Codex distributions. ChatGPT connects to `https://agents.coinbase.com/mcp/chatgpt` using OAuth; the other distributions retain `https://agents.coinbase.com/mcp`.
Use `coinbase-chatgpt-vX.Y.Z.zip` for the [OpenAI submission flow](https://developers.openai.com/plugins/deploy/submission). Its manifest and MCP configuration live under `src/plugins/chatgpt/`; it reuses the canonical icon artwork and ships only the shared router and `coinbase-mcp`, without the x402 guide, because `/mcp/chatgpt` exposes neither CLI nor x402 tools. Source lines marked `<!-- omit: chatgpt -->` are dropped from this package only; the portable, Claude Code, and Codex distributions are unchanged. ChatGPT connects to `https://agents.coinbase.com/mcp/chatgpt` using OAuth; the other distributions retain `https://agents.coinbase.com/mcp`.

This package is not a published or approved listing. Publisher/domain verification, approved OAuth access, scans, reviewer access, test cases, and a demo recording must be completed separately. OpenAI's directory covers ChatGPT and Codex; its [plugin guidelines](https://developers.openai.com/plugins/plugin-guidelines) prohibit execution of money/crypto transfers and investment trades, and currently restrict commerce to physical goods. The shared skills still describe trading, transfers, and paid research; resolve those capability and policy conflicts before submission. A separate manifest does not restrict the tools exposed by the MCP server.
This package is not a published or approved listing. Publisher/domain verification, approved OAuth access, scans, reviewer access, test cases, and a demo recording must be completed separately. OpenAI's directory covers ChatGPT and Codex; its [plugin guidelines](https://developers.openai.com/plugins/plugin-guidelines) prohibit execution of money/crypto transfers and investment trades, and currently restrict commerce to physical goods. Trading on `/mcp/chatgpt` requires a Coinbase confirmation card for each order; the shared skills still describe portfolio transfers, which that endpoint does not expose. A separate manifest does not restrict the tools exposed by the MCP server.

### Install locally

Expand Down
89 changes: 77 additions & 12 deletions scripts/build-distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

ROOT = Path(__file__).resolve().parents[1]
COINBASE_SKILL_PRODUCTS = ("coinbase-cli", "coinbase-mcp")
CHATGPT_SKILL_PRODUCTS = ("coinbase-mcp",)
CHATGPT_OMITTED_SKILL_FILES = ("coinbase-mcp/references/x402.md",)
OMIT_MARKER = re.compile(r"<!--\s*omit:\s*([a-z0-9-]+(?:\s*,\s*[a-z0-9-]+)*)\s*-->")
EXPECTED_MCP_URL = "https://agents.coinbase.com/mcp"
EXPECTED_CHATGPT_MCP_URL = "https://agents.coinbase.com/mcp/chatgpt"
OUTPUT_MARKER = ".coinbase-agents-distributions"
Expand Down Expand Up @@ -76,8 +79,26 @@ def copy_tree(source: Path, target: Path) -> None:
shutil.copytree(source, target)


def distribution_text(text: str, distribution: str | None) -> str:
"""Drop lines marked `<!-- omit: <distribution> -->` for that distribution."""
if distribution is None:
return text
kept = []
for line in text.splitlines(keepends=True):
match = OMIT_MARKER.search(line)
if match and distribution in {
name.strip() for name in match.group(1).split(",")
}:
continue
kept.append(line)
return "".join(kept)


def copy_skills(
target: Path, products: tuple[str, ...] = COINBASE_SKILL_PRODUCTS
target: Path,
products: tuple[str, ...] = COINBASE_SKILL_PRODUCTS,
distribution: str | None = None,
omitted_files: tuple[str, ...] = (),
) -> None:
source_root = ROOT / "skills"
if source_root.is_symlink() or not products:
Expand All @@ -102,44 +123,88 @@ def copy_skills(
raise ValueError(f"invalid product skill directory: {source}")
selected[product] = source
selected_roots = tuple(source.resolve() for source in selected.values())
omitted = set()
for relative in omitted_files:
path = (source_root / relative).resolve()
if (
path.name == "SKILL.md"
or not path.is_file()
or not any(path.is_relative_to(root) for root in selected_roots)
):
raise ValueError(f"invalid omitted skill file: {relative}")
omitted.add(path)
for source in selected.values():
validate_selected_skill_links(source, selected_roots)
validate_selected_skill_links(source, selected_roots, distribution, omitted)
target.mkdir(parents=True)
for name, source in selected.items():
copy_tree(source, target / name)
if distribution is None:
continue
for path in source.rglob("*"):
packaged = target / name / path.relative_to(source)
if path.resolve() in omitted:
packaged.unlink()
elif path.suffix == ".md":
text = path.read_text()
rendered = distribution_text(text, distribution)
if rendered != text:
packaged.write_text(rendered)


def validate_selected_skill_links(
source: Path, selected_roots: tuple[Path, ...]
source: Path,
selected_roots: tuple[Path, ...],
distribution: str | None = None,
omitted: set[Path] = frozenset(),
) -> None:
for document in source.rglob("*.md"):
for raw in re.findall(r"\]\(([^)]+)\)", document.read_text()):
if document.resolve() in omitted:
continue
text = distribution_text(document.read_text(), distribution)
for raw in re.findall(r"\]\(([^)]+)\)", text):
path = raw.split("#", 1)[0]
if not path or "://" in path or path.startswith("mailto:"):
continue
resolved = (document.parent / path).resolve()
if not any(resolved.is_relative_to(root) for root in selected_roots):
raise ValueError(f"link outside selected skills: {document} -> {raw}")
if resolved in omitted:
raise ValueError(f"link to omitted skill file: {document} -> {raw}")


def copy_common(target: Path) -> None:
def copy_common(target: Path, manifest_dir: str | None = None) -> None:
copy_file(ROOT / "LICENSE", target / "LICENSE")
copy_file(ROOT / "src/plugins/README.md", target / "README.md")


def build_portable(target: Path, manifest_dir: str = "portable") -> None:
readme = ROOT / f"src/plugins/{manifest_dir}/README.md" if manifest_dir else None
if readme is None or not readme.exists():
readme = ROOT / "src/plugins/README.md"
copy_file(readme, target / "README.md")


def build_portable(
target: Path,
manifest_dir: str = "portable",
products: tuple[str, ...] = COINBASE_SKILL_PRODUCTS,
distribution: str | None = None,
omitted_files: tuple[str, ...] = (),
) -> None:
target.mkdir(parents=True)
copy_file(ROOT / f"src/plugins/{manifest_dir}/plugin.json", target / "plugin.json")
copy_file(ROOT / f"src/plugins/{manifest_dir}/mcp.json", target / "mcp.json")
copy_skills(target / "skills")
copy_skills(target / "skills", products, distribution, omitted_files)
asset_dir = target / "com.openai/assets"
asset_dir.mkdir(parents=True)
copy_file(ROOT / "assets/coinbase.svg", asset_dir / "coinbase.svg")
copy_common(target)
copy_common(target, manifest_dir)


def build_chatgpt(target: Path) -> None:
build_portable(target, "chatgpt")
build_portable(
target,
"chatgpt",
products=CHATGPT_SKILL_PRODUCTS,
distribution="chatgpt",
omitted_files=CHATGPT_OMITTED_SKILL_FILES,
)
icon_path = target / "com.openai/assets/coinbase.svg"
ET.register_namespace("", "http://www.w3.org/2000/svg")
icon = ET.parse(
Expand Down
4 changes: 2 additions & 2 deletions skills/coinbase-mcp/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: coinbase-mcp
description: Connect hosted Coinbase MCP through native OAuth, verify access, and route remote tool workflows for portfolios, market data, trading, conversions, futures, equities, and x402 research. Use for MCP authentication and disconnecting; no CLI or shell setup is needed.
description: Connect hosted Coinbase MCP through native OAuth, verify access, and route remote tool workflows for portfolios, market data, trading, conversions, futures, equities, and paid research where the server exposes it. Use for MCP authentication and disconnecting; no CLI or shell setup is needed.
---

# Coinbase MCP
Expand Down Expand Up @@ -50,7 +50,7 @@ Read the applicable guide before planning or executing a workflow; setup alone d
| [Conversions](references/convert.md) | Quote, approve, and execute currency conversions |
| [Equities](references/equities.md) | Eligible stocks, sessions, and whole-share constraints; also read Trading |
| [Futures](references/futures.md) | Eligible CFM dated futures and margin risk; also read Trading |
| [x402 research](references/x402.md) | Discover and pay for curated research within an approved budget |
| [x402 research](references/x402.md) | Discover and pay for curated research within an approved budget <!-- omit: chatgpt --> |

## Monitoring limits

Expand Down
2 changes: 1 addition & 1 deletion skills/coinbase/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Choose the Coinbase product that matches the user's request and approved environ

| Product | Use for | Entry skill |
| --- | --- | --- |
| Coinbase CLI | Local command-line workflows with CDP API-key credentials and approved shell access, including bounded monitoring | [coinbase-cli](../coinbase-cli/SKILL.md) |
| Coinbase CLI | Local command-line workflows with CDP API-key credentials and approved shell access, including bounded monitoring | [coinbase-cli](../coinbase-cli/SKILL.md) <!-- omit: chatgpt --> |
| Coinbase MCP | Hosted tools through native OAuth, without CLI installation or shell access | [coinbase-mcp](../coinbase-mcp/SKILL.md) |

1. Honor the user's named product and intended funds. Otherwise choose an already approved and configured product that supports the task and intended scope. If none is configured, explain the options and ask before setup. If more than one product could fit and the choice or funds are ambiguous, ask before acting.
Expand Down
9 changes: 9 additions & 0 deletions src/plugins/chatgpt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Coinbase for ChatGPT

Coinbase workflows for ChatGPT through the hosted Coinbase MCP server.

Start with the `coinbase` skill, then load `coinbase-mcp` for setup, shared safety, and capability routing. Read the linked capability guides before planning or executing; keep the skill's `references/` directory intact because those files contain the detailed workflows and execution contracts. Hosted Coinbase MCP uses client-managed OAuth.

Installation and authentication do not authorize financial actions. Each trade or conversion is confirmed in a Coinbase confirmation card before it executes.

Source and release documentation: https://github.com/coinbase/agents
Loading
Loading