MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / serverToMap

Function serverToMap

internal/mcp/client.go:191–209  ·  view source on GitHub ↗
(server Server)

Source from the content-addressed store, hash-verified

189}
190
191func serverToMap(server Server) map[string]any {
192 out := map[string]any{}
193 if server.Type != "" {
194 out["type"] = server.Type
195 }
196 if server.URL != "" {
197 out["url"] = server.URL
198 }
199 if server.Command != "" {
200 out["command"] = server.Command
201 }
202 if len(server.Args) > 0 {
203 out["args"] = server.Args
204 }
205 if len(server.Env) > 0 {
206 out["env"] = server.Env
207 }
208 return out
209}
210
211func mapToServer(name string, raw map[string]any) Server {
212 s := Server{Name: name}

Callers 1

AddServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected