server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package server implements the MCP (Model Context Protocol) server for database operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MCPServer

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

MCPServer represents the MCP server instance that handles database queries.

func NewMCPServer

func NewMCPServer(name, version string) *MCPServer

NewMCPServer creates a new MCP server instance with the specified name and version. It automatically registers the query_database tool for executing SQL queries.

func (*MCPServer) AddSource

func (ms *MCPServer) AddSource(name string, src core.Source, readOnly bool)

AddSource registers a database source with the given name. This makes the source available for query execution via the MCP protocol.

func (*MCPServer) StartStdio

func (ms *MCPServer) StartStdio() error

StartStdio starts the MCP server using stdio transport. This is the standard transport for Claude Desktop integration.

Jump to

Keyboard shortcuts

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