loading…
Search for a command to run...
loading…
An MCP server that provides session-based shell command execution and file management with intelligent LLM-powered summarization. It enables users to manage iso
An MCP server that provides session-based shell command execution and file management with intelligent LLM-powered summarization. It enables users to manage isolated workflows and track progress through automated event logging and session history.

A Model Context Protocol (MCP) server that provides session-based command execution with intelligent LLM-powered summarization.
fastmcp librarydazllm library for LLM integrationgit clone https://github.com/yourusername/daz-command-mcp.git
cd daz-command-mcp
pip install -r requirements.txt
lm-studio:openai/gpt-oss-20b)python main.py
daz_sessions_list() - List all sessions and identify the active onedaz_session_create(name, description) - Create and activate a new sessiondaz_session_open(session_id) - Open and activate an existing session daz_session_current() - Get details of the currently active sessiondaz_session_close() - Close the current sessiondaz_session_rename(old_name, new_name) - Rename an existing sessiondaz_session_delete(session_name) - Delete a session by moving to deleted_sessionsAll command and file operations require an active session and context parameters:
daz_command_cd(directory, current_task, summary_of_what_we_just_did, summary_of_what_we_about_to_do) - Change working directorydaz_command_read(file_path, current_task, summary_of_what_we_just_did, summary_of_what_we_about_to_do) - Read a text filedaz_command_write(file_path, content, current_task, summary_of_what_we_just_did, summary_of_what_we_about_to_do) - Write a text filedaz_command_run(command, current_task, summary_of_what_we_just_did, summary_of_what_we_about_to_do, timeout=60) - Execute shell commandsdaz_add_learnings(learning_info) - Add important discoveries and context to the sessiondaz_instructions_read() - Read current session instructionsdaz_instructions_add(instruction) - Add a new instruction to the sessiondaz_instructions_replace(instructions) - Replace all instructions with a new listdaz_record_user_request(user_request) - Record a user request at the start of multi-step tasks# Create a new session
daz_session_create("Setup Project", "Setting up a new Python project with dependencies")
# Navigate to project directory
daz_command_cd("/path/to/project",
"Setting up Python project",
"Created new session for project setup",
"Navigate to project root directory")
# Run commands
daz_command_run("pip install -r requirements.txt",
"Setting up Python project",
"Navigated to project directory",
"Install project dependencies")
# Read configuration
daz_command_read("config.json",
"Setting up Python project",
"Installed dependencies successfully",
"Review current configuration settings")
# Write new file
daz_command_write("setup.py", "...",
"Setting up Python project",
"Reviewed configuration file",
"Create package setup file")
Sessions are stored as JSON files in the sessions/ directory with the following structure:
{
"id": "unique-session-id",
"name": "Session Name",
"description": "Detailed description",
"created_at": 1692123456.789,
"updated_at": 1692123456.789,
"summary": "LLM-generated summary",
"progress": "Current progress status",
"current_directory": "/current/working/dir",
"events_count": 42
}
Every operation is logged with comprehensive details in event_log.jsonl:
{
"timestamp": 1692123456.789,
"type": "run|read|write|cd|user_request|learning",
"current_task": "The task being worked on",
"summary_of_what_we_just_did": "What was just completed",
"summary_of_what_we_about_to_do": "What's planned next",
"inputs": {...},
"outputs": {...},
"duration": 0.123
}
The server uses asynchronous LLM processing to maintain session summaries:
Edit the LLM_MODEL_NAME constant in src/models.py:
LLM_MODEL_NAME = "your-model-name"
Sessions are stored in ./sessions/ by default. This can be modified by changing the SESSIONS_DIR constant in src/models.py.
This MCP server integrates with Claude Desktop and other MCP-compatible clients. Add it to your MCP configuration:
{
"mcpServers": {
"daz-command": {
"command": "python",
"args": ["/path/to/main.py"]
}
}
}
daz-command-mcp/
├── README.md # This file
├── main.py # Entry point
├── requirements.txt # Dependencies
├── images/ # Documentation images
├── sessions/ # Session storage (auto-created)
└── src/ # Source code
├── __init__.py
├── command_executor.py # Command execution logic
├── history_manager.py # Session history management
├── mcp_tools.py # MCP tool definitions
├── models.py # Data models and constants
├── session_manager.py # Session lifecycle management
├── summary_generator.py # LLM summary generation
├── summary_worker.py # Background summarization worker
├── utils.py # Utility functions
└── tests/ # Unit tests
├── test_add_learnings.py
├── test_initialization_fix.py
├── test_llm_system_integration.py
├── test_new_parameter_system.py
└── test_summary_generation.py
Run the comprehensive test suite:
# Run all tests
python -m pytest src/tests/
# Run specific test
python -m pytest src/tests/test_summary_generation.py -v
# Run with coverage
python -m pytest src/tests/ --cov=src
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)[Add your license here]
For issues and questions, please open an issue on GitHub or contact [your contact information].
Built with ❤️ for the Model Context Protocol ecosystem
This project is licensed under CC BY-NC 4.0 - free to use and modify, but no commercial use without permission.
Add this to claude_desktop_config.json and restart Claude Desktop.
{
"mcpServers": {
"daz-command-mcp-server": {
"command": "npx",
"args": []
}
}
}