How beehiveinnovations/pal-mcp-server works
PAL MCP is an MCP server that lets a CLI or IDE client invoke specialized AI tools, retain conversation context, and use multiple model providers. The main path is client request → server dispatch and model resolution → simple or guided workflow tool → provider response → MCP result. Workflow tools support distinct activities such as code review, debugging, planning, and validation; the separate clink bridge launches external AI CLIs. The README documents broader capabilities than the sampled implementation excerpts, so uncertain internal wiring is omitted.
Main entry points: server.py Tool registry · workflow_mixin.py Workflow tools · providers Provider adapters · clink.py Clink tool
Components 20
MCP server
- MCP server
server.py - Tool registry
server.py
AI tools
- Simple tools
tools/simple/base.py - Workflow tools
tools/workflow/workflow_mixin.py - Code review
tools/codereview.py - Debugging
tools/debug.py - Planning
tools/planner.py - Analysis tools
tools/analyze.py - Validation tools
tools/precommit.py
Model providers
- Provider registry
providers/registry.py - Provider adapters
providers - Model registries
providers/registries
Conversation context
- Conversation memory
utils/conversation_memory.py - Thread storage
utils/storage_backend.py
CLI bridge
- Clink tool
tools/clink.py - CLI configuration
clink/registry.py - CLI agents
clink/agents
Other components
- CLI / IDE client
- AI model service
- External AI CLIs
Connections 21
- CLI / IDE client → MCP server: sends requests
- MCP server → Tool registry: dispatches tools
- Tool registry → Simple tools: invokes
- Tool registry → Workflow tools: invokes
- Workflow tools → Code review: specializes
- Workflow tools → Debugging: specializes
- Workflow tools → Planning: specializes
- Tool registry → Analysis tools: dispatches
- Tool registry → Validation tools: dispatches
- MCP server → Provider registry: resolves models
- Provider registry → Provider adapters: selects provider
- Provider adapters → Model registries: reads capabilities
- Simple tools → Provider adapters: requests completions
- CLI / IDE client → Conversation memory: continues threads
- MCP server → Conversation memory: records turns
- Conversation memory → Thread storage: reads and writes
- CLI / IDE client → Clink tool: invokes
- Clink tool → CLI configuration: loads CLI config
- Clink tool → CLI agents: launches agents
- CLI agents → External AI CLIs: runs subprocess
- Provider adapters → AI model service: sends model requests