Skip to main content

AI Agent Integration

Juicebox provides comprehensive tooling for AI assistants and automated development workflows. This includes an MCP server for documentation access, Claude Code skills for protocol operations, and machine-readable data files.

Claude Code Skills

The fastest way to build on Juicebox with AI assistance is using our Claude Code skills plugin.

Install: Add to your Claude Code settings or clone github.com/mejango/juicebox-skills

Available Skills

Core Protocol

SkillDescription
/jb-projectCreate and configure Juicebox V5 projects
/jb-rulesetConfigure and queue rulesets with all parameters
/jb-queryQuery project state from the blockchain
/jb-decodeDecode and analyze transaction calldata
/jb-v5-apiAPI reference for all contract functions
/jb-v5-implDeep implementation knowledge and edge cases
/jb-docsSearch documentation via MCP server
/jb-v5-v51-contractsV5.0 vs V5.1 contract differences and migration

Hook Generation

SkillDescription
/jb-pay-hookGenerate custom pay hooks with Foundry tests
/jb-cash-out-hookGenerate custom cash out hooks with tests
/jb-split-hookGenerate custom split hooks with tests

UI Generation

SkillDescription
/jb-deploy-uiGenerate deploy frontends for projects and hooks
/jb-interact-uiGenerate interaction frontends (pay, cash out, claim)
/jb-explorer-uiEtherscan-like contract explorer for projects
/jb-event-explorer-uiBrowse and decode Juicebox project events
/jb-hook-deploy-uiDeploy custom hooks from browser
/jb-nft-gallery-uiInteractive gallery for 721 hook NFTs
/jb-omnichain-uiCross-chain UI for multi-chain projects
/jb-ruleset-timeline-uiVisual timeline of ruleset history

Data & APIs

SkillDescription
/jb-bendystrawGraphQL API for cross-chain project data
/jb-relayrMulti-chain transaction bundling API
/jb-fund-access-limitsQuery payout limits and surplus allowances
/jb-loan-queriesQuery loan data from Revloans

Specialized

SkillDescription
/jb-permit2-metadataEncode Permit2 metadata for gasless ERC20 payments
/jb-cash-out-curveCash out redemption curve calculations
/jb-multi-currencyMulti-currency terminal support
/jb-simplifyChecklist to simplify project designs
/jb-patternsCommon integration patterns
/jb-suckersCross-chain token bridging with Suckers
/jb-terminal-selectionTerminal selection logic
/jb-terminal-wrapperTerminal wrapper patterns
/jb-v5-currency-typesCurrency type reference
/jbx-fee-flowsJBX fee flow analysis
/jb-revloansRevloans borrowing functionality
/jb-protocol-feesProtocol fee structures and UI integration
/jb-omnichain-payout-limitsPer-chain payout limit constraints for omnichain projects

Revnet

SkillDescription
/revnet-economicsRevnet economic modeling and analysis
/revnet-modelerRevnet simulation and projections

Skill Details

Core Protocol Skills

/jb-project - Creates complete deployment scripts for Juicebox V5 projects including ruleset configuration, terminal setup, split configurations, metadata, and multi-chain deployment with suckers.

/jb-ruleset - Designs and queues ruleset changes including duration, weight, decay, approval hooks, and metadata flags.

/jb-query - Queries live project state (configurations, rulesets, balances, token holders, splits) using cast or ethers.js.

/jb-decode - Decodes Juicebox transaction calldata with function parameter extraction and historical analysis.

/jb-v5-api vs /jb-v5-impl - API gives function signatures ("what exists?"), impl gives internal mechanics ("how does it work?").

Hook Generation Skills

/jb-pay-hook, /jb-cash-out-hook, /jb-split-hook - Generate Solidity contracts with Foundry tests. First evaluates if off-the-shelf hooks (721 hook, buyback hook, Revnet) fit before creating custom implementations.

UI Generation Skills

/jb-deploy-ui - Standalone HTML files for deploying projects with wallet connection and transaction forms.

/jb-interact-ui - Frontends for paying, cashing out, and claiming tokens from existing projects.

/jb-explorer-ui - Etherscan-like interface to read contract state, write transactions, and decode events.

/jb-hook-deploy-ui - Compile Solidity in browser, deploy contracts, verify on explorers, attach to projects.

/jb-omnichain-ui - Build interfaces for multi-chain projects with unified cross-chain data display.

Data & API Skills

/jb-bendystraw - GraphQL API reference for querying project stats, payments, token holders, loans, NFTs, and activity feeds across all chains.

/jb-relayr - Multi-chain transaction bundling: pay gas on one chain, execute on many. Used for omnichain deployments.

/jb-fund-access-limits - Query payout limits and surplus allowances. Detects "unlimited" values and handles the array-based return format.

Specialized Skills

/jb-permit2-metadata - Encode metadata for gasless ERC20 payments using JBMetadataResolver. Fixes "AllowanceExpired" errors and Permit2 signature issues.

/jb-cash-out-curve - Cash out redemption calculations using the bonding curve formula. Shows what percentage of treasury a cash out receives.

/jb-suckers - Cross-chain token bridging setup. Links projects across chains for token portability while maintaining treasury backing.

/jb-simplify - Checklist to reduce custom contracts by leveraging native protocol mechanics.

/jb-protocol-fees - Protocol fee structures for Juicebox V5 and Revnets. Covers fee calculations, UI integration patterns for displaying fees, and how fees flow through the ecosystem.

