Skip to content

Commit 85e7e76

Browse files
committed
Expand plugin: agent, slash commands, multi-peer, CLAUDE context, CI
- LICENSE file (Apache-2.0) - Drop brittle tool count from README; reference the peer's live tool set instead - Author set to "Convex Foundation and contributors" - Two MCP bindings: convex-testnet (public HF) and convex-local (localhost), each with its own URL/token env var - CLAUDE.md at plugin root injects Convex terminology (juice, copper, peer, lattice, CPoS, protonet) and British spelling - convex subagent preloaded with platform context and tool-selection guidance - /convex:faucet and /convex:explore slash commands for common flows - Troubleshooting section in README covering unreachable peers, MCP_TIMEOUT, 401/403, elevated ops - GitHub Actions workflow validating plugin.json, .mcp.json, and agent/command frontmatter - CHANGELOG with initial entries
1 parent 1f88ba5 commit 85e7e76

10 files changed

Lines changed: 506 additions & 33 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "convex",
3-
"description": "Convex peer integration for Claude Code. Exposes ~34 MCP tools covering queries, transactions, cryptography, account management, signing service and live state watches, plus guided prompts for common workflows.",
3+
"description": "Convex peer integration for Claude Code. Binds the peer's MCP endpoint so Claude can query the lattice, run transactions, manage accounts and keys, resolve CNS names, and watch on-chain state, plus use guided prompts for common workflows.",
44
"version": "0.1.0",
55
"author": {
6-
"name": "Convex Foundation",
6+
"name": "Convex Foundation and contributors",
77
"url": "https://convex.world"
88
},
99
"homepage": "https://convex.world",
1010
"repository": "https://github.com/Convex-Dev/convex-plugin",
1111
"license": "Apache-2.0",
12-
"keywords": ["convex", "blockchain", "lattice", "mcp", "cvm"]
12+
"keywords": ["convex", "lattice", "mcp", "cvm", "decentralised"]
1313
}

.github/workflows/validate.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Validate plugin
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
validate:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Validate JSON files parse
16+
run: |
17+
set -euo pipefail
18+
for f in .claude-plugin/plugin.json .mcp.json; do
19+
echo "Checking $f"
20+
python3 -c "import json, sys; json.load(open('$f'))"
21+
done
22+
23+
- name: Validate plugin.json required fields
24+
run: |
25+
python3 <<'PY'
26+
import json, sys
27+
with open('.claude-plugin/plugin.json') as f:
28+
m = json.load(f)
29+
missing = [k for k in ('name', 'description', 'version') if k not in m]
30+
if missing:
31+
print(f"Missing required fields: {missing}", file=sys.stderr)
32+
sys.exit(1)
33+
print("plugin.json OK:", m['name'], m['version'])
34+
PY
35+
36+
- name: Validate .mcp.json structure
37+
run: |
38+
python3 <<'PY'
39+
import json, sys
40+
with open('.mcp.json') as f:
41+
m = json.load(f)
42+
servers = m.get('mcpServers')
43+
if not isinstance(servers, dict) or not servers:
44+
print("mcpServers must be a non-empty object", file=sys.stderr)
45+
sys.exit(1)
46+
for name, cfg in servers.items():
47+
if cfg.get('type') not in ('http', 'streamable-http', 'sse', 'stdio'):
48+
print(f"{name}: unknown or missing type", file=sys.stderr)
49+
sys.exit(1)
50+
if cfg['type'] in ('http', 'streamable-http', 'sse') and 'url' not in cfg:
51+
print(f"{name}: missing url", file=sys.stderr)
52+
sys.exit(1)
53+
print("mcp.json OK:", ", ".join(servers))
54+
PY
55+
56+
- name: Validate agent and command frontmatter
57+
run: |
58+
python3 <<'PY'
59+
import os, sys, re
60+
errs = []
61+
for root in ('agents', 'commands'):
62+
if not os.path.isdir(root):
63+
continue
64+
for fn in os.listdir(root):
65+
if not fn.endswith('.md'):
66+
continue
67+
path = os.path.join(root, fn)
68+
with open(path) as f:
69+
text = f.read()
70+
m = re.match(r'^---\n(.*?)\n---\n', text, re.DOTALL)
71+
if not m:
72+
errs.append(f"{path}: missing frontmatter block")
73+
continue
74+
fm = m.group(1)
75+
if 'name:' not in fm or 'description:' not in fm:
76+
errs.append(f"{path}: frontmatter must include name and description")
77+
if errs:
78+
print("\n".join(errs), file=sys.stderr)
79+
sys.exit(1)
80+
print("frontmatter OK")
81+
PY

