mcpfake

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModeFromArgs

func ModeFromArgs() string

func Serve

func Serve(mode string, handler func(string, Request) (*Response, bool))

func Server

func Server(t interface{ Helper() }, name string, mode string) askconfig.MCPServer

func StringArg

func StringArg(args map[string]any, key string) string

func ToolCall

func ToolCall(req Request) (string, map[string]any)

Types

type Request

type Request struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      *mcp.RequestId  `json:"id,omitempty"`
	Method  string          `json:"method"`
	Params  json.RawMessage `json:"params,omitempty"`
}

type Response

type Response struct {
	JSONRPC string         `json:"jsonrpc"`
	ID      *mcp.RequestId `json:"id,omitempty"`
	Result  any            `json:"result,omitempty"`
}

Jump to

Keyboard shortcuts

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