mcpserver

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package mcpserver exposes Denkeeper as an HTTP-facing MCP server at /api/v1/mcp. External MCP clients (Claude Code, other AI tools) connect via Streamable HTTP or SSE transport to interact with agents, skills, schedules, and other Denkeeper state.

This differs from configmcp and webmcp which are in-process MCP servers using in-memory transports for per-agent tool access.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Dispatcher      *agent.Dispatcher
	Scheduler       ScheduleManager
	CostTracker     *llm.CostTracker
	Memory          agent.MemoryStore
	Config          *config.Config
	Approvals       *approval.Manager
	LifecycleMgr    *tool.LifecycleManager
	KeyStore        *api.KeyStore
	TOMLKeys        []config.APIKeyConfig
	KVStore         kv.Store
	ChannelResolver configmcp.ChannelResolver
	Auditor         audit.Emitter
	ConfigPath      string
	Version         string
	Logger          *slog.Logger
}

Deps holds the application dependencies the MCP server needs.

type ScheduleManager

type ScheduleManager interface {
	AgentEntries() []scheduler.Entry
	RegisterAndStart(cfg scheduler.Config, job scheduler.JobFunc) error
	GetEntry(name string) (scheduler.Entry, bool)
	Unregister(name string) error
}

ScheduleManager is the subset of scheduler.Scheduler used by the MCP server. Using an interface allows tests to inject failures.

type Server

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

Server is the HTTP-facing MCP server that exposes Denkeeper tools to external MCP clients via Streamable HTTP or SSE transport.

func New

func New(cfg config.APIMCPServerConfig, deps Deps) *Server

New creates the MCP server and registers all tools. The returned server is not yet listening; call Handler() to get the http.Handler to mount.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns an http.Handler that serves MCP over the configured transport, with Bearer token auth middleware.

Jump to

Keyboard shortcuts

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