Documentation
¶
Overview ¶
Package mcphttp provides an HTTP-based MCP server for tool execution. This package is kept separate to avoid import cycles with internal/llm.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseMCPToolName ¶
ParseMCPToolName extracts the original tool name from an MCP-namespaced name. MCP tools from term-llm are namespaced as "mcp__term-llm__<tool>".
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server runs an MCP server over HTTP with token-based authentication. It exposes tools to Claude CLI and executes them using the provided executor.
func NewServer ¶
func NewServer(executor ToolExecutor) *Server
NewServer creates a new HTTP MCP server. The executor function is called to execute tool calls.
func (*Server) Start ¶
Start starts the HTTP server on a random available port. Returns the server URL and auth token for connecting.
type ToolExecutor ¶
ToolExecutor is a function that executes a tool and returns the result.