mcpserver

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package mcpserver builds the Model Context Protocol surface akari exposes to coding agents. It mirrors what the web UI shows (the overview analytics, the projects index, the session feed, a session's full transcript) and adds the raw underlying data the UI reaches for on demand (tool-call bodies from the CAS, and the lossless bytes a session was ingested from). One write tool, assign_session_project, pins an orphaned session onto a known project.

The server is transport-agnostic: this package only registers tools against an *mcp.Server. The HTTP wiring (the Streamable-HTTP handler and the OAuth bearer check that names the calling user) lives in package httpapi, which owns the store and the request lifecycle.

Index

Constants

View Source
const DefaultResponseBudgetBytes = 8 << 20

DefaultResponseBudgetBytes is the encoded CallToolResult ceiling. Eight MiB leaves room under common 16 MiB proxy limits for JSON-RPC and transport framing while still carrying roughly a million worst-case escaped text bytes per page.

Variables

This section is empty.

Functions

func New

func New(st *store.Store, opts Options) *mcp.Server

Types

type Options added in v0.5.5

type Options struct {
	ResponseBudgetBytes int
}

New builds an MCP server with every akari tool registered against st. The returned server is safe to hand to a Streamable-HTTP handler for every session; the per-request user is carried on each call's bearer token, not on the server.

Jump to

Keyboard shortcuts

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