From 587cf52de52f986aa882dee20c81088c98db2a65 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Jul 2026 06:56:39 +0000 Subject: [PATCH 1/3] Document rate limiting env vars in README and env example --- .env.example | 5 +++++ README.md | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/.env.example b/.env.example index 7a869b9..a3e5e19 100644 --- a/.env.example +++ b/.env.example @@ -14,3 +14,8 @@ ALLOWED_ORIGINS=["http://localhost:8000","http://localhost:6274"] # Require FastMCP's extra client consent prompt (set false only for local dev) REQUIRE_AUTHORIZATION_CONSENT=true + +# Optional rate-limit overrides (per client sliding window) +# Defaults are 120 requests per 1 minute +# RATE_LIMIT_MAX_REQUESTS=120 +# RATE_LIMIT_WINDOW_MINUTES=1 diff --git a/README.md b/README.md index 5b5b7e6..ecff8ac 100644 --- a/README.md +++ b/README.md @@ -144,8 +144,15 @@ ALLOWED_ORIGINS=["http://localhost:8000","http://localhost:6274"] # Require FastMCP's extra client consent prompt (set false only for local dev) REQUIRE_AUTHORIZATION_CONSENT=true + +# Optional rate-limit overrides (per client sliding window) +# Defaults are 120 requests per 1 minute +# RATE_LIMIT_MAX_REQUESTS=120 +# RATE_LIMIT_WINDOW_MINUTES=1 ``` +`RATE_LIMIT_MAX_REQUESTS` and `RATE_LIMIT_WINDOW_MINUTES` are optional and should stay commented out unless you need to override the defaults for your environment. + ## Running the Server ### Local @@ -174,6 +181,7 @@ docker run --rm -i \ ``` This starts the MCP server on port 8000. +To override rate limits, also pass `-e RATE_LIMIT_MAX_REQUESTS=` and `-e RATE_LIMIT_WINDOW_MINUTES=` (defaults: `120` and `1`). ### Running with Docker compose From 843112d923199003c7989ab403a69e4c850624c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Jul 2026 06:59:47 +0000 Subject: [PATCH 2/3] Expand REQUIRE_AUTHORIZATION_CONSENT docs in README and env example --- .env.example | 5 ++++- README.md | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index a3e5e19..4362b6a 100644 --- a/.env.example +++ b/.env.example @@ -12,7 +12,10 @@ BASE_URL=http://localhost:8000 # Include http://localhost:6274 for MCP Inspector during local dev ALLOWED_ORIGINS=["http://localhost:8000","http://localhost:6274"] -# Require FastMCP's extra client consent prompt (set false only for local dev) +# Require FastMCP's extra client consent prompt per MCP client. Prevents +# confused-deputy attacks by requiring users to explicitly approve each new +# client. Keep true in production; set false only for local dev with throwaway +# clients. Docs: https://gofastmcp.com/servers/auth/oauth-proxy#param-require-authorization-consent REQUIRE_AUTHORIZATION_CONSENT=true # Optional rate-limit overrides (per client sliding window) diff --git a/README.md b/README.md index ecff8ac..3f45360 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,10 @@ BASE_URL=http://localhost:8000 # Include http://localhost:6274 if using MCP Inspector for testing ALLOWED_ORIGINS=["http://localhost:8000","http://localhost:6274"] -# Require FastMCP's extra client consent prompt (set false only for local dev) +# Require FastMCP's extra client consent prompt per MCP client. Prevents +# confused-deputy attacks by requiring users to explicitly approve each new +# client. Keep true in production; set false only for local dev with throwaway +# clients. REQUIRE_AUTHORIZATION_CONSENT=true # Optional rate-limit overrides (per client sliding window) @@ -151,6 +154,8 @@ REQUIRE_AUTHORIZATION_CONSENT=true # RATE_LIMIT_WINDOW_MINUTES=1 ``` +`REQUIRE_AUTHORIZATION_CONSENT` controls whether FastMCP prompts users to explicitly approve each new MCP client. Keep this `true` in production to prevent confused-deputy attacks; set it to `false` only during local development with throwaway clients. + `RATE_LIMIT_MAX_REQUESTS` and `RATE_LIMIT_WINDOW_MINUTES` are optional and should stay commented out unless you need to override the defaults for your environment. ## Running the Server From 585ce64b95dcfab58ccd9ba9dccb7fd9b7fd81df Mon Sep 17 00:00:00 2001 From: Martin Laukkanen Date: Fri, 3 Jul 2026 10:23:26 +0200 Subject: [PATCH 3/3] Update required status --- .env.example | 6 +++--- README.md | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index 4362b6a..f39b0e1 100644 --- a/.env.example +++ b/.env.example @@ -12,11 +12,11 @@ BASE_URL=http://localhost:8000 # Include http://localhost:6274 for MCP Inspector during local dev ALLOWED_ORIGINS=["http://localhost:8000","http://localhost:6274"] -# Require FastMCP's extra client consent prompt per MCP client. Prevents -# confused-deputy attacks by requiring users to explicitly approve each new +# Require FastMCP's extra client consent prompt per MCP client. (default: true) +# Prevents confused-deputy attacks by requiring users to explicitly approve each new # client. Keep true in production; set false only for local dev with throwaway # clients. Docs: https://gofastmcp.com/servers/auth/oauth-proxy#param-require-authorization-consent -REQUIRE_AUTHORIZATION_CONSENT=true +# REQUIRE_AUTHORIZATION_CONSENT=true # Optional rate-limit overrides (per client sliding window) # Defaults are 120 requests per 1 minute diff --git a/README.md b/README.md index 3f45360..2795e21 100644 --- a/README.md +++ b/README.md @@ -142,11 +142,11 @@ BASE_URL=http://localhost:8000 # Include http://localhost:6274 if using MCP Inspector for testing ALLOWED_ORIGINS=["http://localhost:8000","http://localhost:6274"] -# Require FastMCP's extra client consent prompt per MCP client. Prevents -# confused-deputy attacks by requiring users to explicitly approve each new +# Require FastMCP's extra client consent prompt per MCP client. (default: true) +# Prevents confused-deputy attacks by requiring users to explicitly approve each new # client. Keep true in production; set false only for local dev with throwaway # clients. -REQUIRE_AUTHORIZATION_CONSENT=true +# REQUIRE_AUTHORIZATION_CONSENT=true # Optional rate-limit overrides (per client sliding window) # Defaults are 120 requests per 1 minute @@ -154,7 +154,7 @@ REQUIRE_AUTHORIZATION_CONSENT=true # RATE_LIMIT_WINDOW_MINUTES=1 ``` -`REQUIRE_AUTHORIZATION_CONSENT` controls whether FastMCP prompts users to explicitly approve each new MCP client. Keep this `true` in production to prevent confused-deputy attacks; set it to `false` only during local development with throwaway clients. +`REQUIRE_AUTHORIZATION_CONSENT` controls whether FastMCP prompts users to explicitly approve each new MCP client. Keep this `true` (default) in production to prevent confused-deputy attacks; set it to `false` only during local development with throwaway clients. `RATE_LIMIT_MAX_REQUESTS` and `RATE_LIMIT_WINDOW_MINUTES` are optional and should stay commented out unless you need to override the defaults for your environment.