Documentation
¶
Index ¶
- Variables
- func DelServer(sid string)
- func ServeHTTP(w http.ResponseWriter, r *http.Request)
- func SetServer(sid string, name string, version string, tools ...ITool)
- func SetServerByOpenapi(sid, name, version, content string) error
- type API
- type BodyParam
- type ContentType
- type Handler
- type ITool
- type MCPConfig
- type MCPInfo
- type Param
- type Position
- type Server
- type Tool
- type TransportType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ServiceBasePath = "mcp/service" GlobalBasePath = "mcp/global" AppBasePath = "mcp/app" OpenGlobalMCPPath = "/openapi/v1/global/mcp" OpenAppMCPPath = "/openapi/v1/app/mcp" OpenServiceMCPPath = "/openapi/v1/service/mcp" )
Functions ¶
func SetServerByOpenapi ¶
Types ¶
type BodyParam ¶
type BodyParam struct {
// contains filtered or unexported fields
}
func NewBodyParam ¶
type ContentType ¶
type ContentType string
const ( ContentTypeJSON ContentType = "application/json" ContentTypeXML ContentType = "application/xml" ContentTypeHTML ContentType = "text/html" ContentTypeText ContentType = "text/plain" ContentTypeForm ContentType = "application/x-www-form-urlencoded" ContentTypeFile ContentType = "multipart/form-data" )
type ITool ¶
type ITool interface {
Tool() server.ServerTool
}
type MCPConfig ¶
type MCPConfig struct {
Type TransportType `json:"type"`
URL string `json:"url"`
Headers map[string]string `json:"headers,omitempty"`
AlwaysAllow []string `json:"alwaysAllow,omitempty"`
}
func NewMCPConfig ¶
type MCPInfo ¶
type Param ¶
type Param struct {
// contains filtered or unexported fields
}
func (*Param) Description ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func DefaultMCPServer ¶
func DefaultMCPServer() *Server
type Tool ¶
type Tool struct {
// contains filtered or unexported fields
}
func (*Tool) Tool ¶
func (t *Tool) Tool() server.ServerTool
type TransportType ¶
type TransportType string
const ( TransportTypeStreamableHTTP TransportType = "streamable-http" TransportTypeSSE TransportType = "sse" )
Click to show internal directories.
Click to hide internal directories.