mcp

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: EUPL-1.2 Imports: 6 Imported by: 0

Documentation

Overview

Package mcp provides a lightweight MCP (Model Context Protocol) server for CLI use. For full GUI integration (display, webview, process management), see core-gui/pkg/mcp.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDirectoryInput

type CreateDirectoryInput struct {
	Path string `json:"path"`
}

type CreateDirectoryOutput

type CreateDirectoryOutput struct {
	Success bool   `json:"success"`
	Path    string `json:"path"`
}

type DeleteFileInput

type DeleteFileInput struct {
	Path string `json:"path"`
}

type DeleteFileOutput

type DeleteFileOutput struct {
	Success bool   `json:"success"`
	Path    string `json:"path"`
}

type DetectLanguageInput

type DetectLanguageInput struct {
	Path string `json:"path"`
}

type DetectLanguageOutput

type DetectLanguageOutput struct {
	Language string `json:"language"`
	Path     string `json:"path"`
}

type DirectoryEntry

type DirectoryEntry struct {
	Name  string `json:"name"`
	Path  string `json:"path"`
	IsDir bool   `json:"isDir"`
	Size  int64  `json:"size"`
}

type EditDiffInput

type EditDiffInput struct {
	Path       string `json:"path"`
	OldString  string `json:"old_string"`
	NewString  string `json:"new_string"`
	ReplaceAll bool   `json:"replace_all,omitempty"`
}

type EditDiffOutput

type EditDiffOutput struct {
	Path         string `json:"path"`
	Success      bool   `json:"success"`
	Replacements int    `json:"replacements"`
}

type FileExistsInput

type FileExistsInput struct {
	Path string `json:"path"`
}

type FileExistsOutput

type FileExistsOutput struct {
	Exists bool   `json:"exists"`
	IsDir  bool   `json:"isDir"`
	Path   string `json:"path"`
}

type GetSupportedLanguagesInput

type GetSupportedLanguagesInput struct{}

type GetSupportedLanguagesOutput

type GetSupportedLanguagesOutput struct {
	Languages []LanguageInfo `json:"languages"`
}

type LanguageInfo

type LanguageInfo struct {
	ID         string   `json:"id"`
	Name       string   `json:"name"`
	Extensions []string `json:"extensions"`
}

type ListDirectoryInput

type ListDirectoryInput struct {
	Path string `json:"path"`
}

type ListDirectoryOutput

type ListDirectoryOutput struct {
	Entries []DirectoryEntry `json:"entries"`
	Path    string           `json:"path"`
}

type ReadFileInput

type ReadFileInput struct {
	Path string `json:"path"`
}

type ReadFileOutput

type ReadFileOutput struct {
	Content  string `json:"content"`
	Language string `json:"language"`
	Path     string `json:"path"`
}

type RenameFileInput

type RenameFileInput struct {
	OldPath string `json:"oldPath"`
	NewPath string `json:"newPath"`
}

type RenameFileOutput

type RenameFileOutput struct {
	Success bool   `json:"success"`
	OldPath string `json:"oldPath"`
	NewPath string `json:"newPath"`
}

type Service

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

Service provides a lightweight MCP server with file operations only. For full GUI features, use the core-gui package.

func New

func New() *Service

New creates a new MCP service with file operations.

func (*Service) Run

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

Run starts the MCP server on stdio.

func (*Service) Server

func (s *Service) Server() *mcp.Server

Server returns the underlying MCP server for advanced configuration.

type WriteFileInput

type WriteFileInput struct {
	Path    string `json:"path"`
	Content string `json:"content"`
}

type WriteFileOutput

type WriteFileOutput struct {
	Success bool   `json:"success"`
	Path    string `json:"path"`
}

Jump to

Keyboard shortcuts

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