MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / New

Function New

pkg/mcp/server.go:34–43  ·  view source on GitHub ↗

New creates a Server with all 7 GoSQLX tools registered.

(cfg *Config)

Source from the content-addressed store, hash-verified

32
33// New creates a Server with all 7 GoSQLX tools registered.
34func New(cfg *Config) *Server {
35 s := &Server{cfg: cfg}
36 s.mcpSrv = mcpserver.NewMCPServer(
37 "gosqlx-mcp",
38 "1.14.0",
39 mcpserver.WithToolCapabilities(false),
40 )
41 s.registerTools()
42 return s
43}
44
45// Handler returns the HTTP handler chain (MCP server + auth middleware)
46// without starting an HTTP server. Use this when you need to wrap

Callers 8

newInProcessClientFunction · 0.70
TestNew_CreatesServerFunction · 0.70
TestServer_AuthDisabledFunction · 0.70
TestServer_AuthEnabledFunction · 0.70
newTestHTTPServerFunction · 0.70

Calls 1

registerToolsMethod · 0.95

Tested by 8

newInProcessClientFunction · 0.56
TestNew_CreatesServerFunction · 0.56
TestServer_AuthDisabledFunction · 0.56
TestServer_AuthEnabledFunction · 0.56
newTestHTTPServerFunction · 0.56