versions
This commit is contained in:
@@ -32,6 +32,20 @@ This is a Model Context Protocol (MCP) server that exposes cremote's web automat
|
||||
|
||||
## Available Tools (27 Total)
|
||||
|
||||
### Version Information
|
||||
|
||||
#### `version_cremotemcp`
|
||||
Get version information for MCP server and daemon.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "version_cremotemcp",
|
||||
"arguments": {}
|
||||
}
|
||||
```
|
||||
|
||||
Returns version information for both the MCP server and the connected daemon.
|
||||
|
||||
### Core Web Automation Tools (10 tools)
|
||||
|
||||
#### 1. `web_navigate_cremotemcp`
|
||||
|
BIN
mcp/cremote-mcp
BIN
mcp/cremote-mcp
Binary file not shown.
26
mcp/main.go
26
mcp/main.go
@@ -14,6 +14,8 @@ import (
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
const Version = "2.0.0"
|
||||
|
||||
// CremoteServer wraps the cremote client for MCP
|
||||
type CremoteServer struct {
|
||||
client *client.Client
|
||||
@@ -80,6 +82,30 @@ func main() {
|
||||
// Create MCP server
|
||||
mcpServer := server.NewMCPServer("cremote-mcp", "2.0.0")
|
||||
|
||||
// Register version tool
|
||||
mcpServer.AddTool(mcp.Tool{
|
||||
Name: "version_cremotemcp",
|
||||
Description: "Get version information for MCP server and daemon",
|
||||
InputSchema: mcp.ToolInputSchema{
|
||||
Type: "object",
|
||||
Properties: map[string]any{},
|
||||
Required: []string{},
|
||||
},
|
||||
}, func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
||||
// Get daemon version
|
||||
daemonVersion, err := cremoteServer.client.GetVersion()
|
||||
if err != nil {
|
||||
daemonVersion = fmt.Sprintf("Unable to connect: %v", err)
|
||||
}
|
||||
|
||||
return &mcp.CallToolResult{
|
||||
Content: []mcp.Content{
|
||||
mcp.NewTextContent(fmt.Sprintf("MCP Server version: %s\nDaemon version: %s", Version, daemonVersion)),
|
||||
},
|
||||
IsError: false,
|
||||
}, nil
|
||||
})
|
||||
|
||||
// Register web_navigate tool
|
||||
mcpServer.AddTool(mcp.Tool{
|
||||
Name: "web_navigate",
|
||||
|
Reference in New Issue
Block a user