Execution Journal
An MCP server that helps AI coordinate sequential tool calls and maintain a comprehensive journal of execution workflows, decisions, and actions.
README
Execution Journal
An MCP server that helps AI coordinate sequential tool calls and maintain a comprehensive journal of execution workflows, decisions, and actions.
What This System Does
Execution Journal is a tool execution planning system that provides:
- Sequential Planning: Design and execute sequences of tool calls
- Execution Tracking: Monitor progress and status of each step
- Decision Recording: Log all decisions made during execution
- Action Journal: Record manual actions taken for audit trails
- Contextual Awareness: Understand relationships between tool calls
- Failure Policies: Define how failures in one step affect other steps
- History Management: Query and clean up execution history
Core Concept
This system acts as a durable memo pad for AI actions and decisions. It doesn't execute rollbacks automatically - instead, it provides a comprehensive record of what was planned, what was executed, and what decisions were made along the way.
Available Tools
Plan Management
record_plan- Create and store execution plans with cancellability metadata and failure policiesrecord_execution_start- Start executing a plan and track progress
Execution Control
query_ledger- Check execution status, progress, and history for a specific executionquery_history- Query execution history with comprehensive filtering and paginationrecord_decision- Log decisions made during execution (stop/continue)record_action- Record manual actions taken for audit purposes
History Management
cleanup_history- Clean up old and completed execution history to free up space
Usage Examples
1. Create a Travel Planning Plan
{
"name": "Summer Vacation Planning",
"description": "Plan a complete summer vacation with hotel, car, and activities",
"steps": [
{
"id": "book_hotel",
"name": "Book Hotel",
"tool": "book_hotel",
"parameters": {"destination": "Paris", "dates": "2024-07-15 to 2024-07-22"},
"cancellable": "partially-reversible",
"failure_policy": {
"propagate_to": ["book_car", "book_activities"],
"action": "cancel_dependent",
"reason": "Hotel is essential for vacation planning"
}
},
{
"id": "book_car",
"name": "Book Rental Car",
"tool": "book_car",
"parameters": {"pickup_location": "Paris Airport", "dates": "2024-07-15 to 2024-07-22"},
"cancellable": "reversible",
"failure_policy": {
"propagate_to": ["book_activities"],
"action": "continue_others",
"reason": "Car is nice to have but not essential"
}
}
]
}
2. Start Execution
{
"plan_id": "plan_abc123",
"notes": "Starting vacation planning execution"
}
3. Monitor Progress
{
"execution_id": "exec_xyz789",
"include_step_details": true,
"include_events": true
}
4. Query History
{
"query_type": "recent",
"limit": 10,
"include_plans": true,
"include_step_details": false
}
5. Clean Up History
{
"cleanup_type": "completed_old",
"older_than_days": 30,
"dry_run": true
}
6. Record Decisions and Actions
{
"execution_id": "exec_xyz789",
"action": "stop",
"reason": "Hotel booking failed, stopping related bookings"
}
Project Structure
src/
├── tools/ # Tool implementations
│ ├── RecordPlanTool.ts # Plan creation
│ ├── RecordExecutionStartTool.ts # Execution start
│ ├── QueryLedgerTool.ts # Status monitoring
│ ├── QueryHistoryTool.ts # History querying
│ ├── RecordDecisionTool.ts # Decision logging
│ ├── RecordActionTool.ts # Action recording
│ └── CleanupHistoryTool.ts # History cleanup
├── prompts/ # AI guidance
│ └── ExecutionPlanningPrompt.ts
├── resources/ # Documentation and examples
│ ├── ExecutionDocumentationResource.ts
│ └── ExecutionExamplesResource.ts
├── core/ # Core system components
│ ├── db.ts # Database setup
│ └── execution-manager.ts # Execution orchestration
└── types/ # TypeScript definitions
└── execution.ts # Core interfaces
Installation & Setup
# Clone the repository
git clone <repository-url>
cd execution-journal
# Install dependencies
npm install
# Build the project
npm run build
# Start the server
npm start
MCP Client Configuration
Add this to your MCP client configuration:
{
"mcpServers": {
"execution-journal": {
"command": "node",
"args": ["/path/to/dist/index.js"],
"env": {}
}
}
}
Key Features
- Sequential Execution: Tools are called one after another
- Cancellability Metadata: Each step indicates reversibility level
- Failure Policies: Define how failures propagate to other steps
- Comprehensive Journaling: All decisions and actions are recorded
- Execution Monitoring: Real-time status tracking
- History Management: Query and clean up execution history
- Audit Trail: Complete history for compliance and debugging
Cancellability Levels
reversible: Can be completely undonepartially-reversible: Can be partially undoneirreversible: Cannot be undone
Failure Policy Options
cancel_all: Cancel all remaining steps when this step failscancel_dependent: Cancel only steps that depend on this stepcontinue_others: Continue with other steps even if this failsmanual_decision: Require manual decision on how to proceed
History Query Types
recent: Most recently updated executionsincomplete: Pending or running executionsfailed: Failed or cancelled executionscompleted: Successfully completed executionsall: All executions with pagination
Cleanup Options
completed_old: Remove old completed executionsfailed_old: Remove old failed executionsorphaned_plans: Remove plans with no executionsall_old: Remove all old items
Best Practices
- Plan Design: Keep steps focused and consider failure scenarios
- Failure Policies: Design policies that make business sense
- Monitoring: Check execution status regularly
- Decision Recording: Log all decisions promptly
- Action Documentation: Record what was done and why
- Context Awareness: Understand how tool failures affect related operations
- History Management: Regularly clean up old data to maintain performance
Development Status
- ✅ Core tools implemented
- ✅ MCP integration complete
- ✅ Database-backed journaling
- ✅ Failure policy support
- ✅ History management tools
- ✅ Comprehensive documentation
Contributing
This project focuses on simplicity and clarity. Contributions should maintain the core principle of providing execution support while improving the user experience for AI-driven tool coordination.
License
MIT License - See LICENSE file for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。