mcp

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 15 Imported by: 0

README

MCP Status

This package is intentionally disabled at the product level for now.

Why:

  • qp is currently optimized for direct CLI use, generated repo docs, and agents that can read qp.yaml and run qp commands directly.
  • Shipping a public MCP surface creates a support and compatibility burden that is not part of the core product story right now.
  • The code remains here so the design can be revisited later without re-learning everything from scratch.

Current policy:

  • do not document MCP as a public qp feature
  • do not expose MCP through the CLI
  • treat this package as internal and dormant unless the product direction changes

Documentation

Index

Constants

View Source
const ProtocolVersion = "2024-11-05"

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONRPCError

type JSONRPCError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type JSONRPCRequest

type JSONRPCRequest struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      json.RawMessage `json:"id,omitempty"`
	Method  string          `json:"method"`
	Params  json.RawMessage `json:"params,omitempty"`
}

type JSONRPCResponse

type JSONRPCResponse struct {
	JSONRPC string        `json:"jsonrpc"`
	ID      any           `json:"id,omitempty"`
	Result  any           `json:"result,omitempty"`
	Error   *JSONRPCError `json:"error,omitempty"`
}

type Prompt

type Prompt struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

type Resource

type Resource struct {
	URI         string `json:"uri"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	MimeType    string `json:"mimeType,omitempty"`
}

type Server

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

func New

func New(cfg *config.Config, repoRoot string, taskRunner runner.Executor) *Server

func (*Server) HandlePayload

func (s *Server) HandlePayload(payload []byte, errOut io.Writer) ([]byte, bool, error)

func (*Server) Prompts

func (s *Server) Prompts() []Prompt

func (*Server) Resources

func (s *Server) Resources() []Resource

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(ctx context.Context, port int, errOut io.Writer) error

func (*Server) ServeStdio

func (s *Server) ServeStdio(ctx context.Context, in io.Reader, out io.Writer, errOut io.Writer) error

func (*Server) Tools

func (s *Server) Tools() []Tool

type Tool

type Tool struct {
	Name        string         `json:"name"`
	Description string         `json:"description"`
	InputSchema map[string]any `json:"inputSchema"`
	Annotations map[string]any `json:"annotations,omitempty"`
}

Jump to

Keyboard shortcuts

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