mcp

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MCPError

type MCPError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

MCPError represents an error in the MCP protocol

type MCPRequest

type MCPRequest struct {
	Method string          `json:"method"`
	Params json.RawMessage `json:"params,omitempty"`
	ID     *int            `json:"id,omitempty"`
}

MCPRequest represents a request from the MCP client

type MCPResponse

type MCPResponse struct {
	Result json.RawMessage `json:"result,omitempty"`
	Error  *MCPError       `json:"error,omitempty"`
	ID     *int            `json:"id"`
}

MCPResponse represents a response to the MCP client

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements the Model Context Protocol server

func NewServer

func NewServer(a *app.App) *Server

NewServer creates a new MCP server

func (*Server) Close

func (s *Server) Close()

Close gracefully shuts down the MCP server and its resources.

func (*Server) Start

func (s *Server) Start() error

Start starts the MCP server using stdin/stdout

Jump to

Keyboard shortcuts

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