返回 last30days-skill
main.go
1 // Package main is the entry point for the last30days MCP server bundled
2 // as a .mcpb for Claude Desktop. The server registers a single research
3 // tool (see internal/tools) and serves it over stdio. See mcp/README.md
4 // for build and packaging instructions.
5 package main
6
7 import (
8 "fmt"
9 "os"
10
11 "github.com/mark3labs/mcp-go/server"
12
13 "github.com/mvanhorn/last30days-skill/mcp/internal/tools"
14 )
15
16 // Version is stamped at build time via -ldflags "-X main.Version=<tag>".
17 // It namespaces the per-user cache directory in internal/engine so multiple
18 // installed versions can coexist without clobbering each other.
19 var Version = "dev"
20
21 const (
22 serverName = "last30days"
23 serverVersion = "1"
24 )
25
26 func main() {
27 s := server.NewMCPServer(
28 serverName,
29 serverVersion,
30 server.WithToolCapabilities(false),
31 )
32
33 tools.Register(s, tools.Config{Version: Version})
34
35 if err := server.ServeStdio(s); err != nil {
36 fmt.Fprintf(os.Stderr, "last30days-pp-mcp: %v\n", err)
37 os.Exit(1)
38 }
39 }
40
40 lines GO