Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Commit 7b101e2

Browse files
authored
Merge pull request #64 from runbasehq/dev
fix: modify behaviour on empty mcp server auth token
2 parents 566f04c + c157b5e commit 7b101e2

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

packages/mcp-check/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# mcp-testing-library
22

3+
## 0.4.6
4+
5+
### Patch Changes
6+
7+
- Fix empty authorization token config option
8+
39
## 0.4.5
410

511
### Patch Changes

packages/mcp-check/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mcp-check",
33
"module": "dist/src/index.js",
4-
"version": "0.4.5",
4+
"version": "0.4.6",
55
"type": "module",
66
"main": "dist/src/index.js",
77
"types": "dist/src/index.d.ts",

packages/mcp-check/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ export class Scorer {
8484

8585
export class McpServer {
8686
public url: string;
87-
public authorizationToken: string;
87+
public authorizationToken?: string;
8888
public name: string;
8989
public type: string;
9090

91-
constructor({ url, authorizationToken, name, type }: { url: string; authorizationToken: string; name: string; type: string }) {
91+
constructor({ url, authorizationToken, name, type }: { url: string; authorizationToken?: string; name: string; type: string }) {
9292
this.url = url;
93-
this.authorizationToken = authorizationToken;
9493
this.name = name;
9594
this.type = type;
95+
this.authorizationToken = authorizationToken;
9696
}
9797
}
9898

packages/mcp-check/src/providers/anthropic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ export class AnthropicProvider extends Provider {
127127
mcp_servers: [
128128
{
129129
url: this.mcpServer.url,
130-
authorization_token: this.mcpServer.authorizationToken,
131130
name: this.mcpServer.name,
132131
type: "url",
132+
...(this.mcpServer.authorizationToken && { authorization_token: this.mcpServer.authorizationToken }),
133133
},
134134
],
135135
betas: ["mcp-client-2025-04-04"],

packages/mcp-check/src/providers/openai.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ export class OpenAIProvider extends Provider {
119119
require_approval: "never",
120120
server_label: this.mcpServer.name,
121121
server_url: this.mcpServer.url,
122-
headers: {
123-
Authorization: this.mcpServer.authorizationToken || "",
124-
},
122+
...(this.mcpServer.authorizationToken && { headers: { Authorization: this.mcpServer.authorizationToken } }),
125123
},
126124
],
127125
input: this.promptText,

0 commit comments

Comments
 (0)