mcp

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package mcp provides Model Context Protocol (MCP) integration for devloop.

This package implements MCP server functionality that allows devloop to be used as an MCP tool by AI assistants and other external clients. The MCP integration provides structured access to devloop's capabilities through the standardized MCP protocol.

MCP Server

The MCP server exposes devloop functionality as MCP tools: - Project configuration management - Rule triggering and status monitoring - File content reading - Real-time log streaming

Usage

The MCP server runs over HTTP/SSE transport when enabled:

devloop --enable-mcp --mcp-port 3000  # MCP server on HTTP port 3000

Integration

AI assistants can use devloop through MCP by: - Connecting to the HTTP-based MCP server via SSE transport - Calling available MCP tools for project management - Receiving real-time updates through the MCP protocol

Tools Available

- get_config: Retrieve project configuration - trigger_rule: Execute specific automation rules - get_rule_status: Check rule execution status - list_watched_paths: Get monitored file patterns - read_file_content: Access file contents - stream_logs: Receive real-time log updates

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MCPService

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

MCPService manages the MCP server for devloop

func NewMCPService

func NewMCPService(orchestrator gateway.Orchestrator) *MCPService

NewMCPService creates a new MCP service instance

func (*MCPService) CreateHandler added in v0.0.34

func (m *MCPService) CreateHandler() (http.Handler, error)

CreateHandler initializes MCP server and returns HTTP handler

func (*MCPService) Stop

func (m *MCPService) Stop()

Stop cleans up MCP resources (no longer manages HTTP server)

type SelectiveGatewayAdapter

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

SelectiveGatewayAdapter exposes only essential devloop operations as MCP tools

func (*SelectiveGatewayAdapter) GetConfig

GetConfig implements the MCP GetConfig tool

func (*SelectiveGatewayAdapter) GetRuleStatus

GetRuleStatus implements the MCP GetRuleStatus tool

func (*SelectiveGatewayAdapter) ListProjects

ListProjects implements the MCP ListProjects tool

func (*SelectiveGatewayAdapter) ListWatchedPaths

ListWatchedPaths implements the MCP ListWatchedPaths tool

func (*SelectiveGatewayAdapter) ReadFileContent

ReadFileContent implements the MCP ReadFileContent tool

func (*SelectiveGatewayAdapter) TriggerRuleClient

TriggerRuleClient implements the MCP TriggerRule tool

Jump to

Keyboard shortcuts

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