server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CommandsDir    string
	ProjectDocsDir string
	ProjectRootDir string
	ExcludeDirs    []string
	MaxFileSize    int64
	ServerName     string
	Version        string
	CacheTTL       time.Duration
}

Config defines server configuration

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the configuration is valid

type DocInfo

type DocInfo struct {
	Name        string   `json:"name"`
	Filename    string   `json:"filename"`
	Source      string   `json:"source"`
	Size        int64    `json:"size,omitempty"`
	TooLarge    bool     `json:"too_large,omitempty"`
	Description string   `json:"description,omitempty"`
	Tags        []string `json:"tags,omitempty"`
}

DocInfo represents information about a documentation file

type ListOutput

type ListOutput struct {
	Docs  []DocInfo `json:"docs"`
	Total int       `json:"total"`
}

ListOutput contains the result of listing all documentation files

type ReadInput

type ReadInput struct {
	Path   string  `json:"path"`
	Source *string `json:"source,omitempty"`
}

ReadInput represents input for reading a documentation file

type ReadOutput

type ReadOutput struct {
	Path    string `json:"path"`
	Content string `json:"content"`
	Size    int    `json:"size"`
	Source  string `json:"source"`
}

ReadOutput contains the result of reading a documentation file

type SearchInput

type SearchInput struct {
	Query string `json:"query"`
}

SearchInput represents input for searching documentation

type SearchMatch

type SearchMatch struct {
	Path   string  `json:"path"`
	Name   string  `json:"name"`
	Score  float64 `json:"score"`
	Source string  `json:"source"`
}

SearchMatch represents a single search result

type SearchOutput

type SearchOutput struct {
	Results []SearchMatch `json:"results"`
	Total   int           `json:"total"`
}

SearchOutput contains search results

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents the MCP server instance

func New

func New(config Config) (*Server, error)

New creates a new MCP server instance

func (*Server) Close

func (s *Server) Close() error

Close cleans up server resources

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run starts the MCP server with stdio transport

Jump to

Keyboard shortcuts

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