server

package
v0.0.1-alpha.1 Latest Latest
Warning

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

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

Documentation

Overview

Package server adapts the transport-independent groundstrike engine to MCP over Streamable HTTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(engine Engine, options Options) (http.Handler, error)

func SetBuildMetadata

func SetBuildMetadata(info BuildMetadata)

SetBuildMetadata updates the About contract for /about responses.

Types

type BuildMetadata

type BuildMetadata struct {
	Name      string `json:"name"`
	Version   string `json:"version"`
	Revision  string `json:"revision"`
	SourceURL string `json:"source_url"`
}

type Options

type Options struct {
	// TrustedHosts adds exact hostnames or IP addresses accepted by the MCP
	// endpoint. Loopback IP addresses and localhost are always trusted.
	TrustedHosts []string
}

Options configures the HTTP security boundary.

type OutlineInput

type OutlineInput struct {
	Path string `json:"path" jsonschema:"root-relative source file path"`
}

type OutlineOutput

type OutlineOutput struct {
	Symbols []groundstrike.Symbol `json:"symbols"`
}

type SearchInput

type SearchInput struct {
	Text       string `json:"text" jsonschema:"lexical query text"`
	PathPrefix string `json:"path_prefix,omitempty" jsonschema:"optional root-relative path prefix"`
	Limit      int    `json:"limit,omitempty" jsonschema:"maximum number of results"`
}

type SearchOutput

type SearchOutput struct {
	Hits []groundstrike.SearchHit `json:"hits"`
}

Jump to

Keyboard shortcuts

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