MCPcopy Index your code
hub / github.com/coder/coder / newMCPClient

Function newMCPClient

coderd/mcp_test.go:30–38  ·  view source on GitHub ↗

newMCPClient creates a test server and returns the admin client.

(t testing.TB)

Source from the content-addressed store, hash-verified

28
29// newMCPClient creates a test server and returns the admin client.
30func newMCPClient(t testing.TB) *codersdk.Client {
31 t.Helper()
32
33 providerKeys := coderdtest.FakeOpenAICompatProviderAPIKeys(t)
34 return coderdtest.New(t, &coderdtest.Options{
35 DeploymentValues: mcpDeploymentValues(t),
36 ChatProviderAPIKeys: &providerKeys,
37 })
38}
39
40// createMCPServerConfig is a helper that creates a minimal enabled
41// MCP server config with auth_type=none.

Calls 4

NewFunction · 0.92
mcpDeploymentValuesFunction · 0.85
HelperMethod · 0.65

Tested by

no test coverage detected