Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Server)
Option configures an MCP Server at construction time.
func WithVectorIndexes ¶
func WithVectorIndexes(vi VectorIndexResolver) Option
WithVectorIndexes wires a per-project HNSW index cache into the MCP search tools. Nil (the default) makes LocalSearch fall back to brute-force inside the search package.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps the MCP server.
func New ¶
func New(stores Storer, prov llm.Provider, emb *embedder.Embedder, cfg *config.Config, registry *project.Registry, opts ...Option) *Server
New creates and registers all docs + notes MCP tools.
Wave-2 signature change: drops the long-lived *store.Store — the MCP layer now resolves a per-project store on every tool invocation via Storer.ForProject(slug). Passing nil for stores yields an error on any doc-tool call (notes tools still work if they only need cfg).
type Storer ¶
Storer is the narrow contract the MCP server uses to obtain a per-project *store.Store on every tool invocation. It mirrors the REST-side api.Storer so the same cache can be injected into both.
type VectorIndexResolver ¶
type VectorIndexResolver interface {
ForProject(slug string, st *store.Store) vectorindex.Index
}
VectorIndexResolver returns the per-project HNSW index (or nil if unavailable / brute-force). Implementations must be safe for concurrent use. *api.VectorIndexes satisfies this — but the mcp package can't import api, so the resolver is declared as an interface here.