Skip to content
Open
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
3 changes: 2 additions & 1 deletion src/client/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,8 @@ describe('OAuth Authorization', () => {
const calls = mockFetch.mock.calls;
const [, options] = calls[0];
expect(options.headers).toEqual({
'MCP-Protocol-Version': '2025-01-01'
'MCP-Protocol-Version': '2025-01-01',
Accept: 'application/json'
});
});

Expand Down
5 changes: 4 additions & 1 deletion src/client/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,10 @@ export async function discoverAuthorizationServerMetadata(
protocolVersion?: string;
} = {}
): Promise<AuthorizationServerMetadata | undefined> {
const headers = { 'MCP-Protocol-Version': protocolVersion };
const headers = {
'MCP-Protocol-Version': protocolVersion,
Accept: 'application/json'
};

// Get the list of URLs to try
const urlsToTry = buildDiscoveryUrls(authorizationServerUrl);
Expand Down