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

Method ResolvePath

internal/mcp/client.go:77–92  ·  view source on GitHub ↗

ResolvePath returns the absolute config file path for the given client + scope, honoring ~ and the current working directory.

(scope Scope)

Source from the content-addressed store, hash-verified

75// ResolvePath returns the absolute config file path for the given client +
76// scope, honoring ~ and the current working directory.
77func (c ClientSpec) ResolvePath(scope Scope) string {
78 switch scope {
79 case UserScope:
80 return pathutil.Expand(c.UserPath)
81 case ProjectScope:
82 if c.ProjectPath == "" {
83 return ""
84 }
85 if filepath.IsAbs(c.ProjectPath) {
86 return c.ProjectPath
87 }
88 wd, _ := os.Getwd()
89 return filepath.Join(wd, c.ProjectPath)
90 }
91 return ""
92}
93
94// Server is the canonical CAM-side representation of an installed MCP server.
95type Server struct {

Callers 3

AddServerFunction · 0.80
RemoveServerFunction · 0.80
ListServersFunction · 0.80

Calls 1

ExpandFunction · 0.92

Tested by

no test coverage detected