Add simple MCP server
Proof of concept of working MCP server for Probo. Currently the official MCP library does not support session that why the server is configured in stateless mode. It seams the input jsonschema is not used to perform any validation, so we should figuring out how to validate the input properly. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -30,6 +30,7 @@ import (
|
||||
"go.probo.inc/probo/pkg/probo"
|
||||
"go.probo.inc/probo/pkg/saferedirect"
|
||||
console_v1 "go.probo.inc/probo/pkg/server/api/console/v1"
|
||||
mcp_v1 "go.probo.inc/probo/pkg/server/api/mcp/v1"
|
||||
trust_v1 "go.probo.inc/probo/pkg/server/api/trust/v1"
|
||||
"go.probo.inc/probo/pkg/trust"
|
||||
)
|
||||
@@ -207,5 +208,11 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
// Mount the trust API with authentication
|
||||
router.Mount("/trust/v1", s.trustAPIHandler)
|
||||
|
||||
// Mount the MCP API - use Route instead of Mount to preserve path for handler
|
||||
router.Mount(
|
||||
"/mcp/v1",
|
||||
mcp_v1.NewMux(s.cfg.Probo),
|
||||
)
|
||||
|
||||
router.ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user