mcp

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package mcp provides the MCP server and tool handlers for git-courer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OllamaLifecycle

type OllamaLifecycle interface {
	EnsureOllama() (bool, error)
	PreWarm() error
	Stop()
}

OllamaLifecycle abstracts Ollama runtime operations (start, stop, pre-warm).

type Server

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

Server holds the MCP server and all injected dependencies.

func New

func New(cfg *config.Config, git ports.Git, llm ports.LLM, ollamaLifecycle OllamaLifecycle) *Server

New creates and wires up the MCP server with all its dependencies.

func ServeWithAdapter

func ServeWithAdapter(cfg *config.Config, git ports.Git, llm ports.LLM, ollamaLifecycle OllamaLifecycle) *Server

ServeWithAdapter wires everything together and starts serving asynchronously.

func (*Server) Serve

func (s *Server) Serve()

Serve starts the MCP server on stdin/stdout.

func (*Server) SetClientInfo

func (s *Server) SetClientInfo(info *domain.ClientInfo, caps *domain.ClientCapabilities)

SetClientInfo stores client information captured during the MCP initialize handshake.

func (*Server) Stop

func (s *Server) Stop(ollamaLifecycle OllamaLifecycle)

Stop stops Ollama if we started it.

Jump to

Keyboard shortcuts

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