Skip to main content

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 in aggregate_logs/. This tool:

    • Saves the current prompt first
    • Reads all .txt files from temp_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 to final_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 the prompt_logs/ directory using data from final_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 .txt files from temp_logs/ folder while preserving directory structure. Use this after aggregation to clean up processed temporary files.

  • clear_aggregate_logs
    Removes all .txt files from aggregate_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:

  1. Capture Phase (temp_logs/)

    • Use save_current_prompt to capture individual prompts during active development
    • Each prompt is saved with UTC timestamp, full text, and file context
  2. Analysis Phase (aggregate_logs/)

    • Use aggregate_prompts to process temp logs into structured reports
    • CSV tracker ensures each temp file is only aggregated once
    • Reports organize changes chronologically per file
  3. Archive Phase (final_logs/)

    • Use save_all_prompts to create permanent session archives
    • Use summarize_aggregates to create high-level summaries
    • Use create_readme to generate documentation from final logs
  4. Cleanup Phase

    • Use clear_temp_logs after successful aggregation
    • Use clear_aggregate_logs to remove old aggregate reports

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_*.txt in temp_logs/: Individual prompt captures with timestamps and file contexts
  • all_prompts_*.txt in final_logs/: Complete session logs with all prompts
  • aggregate_*.txt in aggregate_logs/: Structured reports with per-file change tracking
  • aggregate_summary_*.txt in final_logs/: High-level summaries of all aggregates
  • aggregation_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:

  1. During development, prompts are automatically captured when you use save_current_prompt
  2. When ready to analyze, call aggregate_prompts to create structured reports
  3. Use summarize_aggregates to create a high-level overview
  4. Archive the entire session with save_all_prompts
  5. Optionally generate documentation with create_readme
  6. Clean up with clear_temp_logs after 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prompt_docu-0.1.1.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prompt_docu-0.1.1-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

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

Hashes for prompt_docu-0.1.1.tar.gz
Algorithm Hash digest
SHA256 af079daf1049480f4d09b8ef690a975dafd00189ba25645311cf90faf1b09cf2
MD5 8bf628dbd94a53f9ab49a432d6881205
BLAKE2b-256 c1692f6fab3a3dcd5e39786570de27e1d9faf63c36247fe6ae0649e733301809

See more details on using hashes here.

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

Hashes for prompt_docu-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ea5630adcba5901460651425c55e27649d626dd3b3f24a581fc58b729ef266b
MD5 975101072c4dd8086d84b28567c2ac54
BLAKE2b-256 05c6de8bc1394787ba9d0c37b884b22cf19aed0657166bfc288793e6c64e9f9d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page