This commit is contained in:
Josh at WLTechBlog
2025-08-18 13:01:03 -05:00
parent 4ea5615ef8
commit 1216210150
7 changed files with 84 additions and 0 deletions

View File

@@ -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`

Binary file not shown.

View File

@@ -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",