package
Version:
v0.7.1
Opens a new window with list of versions in this module.
Published: May 5, 2025
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package mock provides a simple implementation of an MCP server for testing.
RunMockServer creates and runs a mock MCP server with the specified entities.
Prompt represents a mock prompt in the MCP protocol.
Resource represents a mock resource in the MCP protocol.
Server is a mock MCP server that responds to JSON-RPC requests.
NewServer creates a new mock MCP server.
func (s *Server) AddPrompt(name, description, template string)
AddPrompt adds a new prompt to the mock server.
func (s *Server) AddResource(uri, description, content string)
AddResource adds a new resource to the mock server.
AddTool adds a new tool to the mock server.
Close closes the log file.
Start begins listening for JSON-RPC requests on stdin and responding on stdout.
Tool represents a mock tool in the MCP protocol.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.