Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config.example.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# MCP Gateway Configuration Example
# This file demonstrates all available configuration options for the MCP Gateway.
# Copy this file to config.toml and customize for your needs.
# TOML files are parsed as TOML 1.1 via BurntSushi/toml v1.6.0+, so external
# validators/editors should also support TOML 1.1 syntax.

# ============================================================================
# Gateway Configuration (Optional)
Expand Down
2 changes: 2 additions & 0 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Repository examples you can copy and adapt:

### TOML Format (`config.toml`)

TOML files are parsed as **TOML 1.1** using `github.com/BurntSushi/toml` v1.6.0+. If you validate or edit `config.toml` outside the gateway, use a TOML 1.1-compatible tool. This also means TOML 1.1 features such as multi-line inline tables are accepted.

TOML configuration requires `command = "docker"` for stdio-based MCP servers to ensure containerization:

```toml
Expand Down
5 changes: 5 additions & 0 deletions internal/config/config_core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ func TestFormatConfigError(t *testing.T) {
_, err := LoadFromFile(path)
require.Error(t, err, "expected error from invalid TOML")

var perr toml.ParseError
require.ErrorAs(t, err, &perr, "expected wrapped toml.ParseError")
assert.Greater(t, perr.Position.Line, 0, "parse error should include line number")
assert.Greater(t, perr.Position.Col, 0, "parse error should include column number")

msg := FormatConfigError(err)

// ErrorWithUsage output contains the file source snippet (|) and a
Expand Down
Loading