A minimal MCP server for logging, tracking, and documenting development prompts
Project description
Prompt Docu
A minimal Model Context Protocol (MCP) server for logging, tracking, and documenting development prompts.
Overview
What problem does it solve?
As software development has shifted from manual coding to writing prompts for code generation, Prompt Docu addresses the critical need to document and track the evolution of AI-assisted development sessions.
Prompt Docu is a lightweight tool designed to capture the context of your development sessions. It runs as an MCP server and provides utilities to save prompts, track file contexts, and aggregate logs into structured reports.
Features
This server exposes seven powerful tools to help manage your development documentation workflow:
Core Logging Tools
-
save_current_prompt
Captures the current prompt and list of active file contexts, saving them to temporary logs (temp_logs/). Use this to document incremental changes or manual code modifications during development. -
save_all_prompts
Archives the entire session's prompts and file history into a timestamped final log (final_logs/). This creates a permanent record of all prompts used in a session.
Analysis & Aggregation Tools
-
aggregate_prompts
Processes all un-aggregated temporary logs and compiles them into a comprehensive, structured report inaggregate_logs/. This tool:- Saves the current prompt first
- Reads all
.txtfiles fromtemp_logs/that haven't been processed yet - Parses prompts to extract timestamps, actions, and file references
- Groups changes by file with chronological tracking
- Maintains a CSV tracker (
aggregation_tracker.csv) to prevent duplicate processing - Creates detailed reports with three sections: source files, per-file aggregate points, and raw content
-
summarize_aggregates
Creates a comprehensive summary of all aggregate files and saves it tofinal_logs/. This tool analyzes all aggregate reports to extract:- Overview of all aggregate files processed
- All files modified/referenced across sessions
- Unique file lists and statistics
- Total prompt entries across all aggregates
-
create_readme
Generates a comprehensive README.md in theprompt_logs/directory using data fromfinal_logs/. The generated README includes:- Project overview and directory structure
- Complete file listings with sizes and timestamps
- Workflow documentation
- Available tools reference
- Statistics and metadata
Maintenance Tools
-
clear_temp_logs
Removes all.txtfiles fromtemp_logs/folder while preserving directory structure. Use this after aggregation to clean up processed temporary files. -
clear_aggregate_logs
Removes all.txtfiles fromaggregate_logs/folder while preserving the CSV tracker. Use this to clean up old aggregate reports while maintaining processing history.
Workflow
The tools are designed to work in a three-tier workflow:
-
Capture Phase (
temp_logs/)- Use
save_current_promptto capture individual prompts during active development - Each prompt is saved with UTC timestamp, full text, and file context
- Use
-
Analysis Phase (
aggregate_logs/)- Use
aggregate_promptsto process temp logs into structured reports - CSV tracker ensures each temp file is only aggregated once
- Reports organize changes chronologically per file
- Use
-
Archive Phase (
final_logs/)- Use
save_all_promptsto create permanent session archives - Use
summarize_aggregatesto create high-level summaries - Use
create_readmeto generate documentation from final logs
- Use
-
Cleanup Phase
- Use
clear_temp_logsafter successful aggregation - Use
clear_aggregate_logsto remove old aggregate reports
- Use
Directory Structure
The server organizes logs automatically based on your configuration:
prompt_logs/
├── temp_logs/ # Individual prompt captures (working directory)
│ └── prompt_YYYYMMDD_HHMMSS.txt
├── final_logs/ # Complete session archives and summaries
│ ├── all_prompts_YYYYMMDD_HHMMSS.txt
│ └── aggregate_summary_YYYYMMDD_HHMMSS.txt
├── aggregate_logs/ # Compiled analysis reports
│ ├── aggregate_YYYYMMDD_HHMMSS.txt
│ └── aggregation_tracker.csv
└── README.md # Auto-generated documentation (optional)
Key Files
prompt_*.txtintemp_logs/: Individual prompt captures with timestamps and file contextsall_prompts_*.txtinfinal_logs/: Complete session logs with all promptsaggregate_*.txtinaggregate_logs/: Structured reports with per-file change trackingaggregate_summary_*.txtinfinal_logs/: High-level summaries of all aggregatesaggregation_tracker.csv: CSV database tracking which temp files have been aggregated to prevent duplicate processing
Configuration
Paths and settings are managed in config.toml. You can customize the base folder and subdirectory names to fit your project structure.
[paths]
# Base folder name for logs (relative to project directory)
base_folder = "prompt_logs"
# Subdirectory names within base_logs_location
temp_logs = "temp_logs"
final_logs = "final_logs"
aggregate_logs = "aggregate_logs"
All directories are created automatically on server startup if they don't exist.
Installation
Requirements:
- Python 3.8 or higher (Python 3.12+ recommended)
Via pip (Recommended)
Install the package from PyPI:
pip install prompt-docu
From Source
Alternatively, clone the repository and install locally:
git clone https://github.com/apurva-bhatt/prompt_docu.git
cd prompt_docu
pip install -e .
Running the Server
After installation, you can start the MCP server directly:
prompt-docu
MCP Client Configuration
Claude Desktop
Add this configuration to your Claude Desktop config file:
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"prompt-docu": {
"command": "prompt-docu"
}
}
}
Other MCP Clients
For other MCP clients (VS Code extensions, custom implementations), configure them to execute the prompt-docu command as the server entry point.
Usage Example
Typical workflow for documenting a development session:
- During development, prompts are automatically captured when you use
save_current_prompt - When ready to analyze, call
aggregate_promptsto create structured reports - Use
summarize_aggregatesto create a high-level overview - Archive the entire session with
save_all_prompts - Optionally generate documentation with
create_readme - Clean up with
clear_temp_logsafter aggregation
Tips
Use larger models with prompt docu like claude sonnet 4.5 and others.
The project is still in development stage, we request users to please create PRs if you see any limitations.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prompt_docu-0.1.1.tar.gz.
File metadata
- Download URL: prompt_docu-0.1.1.tar.gz
- Upload date:
- Size: 28.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af079daf1049480f4d09b8ef690a975dafd00189ba25645311cf90faf1b09cf2
|
|
| MD5 |
8bf628dbd94a53f9ab49a432d6881205
|
|
| BLAKE2b-256 |
c1692f6fab3a3dcd5e39786570de27e1d9faf63c36247fe6ae0649e733301809
|
File details
Details for the file prompt_docu-0.1.1-py3-none-any.whl.
File metadata
- Download URL: prompt_docu-0.1.1-py3-none-any.whl
- Upload date:
- Size: 27.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea5630adcba5901460651425c55e27649d626dd3b3f24a581fc58b729ef266b
|
|
| MD5 |
975101072c4dd8086d84b28567c2ac54
|
|
| BLAKE2b-256 |
05c6de8bc1394787ba9d0c37b884b22cf19aed0657166bfc288793e6c64e9f9d
|