Create a configuration file at ~/.llm/config.json or $PWD/.llm/config.json to define your LLM provider and MCP servers.
Key configuration sections:
systemPrompt: A global system prompt for the AI.llm: Configuration for the LLM provider (e.g., openai, groq, or local via llama). Includes provider, model, api_key, temperature, and base_url.mcpServers: A dictionary of MCP servers. Each server entry requires a command and args.
Additional server options:
requires_confirmation: A list of tool names that require explicit user approval before execution.enabled: Boolean to enable/disable the server (defaults to true).exclude_tools: A list of specific tool names to exclude from the server.env: A dictionary of environment variables for the server process.
Note: You can use // to comment within the JSON file. LLM API keys can also be provided via LLM_API_KEY or OPENAI_API_KEY environment variables.
{
"systemPrompt": "You are an AI assistant...",
"llm": {
"provider": "openai",
"model": "gpt-4",
"api_key": "your-openai-api-key",
"temperature": 0.7,
"base_url": "https://api.openai.com/v1"
},
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"requires_confirmation": ["fetch"],
"enabled": true,
"exclude_tools": []
},
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "your-brave-api-key"
},
"requires_confirmation": ["brave_web_search"]
}
}
}