Skip to content

MCP & Tools Configuration

Model Context Protocol (MCP) and tool system settings.

MCP Settings

VariableDefaultSensitiveDescription
ENABLE_MCPtrueNoEnable MCP tool system.
MCP_ENCRYPTION_SALT(auto-generated)YesSalt for encrypting MCP secrets. Auto-generated if not set. Recommended to set for consistency across restarts.

Deferred Tool Loading

For MCP servers with many tools, deferred loading reduces prompt size by loading tools on-demand.

VariableDefaultDescription
ENABLE_DEFERRED_TOOL_LOADINGtrueEnable deferred/lazy tool loading.
DEFERRED_TOOL_THRESHOLD20Tool count threshold to trigger deferred loading.
DEFERRED_TOOL_SEARCH_LIMIT25Maximum tools returned in a search.
DEFERRED_TOOL_PROMPT_LIMIT25Maximum tools included in a prompt.

Skills

VariableDefaultDescription
ENABLE_SKILLStrueEnable the skills system.

Code Interpreter

VariableDefaultDescription
ENABLE_CODE_INTERPRETERfalseEnable the experimental QuickJS code interpreter for agent runs.

Audio Transcription

VariableDefaultSensitiveDescription
ENABLE_AUDIO_TRANSCRIPTIONfalseNoEnable audio transcription tool.
AUDIO_TRANSCRIPTION_API_KEY(empty)YesTranscription API key.
AUDIO_TRANSCRIPTION_BASE_URL(empty)NoTranscription API base URL.
AUDIO_TRANSCRIPTION_MODELgpt-4o-mini-transcribeNoTranscription model name.

Image Generation

VariableDefaultSensitiveDescription
ENABLE_IMAGE_GENERATIONfalseNoEnable the image generation tool.
IMAGE_GENERATION_API_KEY(empty)YesImage generation API key.
IMAGE_GENERATION_BASE_URLhttps://api.openai.com/v1NoOpenAI-compatible image API base URL.
IMAGE_GENERATION_MODELgpt-image-2NoImage model name.
IMAGE_GENERATION_TIMEOUT120NoRequest timeout in seconds.

Example

bash
# MCP
ENABLE_MCP=true
MCP_ENCRYPTION_SALT=your-random-salt-here

# Skills
ENABLE_SKILLS=true

# Code Interpreter (optional)
ENABLE_CODE_INTERPRETER=false

# Audio Transcription (optional)
ENABLE_AUDIO_TRANSCRIPTION=true
AUDIO_TRANSCRIPTION_API_KEY=sk-your-key
AUDIO_TRANSCRIPTION_MODEL=gpt-4o-mini-transcribe

# Image Generation (optional)
ENABLE_IMAGE_GENERATION=true
IMAGE_GENERATION_API_KEY=sk-your-key
IMAGE_GENERATION_MODEL=gpt-image-2

TIP

Set MCP_ENCRYPTION_SALT to a stable value in production. If it changes, previously encrypted MCP credentials will become unreadable.