Skip to content

CodeMode

CodeMode is a Go library that exposes registered, typed Go capabilities to Model Context Protocol (MCP) clients through Starlark programs. Clients use three MCP tools: search_api, describe_api, and execute. Each execute call runs Starlark in a fresh worker process, and only the final converted value returned by zero-argument main() is exposed to the caller. The pages below are organized by reader need.

Tutorials

Learn the workflow by building a working server.

How-to guides

Complete a specific host-configuration task.

Reference

Look up exact contracts, defaults, and wire shapes.

  • Public API reference — exported Go types, builder lifecycle, limits, and authorization contracts.
  • MCP tool reference — inputs, listed descriptions, successful outputs, and errors for the three MCP tools.

Explanation

Understand why the trust boundaries exist and what they do not cover.