server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package server builds the brainjar MCP server. It's transport-agnostic: the same *mcp.Server is served over stdio (brainjar mcp) or Streamable HTTP (mounted on brainjar serve). All tools share the app layer with the HTTP handlers — no duplicated business logic.

Index

Constants

View Source
const Version = "0.3.0"

Version is the MCP server's advertised version. Matches the CLI release; hardcoded until goreleaser injects it at build time.

Variables

This section is empty.

Functions

func Build

func Build(deps Deps) *mcp.Server

Build constructs a fresh *mcp.Server wired with every brainjar tool. Callers run it on a transport (stdio, Streamable HTTP, in-memory).

Types

type Deps

type Deps struct {
	Workspace models.WorkspaceID

	Souls    tools.SoulApp
	Personas tools.PersonaApp
	Rules    tools.RuleApp
	Brains   tools.BrainApp
	State    tools.StateApp
	Compose  tools.ComposeApp
}

Deps groups the app handles a tool needs. Each tool receives only the apps it actually uses so subpackage tests can stub narrowly.

func FromApps

FromApps packs the subset of a backend's apps that the MCP server tools depend on.

Jump to

Keyboard shortcuts

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