Prompt Log MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Prompt Log MCP Server
A lightweight Model Context Protocol (MCP) server that logs prompts from Claude Code and Claude Desktop for reflection and journaling purposes.
Features
ð Privacy-First: All data stored locally by default
ð Workflow-Based Logging: Integrate logging into your Claude workflow via CLAUDE.md
ð Search & Query: Find historical prompts with powerful search
ð Statistics: Track usage patterns and prompt frequency
ð·ïļ Tagging System: Organize prompts with custom tags
ðĪ Export Options: Export to JSON, CSV, or Markdown
ðŠķ Lightweight: Minimal resource usage with SQLite backend
Related MCP server: MCP Prompt Manager
Installation
Prerequisites
Node.js 18+
npm or yarn
Claude Code and/or Claude Desktop with MCP support
Quick Start
Clone this repository:
git clone https://github.com/r-strawser/prompt-log.git
cd prompt-logInstall dependencies:
npm installBuild the project:
npm run buildCreate the data directory (for first-time setup):
mkdir -p data(Optional) Configure environment variables:
cp .env.example .env
# Edit .env to customize settingsImportant Notes
The SQLite database will be created automatically on first use
Default database location:
./data/prompts.dbYou can change the location via
PROMPT_LOG_DB_PATHenvironment variable
Configuration
Claude Code Configuration
Add the following to your Claude Code settings:
{
"mcpServers": {
"prompt-log": {
"command": "node",
"args": ["/path/to/prompt-log/dist/index.js"],
"env": {
"PROMPT_LOG_DB_PATH": "~/.prompt-log/prompts.db"
}
}
}
}Claude Desktop Configuration
Open Claude Desktop settings
Navigate to MCP Servers section
Add a new server with:
Name:
prompt-logCommand:
nodeArguments:
/path/to/prompt-log/dist/index.js
Usage
Once configured, the server provides logging tools that can be called manually or integrated into your workflow.
Available MCP Tools
Query Prompts
Search through your historical prompts:
Use the query_prompts tool to search for "function" from claude-code with limit 10Export Prompts
Export prompts to various formats:
Use the export_prompts tool with format "markdown" and startDate "2024-01-01"Get Statistics
View usage statistics:
Use the get_stats toolTag Prompts
Add tags to organize prompts:
Use the tag_prompt tool with promptId 123 and tags ["javascript", "async"]Environment Variables
Variable | Description | Default |
| Database file location |
|
| Enable debug logging |
|
| Maximum prompts to keep |
|
| Auto-delete after X days |
|
Database Schema
The SQLite database uses the following schema:
prompts (
id: INTEGER PRIMARY KEY,
timestamp: TEXT,
app_source: TEXT,
prompt_text: TEXT,
session_id: TEXT,
tags: TEXT (JSON array),
metadata: TEXT (JSON object)
)Development
Run in development mode with auto-reload:
npm run devSecurity Considerations
All data is stored locally by default
No external network requests are made
Database file permissions should be set appropriately
Consider enabling encryption for sensitive prompts
Making Logging Feel Automatic
While MCP servers can't intercept prompts automatically, you can create a workflow that feels automatic:
Using CLAUDE.md for Workflow Integration
Create a CLAUDE.md file in your project root:
# Project Assistant Instructions
When I provide a new prompt or task:
1. First, log it using: Use the log_prompt tool with prompt "[the user's prompt]" and appSource "claude-code"
2. Then proceed with the actual task
This helps maintain a complete history of our interactions.This way, Claude will log prompts as part of its normal workflow when working in that project.
Troubleshooting
Prompts not being logged
Remember: logging requires explicit tool calls (manual or via CLAUDE.md workflow)
Check that the server is listed in your Claude app's MCP configuration
Verify the database path is writable
Check logs for any error messages
Database locked errors
The server uses WAL mode for better concurrent access
If issues persist, ensure only one instance is running
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogâĶ
This server cannot be deployed
Maintenance
Related MCP Connectors
Your versioned prompt library: search, read, save and version prompts from Claude Code.
Save, find, and run your reusable AI prompts and multi-step workflows.
Team prompt library with version control and reviews. Save, search and reuse prompts via MCP.
Manage, version, and publish LLM prompts with blocks, variables, and evaluations.
Related MCP Servers
- AlicenseAqualityDmaintenanceAllows users to save, organize, and manage AI prompts, folders, and tags directly within MCP-compatible tools like Claude and Cursor. It supports version history tracking, prompt searching, and the ability to save public templates to a personal collection.2017 npmMIT
- AlicenseBqualityDmaintenanceEnables AI models like Claude to manage local prompt files with CRUD operations, fuzzy search, categorization, templates, version control, and favorites.325MIT
- AlicenseAqualityDmaintenanceEnables personal knowledge management through Claude Desktop, allowing users to capture thoughts, connect ideas, and reflect on thinking changes via natural conversation.723MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude Desktop to perform local-first semantic search, ingest documents, and manage a private knowledge base with hybrid search, PII redaction, and multi-format support.1MIT