Documentation
¶
Overview ¶
Package mcp implements the HTTP Streamable MCP (Model Context Protocol) server over JSON-RPC 2.0 with SSE streaming, allowing any AI agent (Claude, GPT, Cursor, etc.) to discover and call Argus tools natively.
Index ¶
Constants ¶
View Source
const ( ErrParseError = -32700 ErrInvalidRequest = -32600 ErrMethodNotFound = -32601 ErrInvalidParams = -32602 ErrInternalError = -32603 )
Standard JSON-RPC error codes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientInfo ¶
type ContentItem ¶
type InitializeParams ¶
type InitializeParams struct {
ProtocolVersion string `json:"protocolVersion"`
Capabilities map[string]any `json:"capabilities"`
ClientInfo ClientInfo `json:"clientInfo"`
}
type InitializeResult ¶
type InitializeResult struct {
ProtocolVersion string `json:"protocolVersion"`
Capabilities map[string]any `json:"capabilities"`
ServerInfo ServerInfo `json:"serverInfo"`
}
type InputSchema ¶
type JSONRPCRequest ¶
type JSONRPCResponse ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the HTTP Streamable MCP server. POST /mcp — JSON-RPC 2.0 request/response GET /mcp — SSE stream for real-time notifications OPTIONS /mcp — CORS preflight
func New ¶
func New( repo *storage.Repository, metrics *telemetry.Metrics, svcGraph *graph.Graph, vectorIdx *vectordb.Index, ) *Server
New creates a new MCP server.
type ServerInfo ¶
type Tool ¶
type Tool struct {
Name string `json:"name"`
Description string `json:"description"`
InputSchema InputSchema `json:"inputSchema"`
}
type ToolCallParams ¶
type ToolCallResult ¶
type ToolCallResult struct {
Content []ContentItem `json:"content"`
IsError bool `json:"isError,omitempty"`
}
type ToolsListResult ¶
type ToolsListResult struct {
Tools []Tool `json:"tools"`
}
Click to show internal directories.
Click to hide internal directories.