ot-serve¶
The MCP server. One tool. Unlimited capabilities.
Exposes a single run tool that executes Python code. Your LLM writes code; OneTool runs it.
Usage¶
Options¶
| Option | Description |
|---|---|
-c, --config PATH |
Path to ot-serve.yaml configuration file |
-v, --version |
Show version and exit |
Commands¶
init¶
Initialize and manage global configuration in ~/.onetool/.
Running ot-serve init without a subcommand creates the global config directory.
| Subcommand | Description |
|---|---|
reset |
Reset global config to default templates (overwrites existing files) |
validate |
Validate all configuration files |
init (default)¶
Creates the global config directory and copies template files if they don't already exist.
init reset¶
Overwrites existing config files in ~/.onetool/ with fresh templates. Use with caution.
init validate¶
Checks global and project config files for syntax and schema errors.
Examples¶
Configuration¶
Configuration file: config/ot-serve.yaml or .onetool/ot-serve.yaml
See Configuration Reference for full schema.
Environment Variables¶
| Variable | Description |
|---|---|
OT_SERVE_CONFIG |
Config file path override |
OT_LOG_LEVEL |
Log level (DEBUG/INFO/WARNING/ERROR) |
OT_LOG_DIR |
Log directory path |
How It Works¶
- Loads tools from
src/ot_tools/via AST-based discovery - Exposes a single
runtool that executes Python code - Communicates via stdio using the MCP protocol
Tool Discovery¶
Tools are discovered statically from tools_dir patterns in config:
Benefits: - No code execution during discovery - Instant startup - Hot reload support