/jb-omnichain-payout-limits - Explains that omnichain projects have per-chain payout limits rather than aggregate limits. This is a fundamental constraint with no perfect solution—useful when designing multi-chain treasury strategies.

Revnet Skills

/revnet-economics - Revnet economic modeling: boost periods, price ceilings, operator fees, and token dynamics.

/revnet-modeler - Simulate revnet behavior with different parameters and project future states.

Example Usage

/jb-project

Create a crowdfunding project that:
- Accepts ETH
- Issues 1M tokens per ETH
- Reserves 20% for the team
- Has a 100 ETH payout limit per 30-day cycle
- Allows token holders to cash out at any time

The skill will generate complete deployment code with proper configurations.


Machine-Readable Resources

For programmatic access to protocol data:

ResourceURLDescription
LLM Summary/llms.txtQuick protocol overview for LLMs
Full Context/llms-full.txtComplete protocol reference
Contract Addresses/api/contracts.jsonAll V5 addresses as JSON
SDK Reference/api/sdk.jsonjuice-sdk-react hooks and types

MCP Server

The Juicebox documentation is available through an MCP (Model Context Protocol) server for AI assistants.

HTTP API

Base URL: https://docs.juicebox.money/api/mcp

Documentation Endpoints

MethodEndpointDescription
POST/searchSearch docs by query, category, version
POST/get-docGet full document by path or title
GET/list-docsList all docs in a category
GET/structureGet documentation structure/stats

Code & Integration Endpoints

MethodEndpointDescription
POST/search-codeSearch code examples by language
GET/contractsGet contract addresses by name/chain
GET/sdkGet SDK hook/utility reference
GET/patternsGet integration patterns by project type

Quick Examples

Search documentation:

curl -X POST https://docs.juicebox.money/api/mcp/search \
-H "Content-Type: application/json" \
-d '{"query": "deploy project", "category": "developer", "limit": 5}'

Get contract addresses:

curl "https://docs.juicebox.money/api/mcp/contracts?contract=JBController"

Get integration pattern:

curl "https://docs.juicebox.money/api/mcp/patterns?projectType=revnet"

Search code examples:

curl -X POST https://docs.juicebox.money/api/mcp/search-code \
-H "Content-Type: application/json" \
-d '{"query": "pay", "language": "solidity", "limit": 5}'

Parameters

Documentation Search:

  • query (string, required): Search terms
  • category: developer | user | dao | ecosystem | all
  • version: v3 | v4 | v5 | all
  • limit (number): Max results (default: 10)

Contract Addresses:

  • contract: Contract name (e.g., JBController, REVDeployer)
  • chainId: 1 | 10 | 8453 | 42161 | testnets | all
  • category: core | revnet | hooks | suckers | omnichain | all

SDK Reference:

  • package: juice-sdk-react | juice-sdk-core | revnet-sdk | all
  • hook: Specific hook name (e.g., useJBProjectProvider)
  • category: context | read | write | omnichain | math | all

Integration Patterns:

  • pattern: Pattern ID (e.g., pay-project, wagmi-setup)
  • projectType: crowdfunding | revnet | dao-treasury | subscription

Using with Claude Desktop

For local MCP server access:

  1. Clone and install:

    git clone https://github.com/jbx-protocol/juice-docs-v3
    cd juice-docs-v3
    npm run mcp:install && npm run mcp:build-index
  2. Configure Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

    {
    "mcpServers": {
    "juice-docs": {
    "command": "node",
    "args": ["/path/to/juice-docs-v3/mcp-server/src/index.js"],
    "cwd": "/path/to/juice-docs-v3"
    }
    }
    }
  3. Restart Claude Desktop


For AI Agent Developers

If you're building AI agents that interact with Juicebox:

  1. Use Claude Code Skills - Most comprehensive, handles complex operations
  2. Query MCP Server - For documentation lookup and code examples
  3. Use JSON APIs - For contract addresses and SDK reference
  4. Parse llms-full.txt - For complete protocol context

Key Capabilities

TaskRecommended Approach
Deploy a project/jb-project skill
Generate custom hook/jb-pay-hook, /jb-cash-out-hook, or /jb-split-hook
Query project state/jb-query skill with cast/ethers
Query cross-chain data/jb-bendystraw skill (GraphQL API)
Decode transaction/jb-decode skill
Look up function signature/jb-v5-api skill or MCP /get-doc
Understand internal mechanics/jb-v5-impl skill
Get contract addressMCP /contracts or /api/contracts.json
Build project frontend/jb-deploy-ui or /jb-interact-ui skills
Deploy hooks from browser/jb-hook-deploy-ui skill
Set up cross-chain bridging/jb-suckers skill
Model revnet economics/revnet-economics or /revnet-modeler
Fix Permit2 errors/jb-permit2-metadata skill
Simplify project design/jb-simplify skill
Understand protocol fees/jb-protocol-fees skill
Plan omnichain payout limits/jb-omnichain-payout-limits skill

Example: AI Agent Workflow

// 1. Get contract addresses
const contracts = await fetch('https://docs.juicebox.money/api/contracts.json')
.then(r => r.json());

// 2. Search for relevant documentation
const docs = await fetch('https://docs.juicebox.money/api/mcp/search', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query: 'launch project', category: 'developer' })
}).then(r => r.json());

// 3. Get specific document
const guide = await fetch('https://docs.juicebox.money/api/mcp/get-doc', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ path: 'dev/v5/build/life-of-a-project.md' })
}).then(r => r.json());

More Information