Help us shape the future of Go! Take the 2026 Go Developer Survey

mcptest

package
v0.4.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package mcptest builds the stdio MCP test server and returns a tool/mcp provider for smoke tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(t *testing.T, newProvider func(configPath, workspaceRoot string) (agentkit.ToolProvider, error)) (agentkit.ToolProvider, string)

NewProvider wires an MCP tool provider against a temp mcp.json that launches the test stdio server. newProvider builds the plugin provider from the generated config path and the workspace root dir; mcptest stays plugin-agnostic, callers inject the tool/mcp constructor. The returned root is the MCP server's allowed filesystem root.

func ServerBinaryAndRoot

func ServerBinaryAndRoot(t *testing.T) (bin string, root string)

ServerBinaryAndRoot returns the built test MCP server binary and a fresh allowed root directory.

func ToolBySuffix

func ToolBySuffix(t *testing.T, tools []agentkit.Tool, suffix string) agentkit.Tool

ToolBySuffix returns the first tool whose name ends with suffix.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL