package main import ( "context" "flag" "fmt" "log" "github.com/xlgmokha/mcp/pkg/thinking" ) func printHelp() { fmt.Printf(`Sequential Thinking MCP Server DESCRIPTION: A Model Context Protocol server that provides structured thinking workflows. Enables AI agents to perform step-by-step reasoning and problem decomposition. USAGE: mcp-sequential-thinking [options] OPTIONS: --help Show this help message --session-file File to persist thinking sessions (optional) EXAMPLE USAGE: # Start the sequential thinking server mcp-sequential-thinking # Start with session persistence mcp-sequential-thinking --session-file sessions.json # Test with MCP protocol echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "sequentialthinking", "arguments": {"task": "Analyze the problem step by step"}}}' | mcp-sequential-thinking MCP CAPABILITIES: - Tools: sequentialthinking (structured reasoning workflows) - Features: Step-by-step problem decomposition, logical reasoning chains - Use cases: Complex problem solving, systematic analysis, decision making - Protocol: JSON-RPC 2.0 over stdio For detailed documentation, see: cmd/sequential-thinking/README.md `) } func main() { // Parse command line flags var help = flag.Bool("help", false, "Show help message") var sessionFile = flag.String("session-file", "", "File to persist thinking sessions") flag.Parse() if *help { printHelp() return } server := thinking.NewWithPersistence(*sessionFile) ctx := context.Background() if err := server.Run(ctx); err != nil { log.Fatalf("Server error: %v", err) } }