mcp

package
v0.0.0-...-ab5f932 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package mcp implements a Model Context Protocol server for aws-probe.

Use Register to attach tools, resources, and prompts to an existing MCP server (for example kubectl-netdrill with --external-tools). Use Run for a standalone stdio server via the aws-probe mcp command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLoadConfig

func DefaultLoadConfig() func(context.Context) (aws.Config, error)

DefaultLoadConfig returns the standard aws-probe AWS config loader with credential checks.

func Register

func Register(server *mcp.Server, deps *Deps)

Register adds aws-probe tools, resources, and prompts to an existing MCP server.

func Run

func Run(ctx context.Context, version string, deps *Deps) error

Run creates an MCP server, registers aws-probe features, and serves over stdio.

Types

type Config

type Config struct {
	Region string
	Output string // table, json, csv (reserved for future formatted tools)
	Theme  string
}

Config holds optional defaults for MCP tool behavior.

type Deps

type Deps struct {
	LoadConfig func(context.Context) (aws.Config, error)
	Config     Config

	// Optional factories for unit tests. Nil uses production SDK clients.
	S3         func(aws.Config) s3API
	SQS        func(aws.Config) sqsAPI
	Secrets    func(aws.Config) secretsAPI
	MSK        func(aws.Config) mskAPI
	IAM        func(aws.Config) iamAPI
	SNS        func(aws.Config) internalsns.TopicsLister
	STS        func(aws.Config) whoami.STSAPI
	CloudFront func(aws.Config) (internalcf.ClientAPI, internalcf.ACMClientAPI)
}

Deps bundles dependencies for MCP registration and tool handlers.

Jump to

Keyboard shortcuts

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