Documentation
¶
Overview ¶
Package mcp implements the MCP (Model Context Protocol) stdio transport. It serves spec context and tools to MCP-compatible coding agents over JSON-RPC 2.0 on stdin/stdout.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GenericHandler ¶
type GenericHandler struct {
// contains filtered or unexported fields
}
GenericHandler provides spec resources and tools without requiring a build session. It serves as the default MCP handler, providing access to specs, pipeline info, and common operations.
func NewGenericHandler ¶
func NewGenericHandler(cfg *config.ResolvedConfig, specsDir string) *GenericHandler
NewGenericHandler creates a handler that serves generic spec resources.
func (*GenericHandler) CallTool ¶
func (h *GenericHandler) CallTool(name string, args json.RawMessage) (*ToolResult, error)
CallTool executes a tool.
func (*GenericHandler) GetResource ¶
func (h *GenericHandler) GetResource(uri string) (*Resource, error)
GetResource returns a specific resource by URI.
func (*GenericHandler) ListResources ¶
func (h *GenericHandler) ListResources() []Resource
ListResources returns available resources.
func (*GenericHandler) ListTools ¶
func (h *GenericHandler) ListTools() []Tool
ListTools returns available tools.
type Handler ¶
type Handler interface {
ListResources() []Resource
GetResource(uri string) (*Resource, error)
ListTools() []Tool
CallTool(name string, args json.RawMessage) (*ToolResult, error)
}
Handler defines the domain operations the MCP server delegates to. Implemented by a thin adapter over build.MCPServer in cmd/.
type ToolResult ¶
ToolResult represents the outcome of a tool call.