mcp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(projectDir string) *server.MCPServer

NewServer creates and configures the Catuaba MCP server with all resources and tools.

func Serve

func Serve(projectDir string) error

Serve starts the MCP server on stdio transport.

Types

type Cache

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

Cache provides in-memory caching with file mod-time invalidation.

func NewCache

func NewCache() *Cache

NewCache creates a new Cache instance.

func (*Cache) Get

func (c *Cache) Get(key string, filePaths ...string) (any, bool)

Get retrieves a cached value if the file hasn't been modified since caching. Returns (value, true) on hit, (nil, false) on miss or stale.

func (*Cache) Invalidate

func (c *Cache) Invalidate(key string)

Invalidate removes a specific key from the cache.

func (*Cache) InvalidateAll

func (c *Cache) InvalidateAll()

InvalidateAll clears the entire cache.

func (*Cache) Set

func (c *Cache) Set(key string, value any)

Set stores a value in the cache with the current timestamp.

type CacheEntry

type CacheEntry struct {
	Value   any
	ModTime time.Time
}

CacheEntry stores a cached value along with the file mod time used to validate it.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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