feat: add go helper client and mcp tools
This commit is contained in:
22
cmd/isphere-mcp/main.go
Normal file
22
cmd/isphere-mcp/main.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"os"
|
||||
"os/signal"
|
||||
|
||||
"github.com/modelcontextprotocol/go-sdk/mcp"
|
||||
|
||||
"isphere-ai-bridge/internal/mcpserver"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
defer stop()
|
||||
|
||||
server := mcpserver.NewServer()
|
||||
if err := server.Run(ctx, &mcp.StdioTransport{}); err != nil {
|
||||
log.Fatalf("isphere mcp server stopped: %v", err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user