mcp

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ScreentimeSqlToolDesc string

Functions

func QueryToolHandler

func QueryToolHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)

QueryToolHandler handles the query tool request, taking the SQL query from the request parameters and marshalling the results to CSV.

func RunRouter

func RunRouter(config Config, logger *slog.Logger) error

RunRouter runs the MCP server with the given configuration and logger.

func SetDatabase

func SetDatabase(conn *sql.DB) error

SetDatabase sets the DuckDB connection for the MCP server.

Types

type Config

type Config struct {
	Name    string // Service Name
	Version string // Service Version

	UseSSE      bool   // Use SSE Transport instead of STDIO
	SSEHostPort string // HostPort to use for SSE
}

Config is configuration for our MCP server

Jump to

Keyboard shortcuts

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