From ab7c70e490f9d818e3ba98418c884f4d49a5db3d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Jul 2026 22:01:29 +0000 Subject: [PATCH 1/3] Initial plan From 3f3eb51cde78135e97005c8a2a8a2e043d24d699 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Jul 2026 22:04:06 +0000 Subject: [PATCH 2/3] Document TOML 1.1 config parsing --- config.example.toml | 2 ++ docs/CONFIGURATION.md | 2 ++ internal/config/config_core_test.go | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/config.example.toml b/config.example.toml index 2c5aaeb59..aac21d906 100644 --- a/config.example.toml +++ b/config.example.toml @@ -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) diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index b20735308..3ef8a25b3 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -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 arrays are accepted. + TOML configuration requires `command = "docker"` for stdio-based MCP servers to ensure containerization: ```toml diff --git a/internal/config/config_core_test.go b/internal/config/config_core_test.go index c744b0355..5ec8a28d5 100644 --- a/internal/config/config_core_test.go +++ b/internal/config/config_core_test.go @@ -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 From 1f92dfc0e5a43c7887d2de3e508bdcc165427a55 Mon Sep 17 00:00:00 2001 From: Landon Cox Date: Wed, 22 Jul 2026 16:23:34 -0700 Subject: [PATCH 3/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- docs/CONFIGURATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 3ef8a25b3..9d8635763 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -17,7 +17,7 @@ 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 arrays are accepted. +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: