For information about project and personal configuration locations, see the Configuration Files page.

The firebender.json file must be located in the project root directory for project-wide configuration, or in ~/.firebender/firebender.json for personal configuration.

Fields

All high-level fields in the configuration are optional.

ignore

Type: string[]?

Array of glob patterns for files that Firebender should not analyze without explicit permission.

Example:

{
  "ignore": [
    "**/secrets.properties",
    "**/.env*",
    "private/**"
  ]
}

For details and examples, see Ignore Files.

mcpServers

Type: Object<string, ServerConfig>?

Configure Model Context Protocol (MCP) servers to provide custom tools for Firebender Agent.

mcpServers.{serverName}

  • mcpServers.{serverName}.command: string - The command to execute for the MCP server
  • mcpServers.{serverName}.args: string[]? - Array of arguments to pass to the command
  • mcpServers.{serverName}.env: Object<string, string>? - Environment variables to set for the MCP server

Example:

{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "env": {"BRAVE_API_KEY": "YOUR_API_KEY"}
    },
    "weather": {
      "command": "npx",
      "args": ["-y", "@h1deya/mcp-server-weather"]
    }
  }
}

Firebender follows the same syntax as Model Context Protocol.

For details and examples, see MCP.

mcpEnvFile

Type: string?

Optional path to a file containing environment variables for MCP servers. Can be either a full path or a relative path from the project root.

Example:

{
  "mcpEnvFile": ".env.mcp"
}

rules

Type: (string | RuleConfig)[]?

Define guidelines for Firebender to follow when generating code. Can contain both global rules (strings) and path-specific rules (objects).

  • rules[i]: string - A rule that applies to all files
  • rules[i].filePathMatches: string | string[]? - Optional glob pattern(s) to match file paths for specific rules. Can be a single pattern or an array of patterns.
  • rules[i].rules: string[] - Array of rules to apply only to matching files
  • rules[i].rulesPaths: string | string[] - Path(s) to files containing additional rules. Can be either a single path or an array of paths. Paths can be absolute or relative to the project root.

Example:

{
  "rules": [
    "Follow Material Design 3 guidelines",
    "Use Kotlin coroutines for async operations",
    {
      "filePathMatches": "**/*Test.kt",
      "rules": ["Use Kotest BDD style", "Prefer property-based testing"],
      "rulesPaths": "test-rules.txt"
    },
    {
      "filePathMatches": ["**/*.kt", "**/*.kts"],
      "rulesPaths": ["/absolute/path/to/rules.txt", "relative/path/to/more-rules.txt"]
    }
  ]
}

For details and examples, see Rules for AI.