mcp

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package mcp provides Model Context Protocol (MCP) server implementations for knife and cutter tools, enabling remote execution of Go static analysis operations through MCP-compatible clients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCutterServer

func NewCutterServer() *mcp.Server

NewCutterServer creates a new MCP server for the cutter tool. The server provides remote access to cutter's Go package type analysis capabilities through the Model Context Protocol, allowing clients to execute cutter commands with template formatting.

func NewKnifeServer

func NewKnifeServer() *mcp.Server

NewKnifeServer creates a new MCP server for the knife tool. The server provides remote access to knife's Go package analysis capabilities through the Model Context Protocol, allowing clients to execute knife commands with template formatting and XPath filtering.

Types

type CutterInput

type CutterInput struct {
	Patterns []string `json:"patterns"`         // Package patterns to analyze (e.g., ["fmt", "net/http"])
	Format   string   `json:"format,omitempty"` // Template string for output formatting
	Data     string   `json:"data,omitempty"`   // Extra data as key:value pairs
}

CutterInput represents the input parameters for the cutter MCP tool. It defines the package patterns to analyze, optional template formatting, and extra data for template evaluation.

type CutterOutput

type CutterOutput struct {
	Result string `json:"result"` // Formatted analysis results
}

CutterOutput represents the output from the cutter MCP tool. It contains the formatted analysis results as a string.

type KnifeInput

type KnifeInput struct {
	Patterns []string `json:"patterns"`         // Package patterns to analyze (e.g., ["fmt", "net/http"])
	Format   string   `json:"format,omitempty"` // Template string for output formatting
	Data     string   `json:"data,omitempty"`   // Extra data as key:value pairs
	XPath    string   `json:"xpath,omitempty"`  // XPath expression for AST node filtering
}

KnifeInput represents the input parameters for the knife MCP tool. It defines the package patterns to analyze, optional template formatting, extra data for template evaluation, and XPath filtering for AST nodes.

type KnifeOutput

type KnifeOutput struct {
	Result string `json:"result"` // Formatted analysis results
}

KnifeOutput represents the output from the knife MCP tool. It contains the formatted analysis results as a string.

Jump to

Keyboard shortcuts

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