Fix: correct MCP server authentication header format in frontend (#9819)

- Fix MCP test connection authentication issues by updating frontend
request format
- Add variables field with authorization_token for template substitution
- Change headers to use proper Authorization Bearer format with template
variable

🤖 Generated with [Claude Code](https://claude.ai/code)

### What problem does this PR solve?

correct MCP server authentication header format in frontend
### Type of change

 * [x] Bug Fix (non-breaking change which fixes an issue)

---------

Co-authored-by: Marvion <marvionliu@wukongjx.cn>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Marvion
2025-11-03 20:00:27 +08:00
committed by GitHub
parent be3ae0eda9
commit 395ce16b3c
2 changed files with 118 additions and 1 deletions

View File

@ -86,7 +86,8 @@ export function EditMcpDialog({
const handleOk = async (values: z.infer<typeof FormSchema>) => {
const nextValues = {
...omit(values, 'authorization_token'),
headers: { authorization_token: values.authorization_token },
variables: { authorization_token: values.authorization_token },
headers: { Authorization: 'Bearer ${authorization_token}' },
};
if (isTriggeredBySaving) {
onOk?.(nextValues);