From 385bd3eda2cde6614df0668c2a745c506d3cee76 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Thu, 2 Jul 2026 15:53:29 -0600 Subject: [PATCH] fix: Overrode the default JSON content-type for MCP OAuth so its properly application/x-www-form-urlencoded --- src/mcp/oauth.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mcp/oauth.rs b/src/mcp/oauth.rs index 0ee0236..2dd8b52 100644 --- a/src/mcp/oauth.rs +++ b/src/mcp/oauth.rs @@ -1,4 +1,4 @@ -use crate::client::oauth::{OAuthProvider, load_oauth_tokens, run_oauth_flow}; +use crate::client::oauth::{OAuthProvider, TokenRequestFormat, load_oauth_tokens, run_oauth_flow}; use crate::config::paths; use anyhow::{Context, Result, anyhow}; use chrono::Utc; @@ -63,6 +63,10 @@ impl OAuthProvider for McpOAuthProvider { &self.scopes } + fn token_request_format(&self) -> TokenRequestFormat { + TokenRequestFormat::FormUrlEncoded + } + fn uses_localhost_redirect(&self) -> bool { false }