1// SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
2//
3// SPDX-License-Identifier: LicenseRef-MutuaL-1.2
4
5// Package main is the entrypoint for the sb-mcp SilverBullet MCP server.
6package main
7
8import (
9 "context"
10 "os"
11
12 "github.com/charmbracelet/fang"
13 "github.com/spf13/cobra"
14
15 "git.secluded.site/sb-mcp/internal/server"
16)
17
18func main() {
19 root := &cobra.Command{
20 Use: "sb-mcp",
21 Short: "SilverBullet MCP Server",
22 Long: "A Model Context Protocol server for SilverBullet, providing Lua execution, screenshots, and console logs via the Runtime API.",
23 }
24
25 root.AddCommand(serveCmd())
26
27 ctx := context.Background()
28 if err := fang.Execute(ctx, root, fang.WithVersion(server.Version), fang.WithNotifySignal(os.Interrupt, os.Kill)); err != nil {
29 os.Exit(1)
30 }
31}