Documentation
¶
Overview ¶
Package cli implements the technitium-mcp command line interface: the cobra commands, flag and config handling, and the MCP server exposing Technitium DNS server tools to AI clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultToolsets = []string{"core"}
DefaultToolsets is what the binary registers when neither --toolsets nor --allow-tools is given: enough to see what the servers are and read what they hold, and nothing that writes. Every tool's definition is spent from a client's context before a question is asked, which is a poor thing to spend it on by default. Ask for more with --toolsets, or --toolsets all for everything.
Functions ¶
Types ¶
type FlagData ¶
type FlagData struct {
Server []string `mapstructure:"server"`
Token []string `mapstructure:"token"`
ReadOnly bool `mapstructure:"read-only"`
EnableWrite bool `mapstructure:"enable-write"`
EnableDelete bool `mapstructure:"enable-delete"`
Toolsets []string `mapstructure:"toolsets"`
AllowTools []string `mapstructure:"allow-tools"`
DenyTools []string `mapstructure:"deny-tools"`
Listen string `mapstructure:"listen"`
AuthToken string `mapstructure:"auth-token"`
AllowNoAuth bool `mapstructure:"allow-no-auth"`
}
func GetFlags ¶
func GetFlags() *FlagData
GetFlags returns the fully populated FlagData. We must unmarshal from Viper instead of using globally bound pflags variables because pflags only parses command-line arguments. Viper merges environment variables (and config files) on top of the CLI flags.
func (*FlagData) ToolOptions ¶
ToolOptions maps the flags onto the tool registration options. An allow list with no --toolsets is the whole choice: it already says which tools to load, so the default set is not added to it. Beside --toolsets it adds its tools to the sets.
A session only reads unless --enable-write says otherwise. --read-only is taken because the other katbyte MCP servers are started with it, and here says what is already so: beside --enable-write it is a contradiction, and refused.