This page is the SDK helper. For the full schema, merge semantics, and JSON-only sandbox rationale, see MCP / Project Config.
defineConfig(config)
Creates a typed TheoProjectConfig for use in theo.config.ts. The MCP server reads this automatically.
TheoProjectConfig
File Formats
The MCP server prefers JSON config by default:theo.config.json— always loaded when present (safe: parsed withJSON.parse).theo.config.js/theo.config.ts— ignored by default. Loading them executes arbitrary code from the current working directory, which is unsafe when an IDE launches the MCP server in a project you don’t fully trust.
theo.config.js first, then theo.config.ts, falling back to theo.config.json. If a JS/TS config is found without the flag, the MCP server logs a warning and skips it.
How It’s Used
When the@hitheo/mcp server starts, it:
- Reads
THEO_API_KEYfrom the environment - Loads
theo.config.json(or JS/TS if opted in) - Injects
persona,skills, andtoolsinto every MCP tool call - Uses
defaultModeas the fallback mode
