MCP server

Let Claude and other AI agents validate, simulate, render and generate behavior trees.

BeeTreeCraft runs a Model Context Protocol server at:

https://api.beetreecraft.com/mcp

It uses the Streamable HTTP transport with JSON responses (POST JSON-RPC 2.0, protocol version 2025-03-26).

Connect

Claude Code

The stateless tools need no account: connect without a key and an agent can list node types and templates, validate, render, simulate, step through, diff and generate code. Each address may make 60 calls per 10 minutes without a key (shared with the REST tools); past that the server answers HTTP 429 with Retry-After and JSON-RPC error -32029.

claude mcp add --transport http beetreecraft https://api.beetreecraft.com/mcp

To save, publish, remix or list your own trees, and to lift the limit, add an API key. Create one on your profile page, keep it in an environment variable, then:

claude mcp add --transport http beetreecraft https://api.beetreecraft.com/mcp \
  --header "X-API-Key: $BEETREE_API_KEY"

Any MCP client (JSON config)

{
  "mcpServers": {
    "beetreecraft": {
      "type": "http",
      "url": "https://api.beetreecraft.com/mcp",
      "headers": { "X-API-Key": "<your API key>" }
    }
  }
}

Get a key from your profile page under API keys. Keys start with btc_, are shown once, and can be revoked there. A wrong, revoked or expired key gets a 401; no key at all reaches the stateless tools only. Never commit a key; use an environment variable or your client’s secret store.

Scopes

MCP tools follow the key’s scopes. A read-only key can run list_my_trees and validate_tree but not create_tree, which needs trees:write; a denied tool returns an insufficient_scope result that names the scope the key lacks. Pick the narrowest preset that does the job.

Tools

Tools marked (no key) answer without an account. Every other tool needs an API key, and without one answers with an error that says where to create it; tools marked (account) also act on your account.

ToolWhat it does
list_node_types (no key)Node types, decorators, render formats and engines
validate_tree (no key)Validate a .beetree.yaml spec and list every problem
render_tree (no key)Render as ascii, sigil, mermaid or dot
simulate_start, simulate_answer (no key)Step through a simulation: start returns the first pending leaf; answer submits SUCCESS, FAILURE or RUNNING and returns the next leaf or the final trace
diff_trees (no key)Compare two specs (spec, other) and list added, removed and modified nodes by path
simulate_tree (no key)Dry-run with optional per-node overrides and return the trace
generate_code (no key)Generate unity, unreal or godot code
search_treesSearch the community’s public trees. Returns {trees, truncated}; truncated: true means only the newest 2000 public trees were scanned, so narrow the query or tag
get_treeFetch a tree and its spec by id (private trees only for their owner)
create_tree (account)Save a tree to your account
update_tree (account)Replace the spec of a tree you own; omitted fields keep their values
delete_tree (account)Permanently delete a tree you own
remix_tree (account)Copy a public tree into your account as a private “(Remix)” tree that keeps credit to the original author; 20 per day
remix_scene (account)Copy a public Explore scene into your account as a private “(Remix)” scene, with private copies of the public trees its agents use; counts as one of the 20 daily remixes
get_sceneFetch an Explore scene by id (private scenes only for their owner)
list_my_scenes (account)List your Explore scenes
get_template (no key)List starter templates, or fetch one by name (for clients without resource support)
list_my_trees (account)List your trees

Errors from a tool come back inside the result with isError: true, so the model can read them and try again.

Resources and prompts

Resources (resources/list, resources/read):

URIContents
beetree://node-typesNode types, decorators, render formats and engines as JSON
beetree://schema/beetreeThe JSON Schema for .beetree.yaml, identical to /schemas/beetree.schema.json
beetree://examples/patrolA small valid .beetree.yaml to copy the format from
beetree://templates/<name>The builder templates (shopkeeper, guard, coward, boss, companion), each a valid .beetree.yaml

Prompt design_behavior_tree (prompts/get) takes character and an optional engine. It walks a model through reading the resources, writing a spec, validating, simulating, rendering and generating code.

Try it with curl

Neither call needs a key. Add -H "X-API-Key: $BEETREE_API_KEY" to lift the limit or to call the account tools.

curl -s https://api.beetreecraft.com/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
curl -s https://api.beetreecraft.com/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"validate_tree","arguments":{"spec":"version: \"1.0\"\nmetadata:\n  name: demo\ntree:\n  type: action\n  name: hello\n"}}}'

Limits

Specs are limited to 128 KB and 500 nodes. Requests are rate limited per client; without a key, 60 calls per 10 minutes per address.