Documentation
¶
Overview ¶
@index Shared MCP runtime assembly for stdio and HTTP server entry points.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlushQueryCache ¶
FlushQueryCache clears the MCP query cache if it exists. @intent let graph updates invalidate shared MCP cache without coupling to transport packages. @sideEffect cache가 있으면 저장된 질의 결과를 비운다.
func RunStdio ¶
func RunStdio(components Components, opts Options) error
RunStdio assembles and serves MCP over stdio. @intent keep the local ccg binary on a stdio-only runtime without importing HTTP/webhook server code. @sideEffect starts a long-running stdio MCP process and handles SIGINT/SIGTERM shutdown.
Types ¶
type Components ¶
type Components struct {
Logger *slog.Logger
Store *graphgorm.Store
UnitOfWork ingest.UnitOfWork
Search ingest.SearchWriter
SearchMaintenance document.Maintenance
SearchReader *searchsql.Reader
Walkers map[string]*treesitter.Walker
Syncer *incremental.Syncer
}
Components is the runtime-owned application and adapter set required to assemble MCP. @intent share one MCP assembly path without making the MCP runtime import its parent composition package.
type Instance ¶
type Instance struct {
Server *mcpgo.MCPServer
Cache *mcp.Cache
Deps *mcp.Deps
// contains filtered or unexported fields
}
Instance is a fully assembled MCP server plus runtime resources. @intent share MCP server construction while keeping stdio and HTTP transports in separate packages.
type Options ¶
type Options struct {
CacheTTL time.Duration
NoCache bool
OTELEndpoint string
NamespaceRoot string
RepoRoot string
MaxFileBytes int64
MaxTotalParsedBytes int64
ServiceVersion string
RagIndexDir string
RagProjectDesc string
}
Options controls shared MCP runtime setup independent of transport. @intent pass cache, telemetry, namespace, RAG, and parse-limit settings without importing HTTP server code.