v0

package
v0.1.157 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MCP_Initialize_FullMethodName    = "/codefly.mcp.v0.MCP/Initialize"
	MCP_ListTools_FullMethodName     = "/codefly.mcp.v0.MCP/ListTools"
	MCP_CallTool_FullMethodName      = "/codefly.mcp.v0.MCP/CallTool"
	MCP_ListResources_FullMethodName = "/codefly.mcp.v0.MCP/ListResources"
	MCP_ReadResource_FullMethodName  = "/codefly.mcp.v0.MCP/ReadResource"
)

Variables

View Source
var File_codefly_mcp_v0_mcp_proto protoreflect.FileDescriptor
View Source
var MCP_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "codefly.mcp.v0.MCP",
	HandlerType: (*MCPServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Initialize",
			Handler:    _MCP_Initialize_Handler,
		},
		{
			MethodName: "ListTools",
			Handler:    _MCP_ListTools_Handler,
		},
		{
			MethodName: "CallTool",
			Handler:    _MCP_CallTool_Handler,
		},
		{
			MethodName: "ListResources",
			Handler:    _MCP_ListResources_Handler,
		},
		{
			MethodName: "ReadResource",
			Handler:    _MCP_ReadResource_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "codefly/mcp/v0/mcp.proto",
}

MCP_ServiceDesc is the grpc.ServiceDesc for MCP service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMCPServer

func RegisterMCPServer(s grpc.ServiceRegistrar, srv MCPServer)

Types

type CallToolRequest

type CallToolRequest struct {

	// name is the tool name from the MCP server catalog.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// arguments are JSON-shaped values supplied to a tool or prompt.
	Arguments map[string]string `` /* 145-byte string literal not displayed */
	// contains filtered or unexported fields
}

Tool execution

func (*CallToolRequest) Descriptor deprecated

func (*CallToolRequest) Descriptor() ([]byte, []int)

Deprecated: Use CallToolRequest.ProtoReflect.Descriptor instead.

func (*CallToolRequest) GetArguments

func (x *CallToolRequest) GetArguments() map[string]string

func (*CallToolRequest) GetName

func (x *CallToolRequest) GetName() string

func (*CallToolRequest) ProtoMessage

func (*CallToolRequest) ProtoMessage()

func (*CallToolRequest) ProtoReflect

func (x *CallToolRequest) ProtoReflect() protoreflect.Message

func (*CallToolRequest) Reset

func (x *CallToolRequest) Reset()

func (*CallToolRequest) String

func (x *CallToolRequest) String() string

type CallToolResponse

type CallToolResponse struct {

	// content contains the blocks returned by the tool.
	Content []*Content `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"`
	// is_error is true when the tool result represents an application-level failure.
	IsError bool `protobuf:"varint,2,opt,name=is_error,json=isError,proto3" json:"is_error,omitempty"`
	// contains filtered or unexported fields
}

CallToolResponse returns MCP content blocks and an application-level error flag.

func (*CallToolResponse) Descriptor deprecated

func (*CallToolResponse) Descriptor() ([]byte, []int)

Deprecated: Use CallToolResponse.ProtoReflect.Descriptor instead.

func (*CallToolResponse) GetContent

func (x *CallToolResponse) GetContent() []*Content

func (*CallToolResponse) GetIsError

func (x *CallToolResponse) GetIsError() bool

func (*CallToolResponse) ProtoMessage

func (*CallToolResponse) ProtoMessage()

func (*CallToolResponse) ProtoReflect

func (x *CallToolResponse) ProtoReflect() protoreflect.Message

func (*CallToolResponse) Reset

func (x *CallToolResponse) Reset()

func (*CallToolResponse) String

func (x *CallToolResponse) String() string

type ClientInfo