.mcp.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"mcpServers": {
3-
"convex": {
3+
"convex-testnet": {
44
"type": "http",
55
"url": "${CONVEX_PEER_URL:-https://mikera1337-convex-testnet.hf.space/mcp}",
66
"headers": {
77
"Authorization": "Bearer ${CONVEX_AUTH_TOKEN:-}"
88
}
9+
},
10+
"convex-local": {
11+
"type": "http",
12+
"url": "${CONVEX_LOCAL_URL:-http://localhost:8080/mcp}",
13+
"headers": {
14+
"Authorization": "Bearer ${CONVEX_LOCAL_AUTH_TOKEN:-}"
15+
}
916
}
1017
}
1118
}

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Changelog
2+
3+
All notable changes to this plugin will be documented here. Versions follow [semver](https://semver.org/).
4+
5+
## [Unreleased]
6+
7+
### Added
8+
9+
- Two MCP server bindings: `convex-testnet` (public HuggingFace testnet by default) and `convex-local` (localhost:8080 by default), both overridable via environment variables.
10+
- `convex` subagent preloaded with Convex platform context, terminology, and tool-selection guidance.
11+
- `/convex:faucet <address> [amount]` slash command for quick testnet funding.
12+
- `/convex:explore <address-or-cns-name>` slash command for account inspection.
13+
- Plugin-level `CLAUDE.md` injecting Convex terminology and conventions (juice not gas, copper, peer not miner, lattice not blockchain) so generated code stays consistent.
14+
- GitHub Actions workflow validating `plugin.json`, `.mcp.json`, and agent/command frontmatter on every push.
15+
- Troubleshooting section in README covering peer reachability, `MCP_TIMEOUT` tuning, auth errors, and elevated-operation browser confirmations.
16+
17+
## [0.1.0] — 2026-04-13
18+
19+
### Added
20+
21+
- Initial plugin scaffold targeting the Convex peer MCP endpoint (CAD041).

CLAUDE.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Convex Context for Claude
2+
3+
When using tools from the Convex plugin (anything namespaced `convex-testnet:*` or `convex-local:*`), keep the conventions below.
4+
5+
## Terminology
6+
7+
Use Convex terms, not blockchain analogues, in generated code, comments, and explanations.
8+
9+
| Use this | Not this |
10+
| ------------ | ------------------------------ |
11+
| CVM coin | CVX |
12+
| Juice | Gas, fees |
13+
| Copper | Wei, satoshi |
14+
| Peer | Miner, validator |
15+
| Actor | Smart contract |
16+
| Lattice | Blockchain, chain |
17+
| CPoS | Proof of Work, Proof of Stake |
18+
| Belief | Block |
19+
| Etch | _(core embedded database)_ |
20+
| CAD | Specification / whitepaper |
21+
| CNS | DNS, ENS |
22+
| Protonet | Mainnet |
23+
24+
`1 CVM = 1,000,000,000 copper`. Balances returned by `getBalance` are in copper; convert for display.
25+
26+
## Language
27+
28+
British English spelling throughout (decentralised, organisation, behaviour, colour).
29+
30+
## Architecture reminders
31+
32+
- Convex is **not** a blockchain. It uses CRDT-like convergent data structures and reaches consensus via Convergent Proof of Stake.
33+
- All core data is **immutable and content-addressable** (the `ACell` hierarchy in `convex-core`).
34+
- The CVM is a **lambda-calculus VM** running Convex Lisp. Transactions are pure functions that update state.
35+
- Finality is **millisecond-scale**; there is no mining.
36+
37+
## Tool selection hints
38+
39+
- **Queries are free.** Prefer `query` or `queryState` over `transact` when reading data.
40+
- **`transact` transmits the Ed25519 seed.** Only use against HTTPS peers. For production keys, client side signing is best. If not possible, prefer the signing-service tools (`signingTransact`, `signingSign`) which keep keys server-side.
41+
- **`prepare` + `submit`** is the two-step flow for external signing (hardware wallets, client-side keys).
42+
- **`transfer`** is a convenience for coin/token transfers — use it instead of hand-rolling `transact` with `(transfer ...)` source.
43+
- **`watchState`** uses SSE notifications; remember to `unwatchState` when done to free server-side resources.
44+
- **Elevated signing operations** (`signingImportKey`, `signingExportKey`, `signingDeleteKey`, `signingChangePassphrase`) require a two-step browser confirmation and will return a URL the user must open.
45+
46+
## Two servers are configured
47+
48+
- `convex-testnet` — defaults to the public HuggingFace testnet. Good for exploration and throwaway accounts.
49+
- `convex-local` — defaults to `http://localhost:8080/mcp`. Use when developing against a locally-run peer.
50+
51+
If both are active, be explicit about which you're targeting. Ask before transacting against the testnet.
52+
53+
## Resources
54+
55+
- [Convex docs](https://docs.convex.world)
56+
- [CAD041 (MCP)](https://docs.convex.world/docs/cad/041_mcp)
57+
- [Convex Lisp tutorial](https://docs.convex.world/docs/tutorial)

0 commit comments

Comments
 (0)