mcpserver

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mcpserver exposes MemSpace to agents over MCP (streamable HTTP). Tools are thin adapters over the same business packages as the REST API (search, sessions, contextpack), so they apply the same owner and scope rules. All tool output is historical data, never instructions.

Index

Constants

View Source
const Version = "0.1.0"

Version is reported to MCP clients.

Variables

This section is empty.

Functions

func Handler

func Handler(db *sql.DB, owner string) http.Handler

Handler returns the MCP endpoint. Requests must carry a device token or the device's read-only MCP token.

Types

type GetMemoryArgs

type GetMemoryArgs struct {
	Ref string `json:"ref" jsonschema:"a ref (event id) or session id from another MemSpace tool"`
}

type HistoryArgs

type HistoryArgs struct {
	ProjectArgs
	Agent string `json:"agent,omitempty" jsonschema:"filter by agent: claude-code or codex"`
	Limit int    `json:"limit,omitempty" jsonschema:"maximum sessions (default 10, max 50)"`
}

type ProjectArgs

type ProjectArgs struct {
	Cwd     string `json:"cwd,omitempty" jsonschema:"the agent's current working directory, used to identify the project"`
	Project string `json:"project,omitempty" jsonschema:"project name or normalized git remote (e.g. github.com/org/repo); alternative to cwd"`
}

ProjectArgs identify the project for a tool call.

type ProjectContextArgs

type ProjectContextArgs struct {
	ProjectArgs
	Query string `json:"query,omitempty" jsonschema:"what you are about to work on; adds related history"`
}

type ResumeArgs

type ResumeArgs struct {
	ProjectArgs
	SessionID string `json:"session_id,omitempty" jsonschema:"session to resume; default: most recent session in the project"`
}

type SearchArgs

type SearchArgs struct {
	ProjectArgs
	Query string   `json:"query" jsonschema:"what to search for, in any language"`
	Scope string   `json:"scope,omitempty" jsonschema:"current_project (default) or all_projects"`
	Kinds []string `json:"kinds,omitempty" jsonschema:"restrict to: prompt, reply, failure, command, change, summary"`
	Limit int      `json:"limit,omitempty" jsonschema:"maximum results (default 10, max 50)"`
}

Jump to

Keyboard shortcuts

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