type ClientInfo struct {

	// name is the MCP client name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// version is the semantic or service-specific version for this resource.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

ClientInfo identifies the MCP client during initialization.

func (*ClientInfo) Descriptor deprecated

func (*ClientInfo) Descriptor() ([]byte, []int)

Deprecated: Use ClientInfo.ProtoReflect.Descriptor instead.

func (*ClientInfo) GetName

func (x *ClientInfo) GetName() string

func (*ClientInfo) GetVersion

func (x *ClientInfo) GetVersion() string

func (*ClientInfo) ProtoMessage

func (*ClientInfo) ProtoMessage()

func (*ClientInfo) ProtoReflect

func (x *ClientInfo) ProtoReflect() protoreflect.Message

func (*ClientInfo) Reset

func (x *ClientInfo) Reset()

func (*ClientInfo) String

func (x *ClientInfo) String() string

type Content

type Content struct {

	// content selects exactly one supported content variant.
	//
	// Types that are valid to be assigned to Content:
	//
	//	*Content_Text
	//	*Content_Image
	//	*Content_Resource
	Content isContent_Content `protobuf_oneof:"content"`
	// contains filtered or unexported fields
}

Content is the typed MCP response envelope for tools and resources.

func (*Content) Descriptor deprecated

func (*Content) Descriptor() ([]byte, []int)

Deprecated: Use Content.ProtoReflect.Descriptor instead.

func (*Content) GetContent

func (x *Content) GetContent() isContent_Content

func (*Content) GetImage

func (x *Content) GetImage() *ImageContent

func (*Content) GetResource

func (x *Content) GetResource() *ResourceContent

func (*Content) GetText

func (x *Content) GetText() *TextContent

func (*Content) ProtoMessage

func (*Content) ProtoMessage()

func (*Content) ProtoReflect

func (x *Content) ProtoReflect() protoreflect.Message

func (*Content) Reset

func (x *Content) Reset()

func (*Content) String

func (x *Content) String() string

type Content_Image

type Content_Image struct {
	// image carries the ImageContent variant for Content.
	Image *ImageContent `protobuf:"bytes,2,opt,name=image,proto3,oneof"`
}

type Content_Resource

type Content_Resource struct {
	// resource carries the ResourceContent variant for Content.
	Resource *ResourceContent `protobuf:"bytes,3,opt,name=resource,proto3,oneof"`
}

type Content_Text

type Content_Text struct {
	// text carries a plain-text content block.
	Text *TextContent `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}

type ImageContent

type ImageContent struct {

	// type is the MCP content type, normally "image".
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // "image"
	// data is the base64-encoded image payload.
	Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// mime_type identifies the media type of resource content.
	MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// contains filtered or unexported fields
}

ImageContent is an image block returned by an MCP tool or resource.

func (*ImageContent) Descriptor deprecated

func (*ImageContent) Descriptor() ([]byte, []int)

Deprecated: Use ImageContent.ProtoReflect.Descriptor instead.

func (*ImageContent) GetData

func (x *ImageContent) GetData() string

func (*ImageContent) GetMimeType

func (x *ImageContent) GetMimeType() string

func (*ImageContent) GetType

func (x *ImageContent) GetType() string

func (*ImageContent) ProtoMessage

func (*ImageContent) ProtoMessage()

func (*ImageContent) ProtoReflect

func (x *ImageContent) ProtoReflect() protoreflect.Message

func (*ImageContent) Reset

func (x *ImageContent) Reset()

func (*ImageContent) String

func (x *ImageContent) String() string

type InitializeRequest

type InitializeRequest struct {

	// protocol_version is the negotiated MCP or API protocol version.
	ProtocolVersion string `protobuf:"bytes,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
	// client_info describes the MCP client performing initialization.
	ClientInfo *ClientInfo `protobuf:"bytes,2,opt,name=client_info,json=clientInfo,proto3" json:"client_info,omitempty"`
	// contains filtered or unexported fields
}

InitializeRequest is the MCP protocol handshake request.

func (*InitializeRequest) Descriptor deprecated

func (*InitializeRequest) Descriptor() ([]byte, []int)

Deprecated: Use InitializeRequest.ProtoReflect.Descriptor instead.

func (*InitializeRequest) GetClientInfo

func (x *InitializeRequest) GetClientInfo() *ClientInfo

func (*InitializeRequest) GetProtocolVersion

func (x *InitializeRequest) GetProtocolVersion() string

func (*InitializeRequest) ProtoMessage

func (*InitializeRequest) ProtoMessage()

func (*InitializeRequest) ProtoReflect

func (x *InitializeRequest) ProtoReflect() protoreflect.Message

func (*InitializeRequest) Reset

func (x *InitializeRequest) Reset()

func (*InitializeRequest) String

func (x *InitializeRequest) String() string

type InitializeResponse

type InitializeResponse struct {

	// protocol_version is the negotiated MCP or API protocol version.
	ProtocolVersion string `protobuf:"bytes,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
	// server_info describes the MCP server returned by initialization.
	ServerInfo *ServerInfo `protobuf:"bytes,2,opt,name=server_info,json=serverInfo,proto3" json:"server_info,omitempty"`
	// contains filtered or unexported fields
}

InitializeResponse confirms the negotiated MCP protocol version and server metadata.

func (*InitializeResponse) Descriptor deprecated

func (*InitializeResponse) Descriptor() ([]byte, []int)

Deprecated: Use InitializeResponse.ProtoReflect.Descriptor instead.

func (*InitializeResponse) GetProtocolVersion

func (x *InitializeResponse) GetProtocolVersion() string

func (*InitializeResponse) GetServerInfo

func (x *InitializeResponse) GetServerInfo() *ServerInfo

func (*InitializeResponse) ProtoMessage

func (*InitializeResponse) ProtoMessage()

func (*InitializeResponse) ProtoReflect

func (x *InitializeResponse) ProtoReflect() protoreflect.Message

func (*InitializeResponse) Reset

func (x *InitializeResponse) Reset()

func (*InitializeResponse) String

func (x *InitializeResponse) String() string

type InputSchema

type InputSchema struct {

	// type is normally "object" for MCP tool input schemas.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // "object"
	// properties maps argument names to their schema descriptions.
	Properties map[string]*PropertySchema `` /* 147-byte string literal not displayed */
	// required marks arguments that callers must provide.
	Required []string `protobuf:"bytes,3,rep,name=required,proto3" json:"required,omitempty"`
	// contains filtered or unexported fields
}

InputSchema is the object-shaped JSON Schema accepted by a tool.

func (*InputSchema) Descriptor deprecated

func (*InputSchema) Descriptor() ([]byte, []int)

Deprecated: Use InputSchema.ProtoReflect.Descriptor instead.

func (*InputSchema) GetProperties

func (x *InputSchema) GetProperties() map[string]*PropertySchema

func (*InputSchema) GetRequired

func (x *InputSchema) GetRequired() []string

func (*InputSchema) GetType

func (x *InputSchema) GetType() string

func (*InputSchema) ProtoMessage

func (*InputSchema) ProtoMessage()

func (*InputSchema) ProtoReflect

func (x *InputSchema) ProtoReflect() protoreflect.Message

func (*InputSchema) Reset

func (x *InputSchema) Reset()

func (*InputSchema) String

func (x *InputSchema) String() string

type ListResourcesRequest

type ListResourcesRequest struct {
	// contains filtered or unexported fields
}

ListResourcesRequest carries optional filters for listing resources.

func (*ListResourcesRequest) Descriptor deprecated

func (*ListResourcesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListResourcesRequest.ProtoReflect.Descriptor instead.

func (*ListResourcesRequest) ProtoMessage

func (*ListResourcesRequest) ProtoMessage()

func (*ListResourcesRequest) ProtoReflect

func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message

func (*ListResourcesRequest) Reset

func (x *ListResourcesRequest) Reset()

func (*ListResourcesRequest) String

func (x *ListResourcesRequest) String() string

type ListResourcesResponse

type ListResourcesResponse struct {

	// resources are read-only context entries exposed to an AI client or host.
	Resources []*Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
	// contains filtered or unexported fields
}

ListResourcesResponse returns resources exposed by the MCP server.

func (*ListResourcesResponse) Descriptor deprecated

func (*ListResourcesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListResourcesResponse.ProtoReflect.Descriptor instead.

func (*ListResourcesResponse) GetResources

func (x *ListResourcesResponse) GetResources() []*Resource

func (*ListResourcesResponse) ProtoMessage

func (*ListResourcesResponse) ProtoMessage()

func (*ListResourcesResponse) ProtoReflect

func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message

func (*ListResourcesResponse) Reset

func (x *ListResourcesResponse) Reset()

func (*ListResourcesResponse) String

func (x *ListResourcesResponse) String() string

type ListToolsRequest

type ListToolsRequest struct {
	// contains filtered or unexported fields
}

Tool listing

func (*ListToolsRequest) Descriptor deprecated

func (*ListToolsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListToolsRequest.ProtoReflect.Descriptor instead.

func (*ListToolsRequest) ProtoMessage

func (*ListToolsRequest) ProtoMessage()

func (*ListToolsRequest) ProtoReflect

func (x *ListToolsRequest) ProtoReflect() protoreflect.Message

func (*ListToolsRequest) Reset

func (x *ListToolsRequest) Reset()

func (*ListToolsRequest) String

func (x *ListToolsRequest) String() string

type ListToolsResponse

type ListToolsResponse struct {

	// tools are callable functions exposed to an AI client or host.
	Tools []*Tool `protobuf:"bytes,1,rep,name=tools,proto3" json:"tools,omitempty"`
	// contains filtered or unexported fields
}

ListToolsResponse returns callable tools exposed by the MCP server.

func (*ListToolsResponse) Descriptor deprecated

func (*ListToolsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListToolsResponse.ProtoReflect.Descriptor instead.

func (*ListToolsResponse) GetTools

func (x *ListToolsResponse) GetTools() []*Tool

func (*ListToolsResponse) ProtoMessage

func (*ListToolsResponse) ProtoMessage()

func (*ListToolsResponse) ProtoReflect

func (x *ListToolsResponse) ProtoReflect() protoreflect.Message

func (*ListToolsResponse) Reset

func (x *ListToolsResponse) Reset()

func (*ListToolsResponse) String

func (x *ListToolsResponse) String() string

type MCPClient

type MCPClient interface {
	// Initialize performs the MCP protocol handshake.
	Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*InitializeResponse, error)
	// ListTools returns callable Codefly tools.
	ListTools(ctx context.Context, in *ListToolsRequest, opts ...grpc.CallOption) (*ListToolsResponse, error)
	// CallTool invokes a named Codefly tool.
	CallTool(ctx context.Context, in *CallToolRequest, opts ...grpc.CallOption) (*CallToolResponse, error)
	// ListResources returns read-only Codefly resources.
	ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error)
	// ReadResource returns content for one Codefly resource URI.
	ReadResource(ctx context.Context, in *ReadResourceRequest, opts ...grpc.CallOption) (*ReadResourceResponse, error)
}

MCPClient is the client API for MCP service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

MCP Service (for potential gRPC usage, though MCP typically uses JSON-RPC)

func NewMCPClient

func NewMCPClient(cc grpc.ClientConnInterface) MCPClient

type MCPServer

type MCPServer interface {
	// Initialize performs the MCP protocol handshake.
	Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error)
	// ListTools returns callable Codefly tools.
	ListTools(context.Context, *ListToolsRequest) (*ListToolsResponse, error)
	// CallTool invokes a named Codefly tool.
	CallTool(context.Context, *CallToolRequest) (*CallToolResponse, error)
	// ListResources returns read-only Codefly resources.
	ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
	// ReadResource returns content for one Codefly resource URI.
	ReadResource(context.Context, *ReadResourceRequest) (*ReadResourceResponse, error)
	// contains filtered or unexported methods
}

MCPServer is the server API for MCP service. All implementations must embed UnimplementedMCPServer for forward compatibility.

MCP Service (for potential gRPC usage, though MCP typically uses JSON-RPC)

type PropertySchema

type PropertySchema struct {

	// type is the JSON Schema scalar or object type for this argument.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// description tells the model what value to provide.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// enum_values lists allowed string values for an MCP schema property.
	EnumValues []string `protobuf:"bytes,3,rep,name=enum_values,json=enumValues,proto3" json:"enum_values,omitempty"` // For enum types
	// contains filtered or unexported fields
}

PropertySchema describes one MCP tool argument.

func (*PropertySchema) Descriptor deprecated

func (*PropertySchema) Descriptor() ([]byte, []int)

Deprecated: Use PropertySchema.ProtoReflect.Descriptor instead.

func (*PropertySchema) GetDescription

func (x *PropertySchema) GetDescription() string

func (*PropertySchema) GetEnumValues

func (x *PropertySchema) GetEnumValues() []string

func (*PropertySchema) GetType

func (x *PropertySchema) GetType() string

func (*PropertySchema) ProtoMessage

func (*PropertySchema) ProtoMessage()

func (*PropertySchema) ProtoReflect

func (x *PropertySchema) ProtoReflect() protoreflect.Message

func (*PropertySchema) Reset

func (x *PropertySchema) Reset()

func (*PropertySchema) String

func (x *PropertySchema) String() string

type ReadResourceRequest

type ReadResourceRequest struct {

	// uri is the stable resource identifier.
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// contains filtered or unexported fields
}

Resource operations

func (*ReadResourceRequest) Descriptor deprecated

func (*ReadResourceRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReadResourceRequest.ProtoReflect.Descriptor instead.

func (*ReadResourceRequest) GetUri

func (x *ReadResourceRequest) GetUri() string

func (*ReadResourceRequest) ProtoMessage

func (*ReadResourceRequest) ProtoMessage()

func (*ReadResourceRequest) ProtoReflect

func (x *ReadResourceRequest) ProtoReflect() protoreflect.Message

func (*ReadResourceRequest) Reset

func (x *ReadResourceRequest) Reset()

func (*ReadResourceRequest) String

func (x *ReadResourceRequest) String() string

type ReadResourceResponse

type ReadResourceResponse struct {

	// contents contains the blocks returned by the resource.
	Contents []*Content `protobuf:"bytes,1,rep,name=contents,proto3" json:"contents,omitempty"`
	// contains filtered or unexported fields
}

ReadResourceResponse returns the content blocks for one resource URI.

func (*ReadResourceResponse) Descriptor deprecated

func (*ReadResourceResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReadResourceResponse.ProtoReflect.Descriptor instead.

func (*ReadResourceResponse) GetContents

func (x *ReadResourceResponse) GetContents() []*Content

func (*ReadResourceResponse) ProtoMessage

func (*ReadResourceResponse) ProtoMessage()

func (*ReadResourceResponse) ProtoReflect

func (x *ReadResourceResponse) ProtoReflect() protoreflect.Message

func (*ReadResourceResponse) Reset

func (x *ReadResourceResponse) Reset()

func (*ReadResourceResponse) String

func (x *ReadResourceResponse) String() string

type Resource

type Resource struct {

	// uri is the stable resource identifier.
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// name is the display name for this resource.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// mime_type identifies the media type of resource content.
	MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// description tells the model when the resource is useful.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

Resource describes read-only context exposed through MCP.

func (*Resource) Descriptor deprecated

func (*Resource) Descriptor() ([]byte, []int)

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetDescription

func (x *Resource) GetDescription() string

func (*Resource) GetMimeType

func (x *Resource) GetMimeType() string

func (*Resource) GetName

func (x *Resource) GetName() string

func (*Resource) GetUri

func (x *Resource) GetUri() string

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

func (x *Resource) ProtoReflect() protoreflect.Message

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type ResourceContent

type ResourceContent struct {

	// type is the MCP content type, normally "resource".
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // "resource"
	// resource is the resource metadata associated with this content.
	Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
	// text is the plain-text payload or human-readable description.
	Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
	// blob is binary content encoded by the protocol.
	Blob string `protobuf:"bytes,4,opt,name=blob,proto3" json:"blob,omitempty"`
	// contains filtered or unexported fields
}

ResourceContent embeds a resource reference or payload in a content response.

func (*ResourceContent) Descriptor deprecated

func (*ResourceContent) Descriptor() ([]byte, []int)

Deprecated: Use ResourceContent.ProtoReflect.Descriptor instead.

func (*ResourceContent) GetBlob

func (x *ResourceContent) GetBlob() string

func (*ResourceContent) GetResource

func (x *ResourceContent) GetResource() *Resource

func (*ResourceContent) GetText

func (x *ResourceContent) GetText() string

func (*ResourceContent) GetType

func (x *ResourceContent) GetType() string

func (*ResourceContent) ProtoMessage

func (*ResourceContent) ProtoMessage()

func (*ResourceContent) ProtoReflect

func (x *ResourceContent) ProtoReflect() protoreflect.Message

func (*ResourceContent) Reset

func (x *ResourceContent) Reset()

func (*ResourceContent) String

func (x *ResourceContent) String() string

type ServerCapabilities

type ServerCapabilities struct {

	// tools are callable functions exposed to an AI client or host.
	Tools bool `protobuf:"varint,1,opt,name=tools,proto3" json:"tools,omitempty"`
	// resources are read-only context entries exposed to an AI client or host.
	Resources bool `protobuf:"varint,2,opt,name=resources,proto3" json:"resources,omitempty"`
	// prompts are reusable prompt templates exposed to an AI client or host.
	Prompts bool `protobuf:"varint,3,opt,name=prompts,proto3" json:"prompts,omitempty"`
	// contains filtered or unexported fields
}

ServerCapabilities advertises the MCP feature groups supported by the server.

func (*ServerCapabilities) Descriptor deprecated

func (*ServerCapabilities) Descriptor() ([]byte, []int)

Deprecated: Use ServerCapabilities.ProtoReflect.Descriptor instead.

func (*ServerCapabilities) GetPrompts

func (x *ServerCapabilities) GetPrompts() bool

func (*ServerCapabilities) GetResources

func (x *ServerCapabilities) GetResources() bool

func (*ServerCapabilities) GetTools

func (x *ServerCapabilities) GetTools() bool

func (*ServerCapabilities) ProtoMessage

func (*ServerCapabilities) ProtoMessage()

func (*ServerCapabilities) ProtoReflect

func (x *ServerCapabilities) ProtoReflect() protoreflect.Message

func (*ServerCapabilities) Reset

func (x *ServerCapabilities) Reset()

func (*ServerCapabilities) String

func (x *ServerCapabilities) String() string

type ServerInfo

type ServerInfo struct {

	// name is the MCP server name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// version is the semantic or service-specific version for this resource.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// capabilities describes which optional protocol features are supported.
	Capabilities *ServerCapabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
	// contains filtered or unexported fields
}

ServerInfo identifies the MCP server and its advertised capabilities.

func (*ServerInfo) Descriptor deprecated

func (*ServerInfo) Descriptor() ([]byte, []int)

Deprecated: Use ServerInfo.ProtoReflect.Descriptor instead.

func (*ServerInfo) GetCapabilities

func (x *ServerInfo) GetCapabilities() *ServerCapabilities

func (*ServerInfo) GetName

func (x *ServerInfo) GetName() string

func (*ServerInfo) GetVersion

func (x *ServerInfo) GetVersion() string

func (*ServerInfo) ProtoMessage

func (*ServerInfo) ProtoMessage()

func (*ServerInfo) ProtoReflect

func (x *ServerInfo) ProtoReflect() protoreflect.Message

func (*ServerInfo) Reset

func (x *ServerInfo) Reset()

func (*ServerInfo) String

func (x *ServerInfo) String() string

type TextContent

type TextContent struct {

	// type is the MCP content type, normally "text".
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // "text"
	// text is the plain-text payload or human-readable description.
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

TextContent is a text block returned by an MCP tool or resource.

func (*TextContent) Descriptor deprecated

func (*TextContent) Descriptor() ([]byte, []int)

Deprecated: Use TextContent.ProtoReflect.Descriptor instead.

func (*TextContent) GetText

func (x *TextContent) GetText() string

func (*TextContent) GetType

func (x *TextContent) GetType() string

func (*TextContent) ProtoMessage

func (*TextContent) ProtoMessage()

func (*TextContent) ProtoReflect

func (x *TextContent) ProtoReflect() protoreflect.Message

func (*TextContent) Reset

func (x *TextContent) Reset()

func (*TextContent) String

func (x *TextContent) String() string

type Tool

type Tool struct {

	// name is the MCP tool identifier.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// description tells the model when the tool is useful.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// input_schema is the JSON Schema describing valid tool arguments.
	InputSchema *InputSchema `protobuf:"bytes,3,opt,name=input_schema,json=inputSchema,proto3" json:"input_schema,omitempty"`
	// contains filtered or unexported fields
}

Tool describes a callable MCP tool exposed by the Codefly MCP server.

func (*Tool) Descriptor deprecated

func (*Tool) Descriptor() ([]byte, []int)

Deprecated: Use Tool.ProtoReflect.Descriptor instead.

func (*Tool) GetDescription

func (x *Tool) GetDescription() string

func (*Tool) GetInputSchema

func (x *Tool) GetInputSchema() *InputSchema

func (*Tool) GetName

func (x *Tool) GetName() string

func (*Tool) ProtoMessage

func (*Tool) ProtoMessage()

func (*Tool) ProtoReflect

func (x *Tool) ProtoReflect() protoreflect.Message

func (*Tool) Reset

func (x *Tool) Reset()

func (*Tool) String

func (x *Tool) String() string

type UnimplementedMCPServer

type UnimplementedMCPServer struct{}

UnimplementedMCPServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedMCPServer) CallTool

func (UnimplementedMCPServer) Initialize

func (UnimplementedMCPServer) ListResources

func (UnimplementedMCPServer) ListTools

func (UnimplementedMCPServer) ReadResource

type UnsafeMCPServer

type UnsafeMCPServer interface {
	// contains filtered or unexported methods
}

UnsafeMCPServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MCPServer will result in compilation errors.

Jump to

Keyboard shortcuts

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