-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path__main__.py
More file actions
33 lines (28 loc) · 932 Bytes
/
__main__.py
File metadata and controls
33 lines (28 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import sys
from main import mcp
from rich.console import Console
from rich.panel import Panel
from rich.text import Text
def main():
console = Console()
# Create welcome banner
title = Text("Curl MCP Service", style="bold magenta")
subtitle = Text("Natural Language Curl Command Interface", style="cyan")
# Show startup banner
console.print(Panel.fit(
f"{title}\n{subtitle}",
border_style="bright_blue",
padding=(1, 2)
))
try:
console.print("[green]Starting MCP service...[/]")
mcp.run(transport="stdio")
console.print("[green]Service running. Press Ctrl+C to stop.[/]")
except KeyboardInterrupt:
console.print("\n[yellow]Shutting down service...[/]")
sys.exit(0)
except Exception as e:
console.print(f"[red]Error starting service: {str(e)}[/]")
sys.exit(1)
if __name__ == "__main__":
main()