mcpserver

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package mcpserver implements an MCP (Model Context Protocol) server that exposes stringer's core operations as tools over stdio transport.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) *mcp.Server

New creates a new MCP server with stringer's tools registered.

func Run

func Run(ctx context.Context, version string, transport mcp.Transport) error

Run creates an MCP server and runs it on the given transport. It blocks until the client disconnects or the context is cancelled.

Types

type ContextInput

type ContextInput struct {
	Path   string `json:"path" jsonschema:"Repository path to analyze (defaults to current directory)"`
	Weeks  int    `json:"weeks,omitempty" jsonschema:"Weeks of git history to include (default: 4)"`
	Format string `json:"format,omitempty" jsonschema:"Output format: json or markdown (default: json)"`
}

ContextInput is the input schema for the stringer context MCP tool.

type DocsInput

type DocsInput struct {
	Path   string `json:"path" jsonschema:"Repository path to analyze (defaults to current directory)"`
	Update bool   `json:"update,omitempty" jsonschema:"Update existing AGENTS.md preserving manual sections"`
}

DocsInput is the input schema for the stringer docs MCP tool.

type PathInfo

type PathInfo struct {
	// AbsPath is the absolute, symlink-resolved path.
	AbsPath string
	// GitRoot is the .git root, which may differ from AbsPath for subdirectories.
	GitRoot string
}

PathInfo holds the resolved path information for a repository.

func ResolvePath

func ResolvePath(path string) (*PathInfo, error)

ResolvePath resolves a repository path to an absolute path with git root detection. It returns an error if the path does not exist or is not a directory.

type ReportInput

type ReportInput struct {
	Path       string `json:"path" jsonschema:"Repository path to analyze (defaults to current directory)"`
	Collectors string `json:"collectors,omitempty" jsonschema:"Comma-separated list of collectors to run (default: all)"`
	Sections   string `json:"sections,omitempty" jsonschema:"Comma-separated list of report sections to include"`
	GitDepth   int    `json:"git_depth,omitempty" jsonschema:"Max commits to examine (default 1000)"`
	GitSince   string `json:"git_since,omitempty" jsonschema:"Only examine commits after this duration (e.g. 90d, 6m, 1y)"`
}

ReportInput is the input schema for the stringer report MCP tool.

type ScanInput

type ScanInput struct {
	Path          string  `json:"path" jsonschema:"Repository path to scan (defaults to current directory)"`
	Collectors    string  `json:"collectors,omitempty" jsonschema:"Comma-separated list of collectors to run (default: all)"`
	Format        string  `json:"format,omitempty" jsonschema:"Output format: json, beads, markdown, tasks (default: json)"`
	MaxIssues     int     `json:"max_issues,omitempty" jsonschema:"Cap output count (0 = unlimited)"`
	MinConfidence float64 `json:"min_confidence,omitempty" jsonschema:"Filter signals below this confidence threshold (0.0-1.0)"`
	Kind          string  `json:"kind,omitempty" jsonschema:"Filter signals by kind (comma-separated)"`
	GitDepth      int     `json:"git_depth,omitempty" jsonschema:"Max commits to examine (default 1000)"`
	GitSince      string  `json:"git_since,omitempty" jsonschema:"Only examine commits after this duration (e.g. 90d, 6m, 1y)"`
}

ScanInput is the input schema for the stringer scan MCP tool.

Jump to

Keyboard shortcuts

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