proxy

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package proxy implements an MCP tool source that proxies tools from a remote or local MCP server. Connect connects to the upstream server, discovers the available tools, and returns a tool.Response carrying one tool.Tool per upstream tool. Each tool forwards its call to the upstream server transparently.

Both HTTP (streamable / SSE) and stdio (command) transports are supported. The proxy passes the upstream *mcp.Tool through unchanged — Title and every Annotations field (ReadOnlyHint, DestructiveHint, IdempotentHint, OpenWorldHint) flow end-to-end, so the registered tool advertises exactly the same hints as the upstream.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(
	ctx context.Context,
	connect map[string]any,
	opts ...tool.Option,
) (tool.Response, error)

Connect decodes the source's `connect:` map, connects to the configured upstream MCP server, discovers its tools, and returns a tool.Response carrying one tool.Tool per upstream tool. The upstream *mcp.Tool (including Title and Annotations) is passed through unchanged because the proxy has no way to reason about the upstream tool's semantics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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