@@ -47,16 +47,16 @@ func (f *fakeLoader) Load(_ string) (config.Modifier, error) {
47
47
}
48
48
49
49
type fakeRegistry struct {
50
- pkg packages.Package
50
+ pkg packages.Server
51
51
err error
52
52
}
53
53
54
- func (f * fakeRegistry ) Resolve (_ string , _ ... options.ResolveOption ) (packages.Package , error ) {
54
+ func (f * fakeRegistry ) Resolve (_ string , _ ... options.ResolveOption ) (packages.Server , error ) {
55
55
return f .pkg , f .err
56
56
}
57
57
58
- func (f * fakeRegistry ) Search (_ string , _ map [string ]string , _ ... options.SearchOption ) ([]packages.Package , error ) {
59
- return []packages.Package {f .pkg }, f .err
58
+ func (f * fakeRegistry ) Search (_ string , _ map [string ]string , _ ... options.SearchOption ) ([]packages.Server , error ) {
59
+ return []packages.Server {f .pkg }, f .err
60
60
}
61
61
62
62
func (f * fakeRegistry ) ID () string {
@@ -74,7 +74,7 @@ func (f *fakeBuilder) Build() (registry.PackageProvider, error) {
74
74
75
75
func TestAddCmd_Success (t * testing.T ) {
76
76
cfg := & fakeConfig {}
77
- pkg := packages.Package {
77
+ pkg := packages.Server {
78
78
ID : "server1" ,
79
79
Name : "Server1" ,
80
80
Tools : []packages.Tool {
@@ -83,7 +83,7 @@ func TestAddCmd_Success(t *testing.T) {
83
83
},
84
84
Installations : map [runtime.Runtime ]packages.Installation {
85
85
runtime .UVX : {
86
- Command : "uvx" ,
86
+ Runtime : "uvx" ,
87
87
Package : "mcp-server-1" ,
88
88
Version : "1.2.3" ,
89
89
Recommended : true ,
@@ -141,7 +141,7 @@ func TestAddCmd_RegistryFails(t *testing.T) {
141
141
func TestAddCmd_BasicServerAdd (t * testing.T ) {
142
142
o := & bytes.Buffer {}
143
143
144
- pkg := packages.Package {
144
+ pkg := packages.Server {
145
145
ID : "testserver" ,
146
146
Name : "testserver" ,
147
147
Tools : []packages.Tool {
@@ -151,7 +151,7 @@ func TestAddCmd_BasicServerAdd(t *testing.T) {
151
151
},
152
152
Installations : map [runtime.Runtime ]packages.Installation {
153
153
"uvx" : {
154
- Command : "uvx" ,
154
+ Runtime : "uvx" ,
155
155
Package : "mcp-server-testserver" ,
156
156
Version : "latest" ,
157
157
Recommended : true ,
@@ -192,14 +192,14 @@ func TestAddCmd_ServerWithArguments(t *testing.T) {
192
192
193
193
tests := []struct {
194
194
name string
195
- pkg packages.Package
195
+ pkg packages.Server
196
196
expectedRequiredEnvs []string
197
197
expectedRequiredValues []string
198
198
expectedRequiredBools []string
199
199
}{
200
200
{
201
201
name : "server with all argument types" ,
202
- pkg : packages.Package {
202
+ pkg : packages.Server {
203
203
ID : "github-server" ,
204
204
Name : "GitHub Server" ,
205
205
Tools : []packages.Tool {
@@ -208,7 +208,7 @@ func TestAddCmd_ServerWithArguments(t *testing.T) {
208
208
},
209
209
Installations : map [runtime.Runtime ]packages.Installation {
210
210
runtime .UVX : {
211
- Command : "uvx" ,
211
+ Runtime : "uvx" ,
212
212
Package : "mcp-server-github" ,
213
213
Version : "1.0.0" ,
214
214
Recommended : true ,
@@ -229,15 +229,15 @@ func TestAddCmd_ServerWithArguments(t *testing.T) {
229
229
},
230
230
{
231
231
name : "server with only env vars" ,
232
- pkg : packages.Package {
232
+ pkg : packages.Server {
233
233
ID : "db-server" ,
234
234
Name : "Database Server" ,
235
235
Tools : []packages.Tool {
236
236
{Name : "query" },
237
237
},
238
238
Installations : map [runtime.Runtime ]packages.Installation {
239
239
runtime .UVX : {
240
- Command : "uvx" ,
240
+ Runtime : "uvx" ,
241
241
Package : "mcp-server-db" ,
242
242
Version : "2.0.0" ,
243
243
Recommended : true ,
@@ -254,15 +254,15 @@ func TestAddCmd_ServerWithArguments(t *testing.T) {
254
254
},
255
255
{
256
256
name : "server with mixed value and bool args" ,
257
- pkg : packages.Package {
257
+ pkg : packages.Server {
258
258
ID : "api-server" ,
259
259
Name : "API Server" ,
260
260
Tools : []packages.Tool {
261
261
{Name : "call_api" },
262
262
},
263
263
Installations : map [runtime.Runtime ]packages.Installation {
264
264
runtime .UVX : {
265
- Command : "uvx" ,
265
+ Runtime : "uvx" ,
266
266
Package : "mcp-server-api" ,
267
267
Version : "3.0.0" ,
268
268
Recommended : true ,
@@ -281,15 +281,15 @@ func TestAddCmd_ServerWithArguments(t *testing.T) {
281
281
},
282
282
{
283
283
name : "server with no required arguments" ,
284
- pkg : packages.Package {
284
+ pkg : packages.Server {
285
285
ID : "simple-server" ,
286
286
Name : "Simple Server" ,
287
287
Tools : []packages.Tool {
288
288
{Name : "hello" },
289
289
},
290
290
Installations : map [runtime.Runtime ]packages.Installation {
291
291
runtime .UVX : {
292
- Command : "uvx" ,
292
+ Runtime : "uvx" ,
293
293
Package : "mcp-server-simple" ,
294
294
Version : "1.0.0" ,
295
295
Recommended : true ,
@@ -618,7 +618,7 @@ func TestParseServerEntry(t *testing.T) {
618
618
tools [i ] = packages.Tool {Name : tool }
619
619
}
620
620
621
- pkg := packages.Package {
621
+ pkg := packages.Server {
622
622
ID : tc .pkgID ,
623
623
Name : tc .pkgName ,
624
624
Tools : tools ,
0 commit comments