mcpserver

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package mcpserver exposes the shared-context ledger as MCP tools over Streamable HTTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(configPath string)

Init loads config and opens the store. Call once before RegisterTools/NewHTTPHandler. It panics on unrecoverable init failure (per repo init contract).

func NewHTTPHandler

func NewHTTPHandler(auditWriter io.Writer) http.Handler

NewHTTPHandler builds a standalone Streamable HTTP handler with its own MCP server.

func RegisterTools

func RegisterTools(server *mcp.Server, auditWriter io.Writer)

RegisterTools registers the 7 ctx_* tools onto an existing MCP server (embed API). auditWriter receives JSON audit log entries; nil discards them (e.g. when the host already logs tool calls).

func SetToolDescriptions

func SetToolDescriptions(over map[string]string)

SetToolDescriptions overrides tool descriptions (programmatic > default).

func Store

func Store() store.Store

Store returns the initialized store (used by main for the retention GC).

Types

This section is empty.

Jump to

Keyboard shortcuts

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