Skip to content

Commit a9c19d8

Browse files
Merge pull request #241 from gleanwork/codex/hjdivad/update-remote-connection-versioning
feat: pin connect-mcp-server
2 parents 0f7d6c3 + 08846e9 commit a9c19d8

8 files changed

Lines changed: 59 additions & 47 deletions

File tree

packages/configure-mcp-server/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"watch": "tsc -w"
4646
},
4747
"dependencies": {
48+
"@gleanwork/connect-mcp-server": "^0.2.3",
4849
"@gleanwork/local-mcp-server": "workspace:*",
4950
"@gleanwork/mcp-server-utils": "workspace:*",
5051
"dotenv": "^17.2.0",

packages/configure-mcp-server/src/configure/client/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import type { ConfigureOptions } from '../index.js';
1111
import { RemoteMcpTargets } from '@gleanwork/mcp-server-utils/util';
1212
import { isOAuthEnabled } from '../../common/env.js';
1313

14+
import connectMcpPackageJson from '@gleanwork/connect-mcp-server/package.json' with { type: 'json' };
15+
let connectMcpServerVersion = connectMcpPackageJson.version;
16+
1417
export interface MCPConfigPath {
1518
configDir: string;
1619
configFileName: string;
@@ -193,7 +196,11 @@ export function createMcpServersConfig(
193196
options?.agents ? 'agents' : 'default',
194197
);
195198
const mcpServerName = buildMcpServerName(options);
196-
const args = ['-y', '@gleanwork/connect-mcp-server', serverUrl];
199+
const args = [
200+
'-y',
201+
`@gleanwork/connect-mcp-server@${connectMcpServerVersion}`,
202+
serverUrl,
203+
];
197204
if (usingOAuth) {
198205
args.push('--header', 'X-Glean-Auth-Type:OAUTH');
199206
} else if (apiToken) {

packages/configure-mcp-server/src/test/cli.test.ts

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ Error configuring client: API token is required. Please provide a token with the
10541054
"command": "npx",
10551055
"args": [
10561056
"-y",
1057-
"@gleanwork/connect-mcp-server",
1057+
"@gleanwork/connect-mcp-server@0.2.3",
10581058
"https://test-domain-be.glean.com/mcp/default/sse",
10591059
"--header",
10601060
"Authorization:\${AUTH_HEADER}"
@@ -1125,7 +1125,7 @@ Error configuring client: API token is required. Please provide a token with the
11251125
"command": "npx",
11261126
"args": [
11271127
"-y",
1128-
"@gleanwork/connect-mcp-server",
1128+
"@gleanwork/connect-mcp-server@0.2.3",
11291129
"https://test-domain-be.glean.com/mcp/default/sse",
11301130
"--header",
11311131
"Authorization:\${AUTH_HEADER}"
@@ -1670,7 +1670,7 @@ Error configuring client: API token is required. Please provide a token with the
16701670
"command": "npx",
16711671
"args": [
16721672
"-y",
1673-
"@gleanwork/connect-mcp-server",
1673+
"@gleanwork/connect-mcp-server@0.2.3",
16741674
"https://test-domain-be.glean.com/mcp/default/sse",
16751675
"--header",
16761676
"Authorization:\${AUTH_HEADER}"
@@ -1726,7 +1726,7 @@ Error configuring client: API token is required. Please provide a token with the
17261726
"command": "npx",
17271727
"args": [
17281728
"-y",
1729-
"@gleanwork/connect-mcp-server",
1729+
"@gleanwork/connect-mcp-server@0.2.3",
17301730
"https://test-domain-be.glean.com/mcp/default/sse",
17311731
"--header",
17321732
"Authorization:\${AUTH_HEADER}"
@@ -1783,7 +1783,7 @@ Error configuring client: API token is required. Please provide a token with the
17831783
"command": "npx",
17841784
"args": [
17851785
"-y",
1786-
"@gleanwork/connect-mcp-server",
1786+
"@gleanwork/connect-mcp-server@0.2.3",
17871787
"https://test-domain-be.glean.com/mcp/agents/sse",
17881788
"--header",
17891789
"Authorization:\${AUTH_HEADER}"
@@ -1869,7 +1869,7 @@ Error configuring client: API token is required. Please provide a token with the
18691869
"glean": {
18701870
"args": [
18711871
"-y",
1872-
"@gleanwork/connect-mcp-server",
1872+
"@gleanwork/connect-mcp-server@0.2.3",
18731873
"https://test-instance-be.glean.com/mcp/default/sse",
18741874
"--header",
18751875
"Authorization:\${AUTH_HEADER}",
@@ -1926,7 +1926,7 @@ Error configuring client: API token is required. Please provide a token with the
19261926
"glean": {
19271927
"args": [
19281928
"-y",
1929-
"@gleanwork/connect-mcp-server",
1929+
"@gleanwork/connect-mcp-server@0.2.3",
19301930
"https://env-instance-be.glean.com/mcp/default/sse",
19311931
"--header",
19321932
"Authorization:\${AUTH_HEADER}",
@@ -1960,7 +1960,7 @@ Error configuring client: API token is required. Please provide a token with the
19601960
"glean": {
19611961
"args": [
19621962
"-y",
1963-
"@gleanwork/connect-mcp-server",
1963+
"@gleanwork/connect-mcp-server@0.2.3",
19641964
"https://process-env-instance-be.glean.com/mcp/default/sse",
19651965
"--header",
19661966
"Authorization:\${AUTH_HEADER}",
@@ -2007,7 +2007,7 @@ Error configuring client: API token is required. Please provide a token with the
20072007
"glean": {
20082008
"args": [
20092009
"-y",
2010-
"@gleanwork/connect-mcp-server",
2010+
"@gleanwork/connect-mcp-server@0.2.3",
20112011
"https://flag-instance-be.glean.com/mcp/default/sse",
20122012
"--header",
20132013
"Authorization:\${AUTH_HEADER}",
@@ -2100,7 +2100,7 @@ Error configuring client: API token is required. Please provide a token with the
21002100
"command": "npx",
21012101
"args": [
21022102
"-y",
2103-
"@gleanwork/connect-mcp-server",
2103+
"@gleanwork/connect-mcp-server@0.2.3",
21042104
"https://test-domain-be.glean.com/mcp/default/sse",
21052105
"--header",
21062106
"Authorization:\${AUTH_HEADER}"
@@ -2171,7 +2171,7 @@ Error configuring client: API token is required. Please provide a token with the
21712171
"command": "npx",
21722172
"args": [
21732173
"-y",
2174-
"@gleanwork/connect-mcp-server",
2174+
"@gleanwork/connect-mcp-server@0.2.3",
21752175
"https://test-domain-be.glean.com/mcp/default/sse",
21762176
"--header",
21772177
"Authorization:\${AUTH_HEADER}"
@@ -2240,7 +2240,7 @@ Error configuring client: API token is required. Please provide a token with the
22402240
"command": "npx",
22412241
"args": [
22422242
"-y",
2243-
"@gleanwork/connect-mcp-server",
2243+
"@gleanwork/connect-mcp-server@0.2.3",
22442244
"https://test-domain-be.glean.com/mcp/default/sse",
22452245
"--header",
22462246
"Authorization:\${AUTH_HEADER}"
@@ -2302,7 +2302,7 @@ Error configuring client: API token is required. Please provide a token with the
23022302
"glean": {
23032303
"args": [
23042304
"-y",
2305-
"@gleanwork/connect-mcp-server",
2305+
"@gleanwork/connect-mcp-server@0.2.3",
23062306
"https://test-domain-be.glean.com/mcp/default/sse",
23072307
"--header",
23082308
"Authorization:\${AUTH_HEADER}",
@@ -2316,7 +2316,7 @@ Error configuring client: API token is required. Please provide a token with the
23162316
"glean_agents": {
23172317
"args": [
23182318
"-y",
2319-
"@gleanwork/connect-mcp-server",
2319+
"@gleanwork/connect-mcp-server@0.2.3",
23202320
"https://test-domain-be.glean.com/mcp/agents/sse",
23212321
"--header",
23222322
"Authorization:\${AUTH_HEADER}",
@@ -2385,7 +2385,7 @@ Error configuring client: API token is required. Please provide a token with the
23852385
"command": "npx",
23862386
"args": [
23872387
"-y",
2388-
"@gleanwork/connect-mcp-server",
2388+
"@gleanwork/connect-mcp-server@0.2.3",
23892389
"https://test-domain-be.glean.com/mcp/default/sse",
23902390
"--header",
23912391
"Authorization:\${AUTH_HEADER}"
@@ -2458,7 +2458,7 @@ Error configuring client: API token is required. Please provide a token with the
24582458
"command": "npx",
24592459
"args": [
24602460
"-y",
2461-
"@gleanwork/connect-mcp-server",
2461+
"@gleanwork/connect-mcp-server@0.2.3",
24622462
"https://test-domain-be.glean.com/mcp/default/sse",
24632463
"--header",
24642464
"Authorization:\${AUTH_HEADER}"
@@ -2527,7 +2527,7 @@ Error configuring client: API token is required. Please provide a token with the
25272527
"command": "npx",
25282528
"args": [
25292529
"-y",
2530-
"@gleanwork/connect-mcp-server",
2530+
"@gleanwork/connect-mcp-server@0.2.3",
25312531
"https://test-domain-be.glean.com/mcp/default/sse",
25322532
"--header",
25332533
"Authorization:\${AUTH_HEADER}"
@@ -2589,7 +2589,7 @@ Error configuring client: API token is required. Please provide a token with the
25892589
"glean": {
25902590
"args": [
25912591
"-y",
2592-
"@gleanwork/connect-mcp-server",
2592+
"@gleanwork/connect-mcp-server@0.2.3",
25932593
"https://test-domain-be.glean.com/mcp/default/sse",
25942594
"--header",
25952595
"Authorization:\${AUTH_HEADER}",
@@ -2603,7 +2603,7 @@ Error configuring client: API token is required. Please provide a token with the
26032603
"glean_agents": {
26042604
"args": [
26052605
"-y",
2606-
"@gleanwork/connect-mcp-server",
2606+
"@gleanwork/connect-mcp-server@0.2.3",
26072607
"https://test-domain-be.glean.com/mcp/agents/sse",
26082608
"--header",
26092609
"Authorization:\${AUTH_HEADER}",
@@ -2673,7 +2673,7 @@ Error configuring client: API token is required. Please provide a token with the
26732673
"command": "npx",
26742674
"args": [
26752675
"-y",
2676-
"@gleanwork/connect-mcp-server",
2676+
"@gleanwork/connect-mcp-server@0.2.3",
26772677
"https://test-domain-be.glean.com/mcp/default/sse",
26782678
"--header",
26792679
"Authorization:\${AUTH_HEADER}"
@@ -2745,7 +2745,7 @@ Error configuring client: API token is required. Please provide a token with the
27452745
"command": "npx",
27462746
"args": [
27472747
"-y",
2748-
"@gleanwork/connect-mcp-server",
2748+
"@gleanwork/connect-mcp-server@0.2.3",
27492749
"https://test-domain-be.glean.com/mcp/default/sse",
27502750
"--header",
27512751
"Authorization:\${AUTH_HEADER}"
@@ -2815,7 +2815,7 @@ Error configuring client: API token is required. Please provide a token with the
28152815
"command": "npx",
28162816
"args": [
28172817
"-y",
2818-
"@gleanwork/connect-mcp-server",
2818+
"@gleanwork/connect-mcp-server@0.2.3",
28192819
"https://test-domain-be.glean.com/mcp/default/sse",
28202820
"--header",
28212821
"Authorization:\${AUTH_HEADER}"
@@ -2877,7 +2877,7 @@ Error configuring client: API token is required. Please provide a token with the
28772877
"glean": {
28782878
"args": [
28792879
"-y",
2880-
"@gleanwork/connect-mcp-server",
2880+
"@gleanwork/connect-mcp-server@0.2.3",
28812881
"https://test-domain-be.glean.com/mcp/default/sse",
28822882
"--header",
28832883
"Authorization:\${AUTH_HEADER}",
@@ -2891,7 +2891,7 @@ Error configuring client: API token is required. Please provide a token with the
28912891
"glean_agents": {
28922892
"args": [
28932893
"-y",
2894-
"@gleanwork/connect-mcp-server",
2894+
"@gleanwork/connect-mcp-server@0.2.3",
28952895
"https://test-domain-be.glean.com/mcp/agents/sse",
28962896
"--header",
28972897
"Authorization:\${AUTH_HEADER}",
@@ -2959,7 +2959,7 @@ Error configuring client: API token is required. Please provide a token with the
29592959
"glean": {
29602960
"args": [
29612961
"-y",
2962-
"@gleanwork/connect-mcp-server",
2962+
"@gleanwork/connect-mcp-server@0.2.3",
29632963
"https://test-domain-be.glean.com/mcp/default/sse",
29642964
"--header",
29652965
"Authorization:\${AUTH_HEADER}",
@@ -3031,7 +3031,7 @@ Error configuring client: API token is required. Please provide a token with the
30313031
"glean": {
30323032
"args": [
30333033
"-y",
3034-
"@gleanwork/connect-mcp-server",
3034+
"@gleanwork/connect-mcp-server@0.2.3",
30353035
"https://test-domain-be.glean.com/mcp/default/sse",
30363036
"--header",
30373037
"Authorization:\${AUTH_HEADER}",
@@ -3120,7 +3120,7 @@ Error configuring client: API token is required. Please provide a token with the
31203120
"glean": {
31213121
"args": [
31223122
"-y",
3123-
"@gleanwork/connect-mcp-server",
3123+
"@gleanwork/connect-mcp-server@0.2.3",
31243124
"https://test-domain-be.glean.com/mcp/default/sse",
31253125
"--header",
31263126
"Authorization:\${AUTH_HEADER}",
@@ -3195,7 +3195,7 @@ Error configuring client: API token is required. Please provide a token with the
31953195
"glean": {
31963196
"args": [
31973197
"-y",
3198-
"@gleanwork/connect-mcp-server",
3198+
"@gleanwork/connect-mcp-server@0.2.3",
31993199
"https://test-domain-be.glean.com/mcp/default/sse",
32003200
"--header",
32013201
"Authorization:\${AUTH_HEADER}",
@@ -3215,7 +3215,7 @@ Error configuring client: API token is required. Please provide a token with the
32153215
"glean_agents": {
32163216
"args": [
32173217
"-y",
3218-
"@gleanwork/connect-mcp-server",
3218+
"@gleanwork/connect-mcp-server@0.2.3",
32193219
"https://test-domain-be.glean.com/mcp/agents/sse",
32203220
"--header",
32213221
"Authorization:\${AUTH_HEADER}",
@@ -3320,7 +3320,7 @@ Error configuring client: API token is required. Please provide a token with the
33203320
"glean": {
33213321
"args": [
33223322
"-y",
3323-
"@gleanwork/connect-mcp-server",
3323+
"@gleanwork/connect-mcp-server@0.2.3",
33243324
"https://test-domain-be.glean.com/mcp/default/sse",
33253325
"--header",
33263326
"Authorization:\${AUTH_HEADER}",
@@ -3390,7 +3390,7 @@ Error configuring client: API token is required. Please provide a token with the
33903390
"glean": {
33913391
"args": [
33923392
"-y",
3393-
"@gleanwork/connect-mcp-server",
3393+
"@gleanwork/connect-mcp-server@0.2.3",
33943394
"https://test-domain-be.glean.com/mcp/default/sse",
33953395
"--header",
33963396
"Authorization:\${AUTH_HEADER}",
@@ -3472,7 +3472,7 @@ Error configuring client: API token is required. Please provide a token with the
34723472
"command": "npx",
34733473
"args": [
34743474
"-y",
3475-
"@gleanwork/connect-mcp-server",
3475+
"@gleanwork/connect-mcp-server@0.2.3",
34763476
"https://test-domain-be.glean.com/mcp/default/sse",
34773477
"--header",
34783478
"Authorization:\${AUTH_HEADER}"
@@ -3542,7 +3542,7 @@ Error configuring client: API token is required. Please provide a token with the
35423542
"glean": {
35433543
"args": [
35443544
"-y",
3545-
"@gleanwork/connect-mcp-server",
3545+
"@gleanwork/connect-mcp-server@0.2.3",
35463546
"https://test-domain-be.glean.com/mcp/default/sse",
35473547
"--header",
35483548
"Authorization:\${AUTH_HEADER}",
@@ -3556,7 +3556,7 @@ Error configuring client: API token is required. Please provide a token with the
35563556
"glean_agents": {
35573557
"args": [
35583558
"-y",
3559-
"@gleanwork/connect-mcp-server",
3559+
"@gleanwork/connect-mcp-server@0.2.3",
35603560
"https://test-domain-be.glean.com/mcp/agents/sse",
35613561
"--header",
35623562
"Authorization:\${AUTH_HEADER}",

packages/configure-mcp-server/src/test/configure.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ describe('configure', () => {
221221
"glean": {
222222
"args": [
223223
"-y",
224-
"@gleanwork/connect-mcp-server",
224+
"@gleanwork/connect-mcp-server@0.2.3",
225225
"https://test-instance-be.glean.com/mcp/default/sse",
226226
"--header",
227227
"X-Glean-Auth-Type:OAUTH",
@@ -256,7 +256,7 @@ describe('configure', () => {
256256
"glean_agents": {
257257
"args": [
258258
"-y",
259-
"@gleanwork/connect-mcp-server",
259+
"@gleanwork/connect-mcp-server@0.2.3",
260260
"https://test-instance-be.glean.com/mcp/agents/sse",
261261
"--header",
262262
"X-Glean-Auth-Type:OAUTH",
@@ -287,7 +287,7 @@ describe('configure', () => {
287287
"glean": {
288288
"args": [
289289
"-y",
290-
"@gleanwork/connect-mcp-server",
290+
"@gleanwork/connect-mcp-server@0.2.3",
291291
"https://test-instance-be.glean.com/mcp/default/sse",
292292
"--header",
293293
"Authorization:\${AUTH_HEADER}",

packages/configure-mcp-server/src/test/configure/vscode.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ describe('VS Code MCP Client', () => {
142142
"glean": {
143143
"args": [
144144
"-y",
145-
"@gleanwork/connect-mcp-server",
145+
"@gleanwork/connect-mcp-server@0.2.3",
146146
"https://example-instance-be.glean.com/mcp/default/sse",
147147
"--header",
148148
"Authorization:\${AUTH_HEADER}",
@@ -176,7 +176,7 @@ describe('VS Code MCP Client', () => {
176176
"glean_agents": {
177177
"args": [
178178
"-y",
179-
"@gleanwork/connect-mcp-server",
179+
"@gleanwork/connect-mcp-server@0.2.3",
180180
"https://example-instance-be.glean.com/mcp/agents/sse",
181181
"--header",
182182
"Authorization:\${AUTH_HEADER}",

packages/configure-mcp-server/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"moduleResolution": "nodenext",
1414
"allowSyntheticDefaultImports": true,
1515
"esModuleInterop": true,
16+
"resolveJsonModule": true,
1617
"strict": true,
1718
"checkJs": true,
1819
"allowJs": true,

packages/mcp-server-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"watch": "tsc -w"
8282
},
8383
"dependencies": {
84-
"@gleanwork/connect-mcp-server": "^0.2.2",
84+
"@gleanwork/connect-mcp-server": "^0.2.3",
8585
"dotenv": "^17.2.0",
8686
"fs-extra": "^11.3.0",
8787
"open": "^10.2.0",

0 commit comments

Comments
 (0)