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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
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 <path> 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)
}
}
|