Documentation
¶
Index ¶
- func ParsePrefixedURI(prefixed string) (server, uri string, err error)
- func PrefixURI(server, uri string) string
- type DescribeToolArgs
- type ExecuteToolArgs
- type Prompt
- type Resource
- type SearchToolsArgs
- type Server
- func (s *Server) GetPrompt(ctx context.Context, prefixedName string) (json.RawMessage, error)
- func (s *Server) HandleDescribeTool(ctx context.Context, rawArgs json.RawMessage) (string, error)
- func (s *Server) HandleExecuteTool(ctx context.Context, rawArgs json.RawMessage) (json.RawMessage, error)
- func (s *Server) HandleSearchTools(ctx context.Context, rawArgs json.RawMessage) (string, error)
- func (s *Server) Instructions() string
- func (s *Server) ListPrompts(ctx context.Context) ([]Prompt, error)
- func (s *Server) ListResources(ctx context.Context) ([]Resource, error)
- func (s *Server) ReadResource(ctx context.Context, prefixedURI string) (json.RawMessage, error)
- func (s *Server) Run(ctx context.Context) error
- func (s *Server) RunWithTransport(ctx context.Context, t mcp.Transport) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParsePrefixedURI ¶
ParsePrefixedURI splits a prefixed URI back into server and original URI.
Types ¶
type DescribeToolArgs ¶
type DescribeToolArgs struct {
Name string `json:"name"`
}
DescribeToolArgs is the input for the describe_tool meta-tool.
type ExecuteToolArgs ¶
type ExecuteToolArgs struct {
Name string `json:"name"`
Arguments json.RawMessage `json:"arguments"`
Timeout int `json:"timeout,omitempty"` // seconds
}
ExecuteToolArgs is the input for the execute_tool meta-tool.
type Prompt ¶
type Prompt struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Arguments json.RawMessage `json:"arguments,omitempty"`
ServerName string `json:"server_name"`
}
Prompt represents an MCP prompt from an upstream server.
type Resource ¶
type Resource struct {
URI string `json:"uri"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
MimeType string `json:"mimeType,omitempty"`
ServerName string `json:"server_name"`
}
Resource represents an MCP resource from an upstream server.
type SearchToolsArgs ¶
SearchToolsArgs is the input for the search_tools meta-tool.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the core MCP proxy that exposes 3 meta-tools.
func (*Server) HandleDescribeTool ¶
HandleDescribeTool implements the describe_tool meta-tool.
func (*Server) HandleExecuteTool ¶
func (s *Server) HandleExecuteTool(ctx context.Context, rawArgs json.RawMessage) (json.RawMessage, error)
HandleExecuteTool implements the execute_tool meta-tool.
func (*Server) HandleSearchTools ¶
HandleSearchTools implements the search_tools meta-tool.
func (*Server) Instructions ¶
Instructions returns summarized instructions for the proxy. If server instructions are available, they are concatenated with headers. LLM summarization will be added when Gemini integration is complete.
func (*Server) ListPrompts ¶
ListPrompts returns all prompts aggregated from upstream servers.
func (*Server) ListResources ¶
ListResources returns all resources aggregated from upstream servers. Currently returns empty since upstream connections don't support resource listing yet (pending MCP SDK integration).
func (*Server) ReadResource ¶
ReadResource reads a resource by its prefixed URI, routing to the correct upstream server.