Documentation
¶
Overview ¶
Package mcpserver exposes dbq's service layer over the Model Context Protocol.
Tool names are prefixed with "dbq_" so they stay distinguishable when an agent has several database MCP servers connected at once.
Index ¶
Constants ¶
View Source
const ToolPrefix = "dbq_"
ToolPrefix namespaces every tool dbq registers.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Name and Version identify the server to clients.
Name string
Version string
// Scope limits which connections are exposed and what may be run on them.
Scope service.Scope
// MaxSchemaTables caps dbq_schema_context. Zero uses the service default.
MaxSchemaTables int
// Stateless disables MCP session state, required behind a load balancer.
Stateless bool
// JSONResponse returns application/json instead of text/event-stream.
JSONResponse bool
// SessionTimeout closes idle sessions. Zero means never.
SessionTimeout time.Duration
// Logger receives MCP protocol logs. Nil disables them.
Logger *slog.Logger
// Exports stores generated SQL outside the model context. Nil disables export.
Exports *artifact.Store
// ExportBaseURL is prepended to artifact download paths. Empty keeps them relative.
ExportBaseURL string
// MaxExportRows caps rows written to one artifact.
MaxExportRows int
// AllowedOrigins permits exact cross-origin browser clients.
AllowedOrigins []string
}
Options configures the MCP server.
Click to show internal directories.
Click to hide internal directories.