Documentation
¶
Overview ¶
Package mcp 提供 MCP (Model Context Protocol) 的稳定导入路径。
本包从 agent/protocol/mcp 重导出核心类型和构造器, 为上层调用方提供简洁的 API 入口。
Index ¶
- Constants
- func NewMCPClient(reader io.Reader, writer io.Writer, logger *zap.Logger) *proto.DefaultMCPClient
- func NewMCPError(id any, code int, message string, data any) *proto.MCPMessage
- func NewMCPRequest(id any, method string, params map[string]any) *proto.MCPMessage
- func NewMCPResponse(id any, result any) *proto.MCPMessage
- func NewMCPServer(name, version string, logger *zap.Logger) *proto.DefaultMCPServer
- type DefaultMCPClient
- type DefaultMCPServer
- type MCPMessage
- type PromptTemplate
- type Resource
- type ServerCapabilities
- type ServerInfo
- type ToolCall
- type ToolDefinition
- type ToolHandler
Constants ¶
View Source
const MCPVersion = proto.MCPVersion
Variables ¶
This section is empty.
Functions ¶
func NewMCPClient ¶
func NewMCPError ¶
func NewMCPRequest ¶
func NewMCPResponse ¶
func NewMCPResponse(id any, result any) *proto.MCPMessage
func NewMCPServer ¶
func NewMCPServer(name, version string, logger *zap.Logger) *proto.DefaultMCPServer
Types ¶
type DefaultMCPClient ¶
type DefaultMCPClient = proto.DefaultMCPClient
type DefaultMCPServer ¶
type DefaultMCPServer = proto.DefaultMCPServer
type MCPMessage ¶
type MCPMessage = proto.MCPMessage
type PromptTemplate ¶
type PromptTemplate = proto.PromptTemplate
type ServerCapabilities ¶
type ServerCapabilities = proto.ServerCapabilities
type ServerInfo ¶
type ServerInfo = proto.ServerInfo
type ToolDefinition ¶
type ToolDefinition = proto.ToolDefinition
type ToolHandler ¶
type ToolHandler = proto.ToolHandler
Click to show internal directories.
Click to hide internal directories.