Rename the fork from gitea-mcp to gitea-mcp-extended to reflect the significantly expanded tool coverage (299 vs upstream's 93 tools). - Rename Go module path and all import references - Rename binary to gitea-mcp-extended in Makefile, Dockerfile, .gitignore - Point .goreleaser.yaml gitea_urls to git.lethalbits.com - Replace release-tag workflow with goreleaser + Generic Package Registry publishing - Replace release-nightly workflow with cross-platform build + nightly package publishing - Update CLAUDE.md project description and tool count
42 lines
1.0 KiB
Go
42 lines
1.0 KiB
Go
package version
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"git.lethalbits.com/lethalbits/gitea-mcp-extended/pkg/flag"
|
|
"git.lethalbits.com/lethalbits/gitea-mcp-extended/pkg/log"
|
|
"git.lethalbits.com/lethalbits/gitea-mcp-extended/pkg/to"
|
|
"git.lethalbits.com/lethalbits/gitea-mcp-extended/pkg/tool"
|
|
|
|
"github.com/mark3labs/mcp-go/mcp"
|
|
"github.com/mark3labs/mcp-go/server"
|
|
)
|
|
|
|
var Tool = tool.New()
|
|
|
|
const (
|
|
GetGiteaMCPServerVersion = "get_gitea_mcp_server_version"
|
|
)
|
|
|
|
var GetGiteaMCPServerVersionTool = mcp.NewTool(
|
|
GetGiteaMCPServerVersion,
|
|
mcp.WithDescription("Get Gitea MCP Server Version"),
|
|
)
|
|
|
|
func init() {
|
|
Tool.RegisterRead(server.ServerTool{
|
|
Tool: GetGiteaMCPServerVersionTool,
|
|
Handler: GetGiteaMCPServerVersionFn,
|
|
})
|
|
}
|
|
|
|
func GetGiteaMCPServerVersionFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
|
log.Debugf("Called GetGiteaMCPServerVersionFn")
|
|
version := flag.Version
|
|
if version == "" {
|
|
version = "dev"
|
|
}
|
|
return to.TextResult(fmt.Sprintf("Gitea MCP Server version: %v", version))
|
|
}
|