The main way to manage your director instance is via the CLI or Studio UI. These tools are functionally equivalent, and ultimately, they both use the same configuration files:

  • ~/.director/config.json - This is the main configuration file that contains the list of proxies, their targets and their configuration.
  • ~/.director/config.env - This file is not created by default, but can be used to override the service level configuration (which can also be ser via environment variables directly).

Note: If you’d like to manually edit the configuration files, you’ll need to make sure you restart the service for the changes to take effect.

config.json

Your configuration file is a JSON file that defines proxy connections (it’s location is ~/.director/config.json). Here’s how to structure it:

{
  // The list of available proxy servers
  "proxies": [
    {
      "id": "unique-proxy-name",
      "name": "Display Name for Proxy",
      "description": "What this proxy does (optional)",
      // The list of servers that this proxy aggregates
      "servers": [
        {
          "name": "stdio-server",
          "transport": {
            "type": "stdio",
            "command": "/path/to/program",
            "args": ["--option", "value"],
            "env": {
              "API_KEY": "your-key-here"
            }
          }
        },
        {
          "name": "streamable-or-sse-server",
          "transport": {
            "type": "http",
            // The url of the server, this can be either Streamable or SSE transports
            "url": "https://api.example.com/mcp"
          }
        }
      ]
    }
  ]
}

config.env

The config.env file is not created by default, but can be used to override the service level configuration (which can also be ser via environment variables directly).

# The port that the gateway will listen on (if running locally)
GATEWAY_PORT=3673 
# The url that the cli should connect to (change if you're using a remote instance)
GATEWAY_URL=http://localhost:3673 
# The GUI url, used for the `quickstart` and `studio` commands
STUDIO_URL=https://studio.director.run 
# The registry url, you can change this if you're running your own registry somewhere else
REGISTRY_API_URL=https://registry.director.run 
# When running your own registry, you can set an api key to use to write to the registry
REGISTRY_API_KEY=secret-api-write-key 
# The path to the main config file
CONFIG_FILE_PATH=/path/to/config.json 
# Enable debug cli commands (for example the registry write commands)
ENABLE_DEBUG_COMMANDS=false 
# The log level to use for the service
LOG_LEVEL=debug