MCP and bundles
Orchetree exposes an MCP endpoint at /mcp. External AI systems can discover
and invoke published agent trees as tools. Configure MCP_API_KEY to require
Bearer authentication.
MCP access
Point an MCP client at http://localhost:8000/mcp for local development. In a
shared environment, use HTTPS and require authentication.
MCP execution uses the same tree definitions, connection resolution, run records, and traces as execution started in the Orchetree interface.
Export a tree
curl -H "X-Orchetree-Role: developer" \
"http://localhost:8000/api/v1/export/tree/1?pin_version=4" \
--output tree.bundle.json
Export a project
curl -H "X-Orchetree-Role: developer" \
"http://localhost:8000/api/v1/export/project/1" \
--output project.bundle.json
Export a deployable package
curl -H "X-Orchetree-Role: developer" \
"http://localhost:8000/api/v1/export/project/1/package" \
--output project-runtime.zip
The package contains a headless runtime manifest and startup assets for the project. It does not require the authoring frontend.
Import a project
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Orchetree-Role: developer" \
"http://localhost:8000/api/v1/import/project-bundle" \
-d @project.bundle.json
Credential values are stripped from exported bundles. Configure connections again in the destination environment.
Tree and project imports remap internal IDs and preserve valid relationships. Imported content receives an initial version snapshot. Use import options to skip connector creation when the destination should supply its own connector configuration.
See Versions and rollback, API, and Environment variables.