mcp

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package mcp creates an MCP server for managing the tasks.

Index

Constants

This section is empty.

Variables

View Source
var PromptInstructions string

Functions

This section is empty.

Types

type MCPToolCall

type MCPToolCall struct {
	Name      string `json:"name"`
	Arguments any    `json:"arguments"`
}

MCPToolCall represents a structured MCP tool call that can be marshaled to JSON

type SearchParams

type SearchParams struct {
	Query   string               `json:"query" jsonschema:"Required. The search query."`
	Filters core.ListTasksParams `json:"filters" jsonschema:"Optional. Additional filters for the search."`
}

type Server

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

Server wraps the MCP server with backlog-specific functionality

func NewServer

func NewServer(store TaskStore, autoCommit bool) *Server

NewServer creates a new MCP server configured for backlog

func (*Server) RunHTTP

func (s *Server) RunHTTP(port int) error

RunHTTP starts the server with streamable HTTP transport

func (*Server) RunStdio

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

RunStdio starts the server with stdio transport

type TaskCreateArgs

type TaskCreateArgs struct {
	Title       string   `json:"title"`
	Description string   `json:"description,omitempty"`
	Labels      []string `json:"labels,omitempty"`
}

TaskCreateArgs represents arguments for task_create tool

type TaskListArgs

type TaskListArgs struct {
	Status     string   `json:"status,omitempty"`
	Sort       []string `json:"sort,omitempty"`
	Reverse    bool     `json:"reverse,omitempty"`
	Unassigned bool     `json:"unassigned,omitempty"`
	Parent     string   `json:"parent,omitempty"`
	Labels     string   `json:"labels,omitempty"`
}

TaskListArgs represents arguments for task_list tool

type TaskStore

type TaskStore interface {
	Get(id string) (*core.Task, error)
	Create(params core.CreateTaskParams) (*core.Task, error)
	Update(task *core.Task, params core.EditTaskParams) (*core.Task, error)
	List(params core.ListTasksParams) ([]*core.Task, error)
	Search(query string, listParams core.ListTasksParams) ([]*core.Task, error)
	Path(t *core.Task) string
	Archive(id core.TaskID) (string, error)
}

TaskStore interface matches the one expected by the MCP handlers

Jump to

Keyboard shortcuts

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