Skip to main content
Glama

Scribe MCP Server

by paxocial
README.mdβ€’16.9 kB
# πŸ“ Scribe MCP Server <div align="center"> **[![Tests](https://img.shields.io/badge/tests-passing-brightgreen)](tests/)** **[![Version](https://img.shields.io/badge/version-2.1-blue)](docs/whitepapers/)** **[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)** *Enterprise-grade documentation governance for AI-powered development* **Drop-in ready** β€’ **13+ specialized templates** β€’ **Zero-config SQLite** β€’ **Production-tested** </div> --- ## πŸš€ Why Scribe MCP? Scribe transforms how AI agents and developers maintain project documentation. Instead of scattered notes and outdated docs, Scribe provides **bulletproof audit trails**, **automated template generation**, and **cross-project intelligence** that keeps your entire development ecosystem in sync. **Perfect for:** - πŸ€– **AI Agent Teams** - Structured workflows and quality grading - 🏒 **Enterprise Teams** - Audit trails and compliance documentation - πŸ‘¨β€πŸ’» **Solo Developers** - Automatic documentation that actually works - πŸ“š **Research Projects** - Structured logs and reproducible reports **Immediate Value:** - βœ… **30-second setup** - Drop into any repository and start logging - 🎯 **18+ specialized templates** - From architecture guides to bug reports - πŸ” **Cross-project search** - Find patterns across your entire codebase - πŸ“Š **Agent report cards** - Performance grading for AI workflows - πŸ›‘οΈ **Bulletproof storage** - Atomic operations with crash recovery ## ⚑ Quick Start **Get Scribe running in under 60 seconds:** ### 1️⃣ Install Dependencies ```bash # Clone and navigate to Scribe git clone <your-repo-url> cd scribe_mcp # Set up Python environment python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install 16 production-ready dependencies pip install -r requirements.txt ``` ### 2️⃣ Start Logging Immediately ```bash # From the parent directory (MCP_SPINE/) python -m scribe_mcp.scripts.scribe "πŸš€ My project is ready!" --status success --emoji πŸŽ‰ ``` **That's it!** You've just created your first structured log entry. Scribe automatically: - βœ… Created a project configuration - βœ… Generated documentation templates - βœ… Started your progress log - βœ… Provided intelligent reminders ### 3️⃣ Launch MCP Server (Optional) ```bash # Start the MCP server for Claude/Claude Code integration export SCRIBE_ROOT=$(pwd) # Set your project root python -m scribe_mcp.server ``` --- ## 🎯 Try These Examples **Project Management:** ```bash # Log project milestones python -m scribe_mcp.scripts.scribe "Completed authentication module" --status success --meta component=auth,tests=47 # Track bugs and issues python -m scribe_mcp.scripts.scribe "Fixed JWT token expiry bug" --status bug --meta severity=high,component=security ``` **Research Workflows:** ```bash # Document research findings python -m scribe_mcp.scripts.scribe "Discovered performance bottleneck in database queries" --status info --meta research=true,impact=high ``` **Team Collaboration:** ```bash # List all projects python -m scribe_mcp.scripts.scribe --list-projects # Switch between projects python -m scribe_mcp.scripts.scribe "Starting new feature work" --project frontend --status plan ``` --- ## πŸ› οΈ Installation Options ### Prerequisites - **Python 3.11+** - Modern Python with async support - **pip** - Standard Python package manager - **Optional:** PostgreSQL for team deployments (SQLite works out of the box) ### Storage Backends **πŸ—„οΈ SQLite (Default - Zero Config)** - Perfect for solo developers and small teams - No setup required - just run and go - Automatic database creation and management **🐘 PostgreSQL (Enterprise)** - Ideal for large teams and production deployments - Set environment variables before starting: ```bash export SCRIBE_STORAGE_BACKEND=postgres export SCRIBE_DB_URL=postgresql://user:pass@host:port/database ``` ### MCP Integration **For Claude Desktop:** ```json { "mcpServers": { "scribe": { "command": "python", "args": ["/absolute/path/to/scribe_mcp/server.py"], "env": { "SCRIBE_ROOT": "/absolute/path/to/scribe_mcp", "SCRIBE_STORAGE_BACKEND": "sqlite" } } } } ``` **For Claude Code CLI:** ```bash codex mcp add scribe \ --env SCRIBE_ROOT=/path/to/scribe_mcp \ --env SCRIBE_STORAGE_BACKEND=sqlite \ -- python -m scribe_mcp.server ``` --- ## 🎨 Template System Showcase **Scribe includes 13+ specialized templates** that auto-generate professional documentation: ### πŸ“‹ Document Templates - **πŸ“ Architecture Guides** - System design and technical blueprints - **πŸ“… Phase Plans** - Development roadmaps with milestones - **βœ… Checklists** - Verification ledgers with acceptance criteria - **πŸ”¬ Research Reports** - Structured investigation documentation - **πŸ› Bug Reports** - Automated issue tracking with indexing - **πŸ“Š Agent Report Cards** - Performance grading and quality metrics - **πŸ“ Progress Logs** - Append-only audit trails with UTC timestamps - **πŸ”’ Security Logs** - Compliance and security event tracking ### πŸš€ Template Features - **πŸ”’ Security Sandboxing** - Jinja2 templates run in restricted environments - **πŸ“ Template Inheritance** - Create custom template families - **🎯 Smart Discovery** - Project β†’ Repository β†’ Built-in template hierarchy - **⚑ Atomic Generation** - Bulletproof template creation with integrity verification ### Example: Generate Architecture Guide ```bash # Auto-generate a complete architecture document python -m scribe_mcp.scripts.scribe "Generated architecture guide for new project" --status success --meta template=architecture,auto_generated=true ``` --- ## πŸ’» CLI Power Tools **Scribe's command-line interface (386 lines of pure functionality)** gives you complete control: ### 🎯 Core Commands ```bash # List all available projects python -m scribe_mcp.scripts.scribe --list-projects # Log with rich metadata python -m scribe_mcp.scripts.scribe "Fixed critical bug" \ --status success \ --emoji πŸ”§ \ --meta component=auth,tests=12,severity=high # Dry run to preview entries python -m scribe_mcp.scripts.scribe "Test message" --dry-run # Switch between projects python -m scribe_mcp.scripts.scribe "Starting frontend work" \ --project mobile_app \ --status plan ``` ### 🎨 Rich Features - **🎭 Emoji Support** - Built-in emoji mapping for all status types - **πŸ“Š Metadata Tracking** - Rich key=value metadata for organization - **πŸ” Multiple Log Types** - Progress, bugs, security, and custom logs - **πŸ“… Timestamp Control** - Override timestamps for bulk imports - **🎯 Project Discovery** - Automatic project configuration detection ### Status Types & Emojis - `info` ℹ️ - General information and updates - `success` βœ… - Completed tasks and achievements - `warn` ⚠️ - Warning messages and cautions - `error` ❌ - Errors and failures - `bug` 🐞 - Bug reports and issues - `plan` πŸ“‹ - Planning and roadmap entries --- ## πŸ” Enterprise Features ### πŸ“Š Agent Report Cards **Performance grading infrastructure** for AI workflows: - Quality metrics tracking and trend analysis - Performance levels with UPSERT operations - Automated agent evaluation and reporting ### πŸ”’ Security & Compliance - **πŸ›‘οΈ Security Sandboxing** - Restricted Jinja2 environments with 22+ built-in controls - **πŸ“‹ Audit Trails** - Complete change tracking with metadata - **πŸ” Access Control** - Path validation and input sanitization - **πŸ“Š Compliance Reporting** - Structured logs for regulatory requirements ### ⚑ Advanced Search **Phase 4 Enhanced Search** capabilities: - πŸ” **Cross-Project Validation** - Find patterns across your entire codebase - πŸ“Š **Relevance Scoring** - 0.0-1.0 quality filtering - 🎯 **Code Reference Verification** - Validate referenced code exists - πŸ“… **Temporal Filtering** - Search by time ranges ("last_30d", "last_7d") ### πŸ’Ύ Bulletproof Storage - **πŸ—„οΈ Multi-Backend Support** - SQLite (zero-config) + PostgreSQL (enterprise) - **⚑ Atomic Operations** - Temp-file-then-rename with fsync guarantees - **πŸ”„ Write-Ahead Logging** - Bulletproof crash recovery with journaling - **βœ… Integrity Verification** - Automatic corruption detection and recovery --- ## 🧠 Intelligent Reminders **Scribe keeps your documentation in sync** with intelligent context awareness: ### πŸ“‹ Smart Reminders Every MCP tool response includes contextual reminders about: - πŸ“… **Stale Documentation** - When architecture docs need updates - ⏰ **Overdue Logs** - Gentle nudges to maintain progress tracking - 🎯 **Project Context** - Active project status and recent activity - πŸ”„ **Drift Detection** - When implementation deviates from plans ### βš™οΈ Customization ```json { "name": "my_project", "defaults": { "reminder": { "tone": "friendly", "log_warning_minutes": 15, "log_urgent_minutes": 30, "severity_weights": {"warning": 7, "urgent": 10} } } } ``` ### 🌍 Environment Variables - `SCRIBE_REMINDER_IDLE_MINUTES` - Work session reset timeout (default: 45) - `SCRIBE_REMINDER_WARMUP_MINUTES` - Grace period after resuming (default: 5) - `SCRIBE_REMINDER_DEFAULTS` - JSON configuration for all projects --- ## πŸ—οΈ Project Structure ``` scribe_mcp/ # πŸ›οΈ Main Scribe MCP server β”œβ”€β”€ πŸ“ config/ β”‚ β”œβ”€β”€ πŸ“ projects/ # Per-project configurations β”‚ └── πŸ“„ mcp_config.json # Sample MCP configuration β”œβ”€β”€ πŸ“ docs/dev_plans/ # Auto-generated documentation β”‚ β”œβ”€β”€ πŸ“„ ARCHITECTURE_GUIDE.md β”‚ β”œβ”€β”€ πŸ“„ PHASE_PLAN.md β”‚ β”œβ”€β”€ πŸ“„ CHECKLIST.md β”‚ └── πŸ“„ PROGRESS_LOG.md β”œβ”€β”€ πŸ“ templates/ # 🎨 Jinja2 template system β”‚ β”œβ”€β”€ πŸ“ documents/ # 13+ specialized templates β”‚ β”œβ”€β”€ πŸ“ fragments/ # Reusable template pieces β”‚ └── πŸ“ custom/ # Your custom templates β”œβ”€β”€ πŸ“ tools/ # πŸ”§ MCP tool implementations β”œβ”€β”€ πŸ“ storage/ # πŸ’Ύ Multi-backend storage layer β”œβ”€β”€ πŸ“ scripts/ # πŸ’» CLI utilities β”œβ”€β”€ πŸ“ tests/ # πŸ§ͺ Comprehensive test suite └── πŸ“„ server.py # πŸš€ MCP server entrypoint ``` --- ## πŸ§ͺ Testing & Quality **Comprehensive testing infrastructure** with 79+ test files: ### πŸ§ͺ Run Tests ```bash # Run all functional tests (69 tests) pytest # Run performance tests with file size benchmarks pytest -m performance # Run specific test categories pytest tests/test_tools.py pytest tests/test_storage.py ``` ### βœ… Quality Assurance - **πŸ”¬ Functional Testing** - 69 comprehensive tests covering all core functionality - **⚑ Performance Testing** - Optimized benchmarks for file operations - **πŸ›‘οΈ Security Testing** - Template sandboxing and access control validation - **πŸ”„ Integration Testing** - MCP server protocol compliance verification ### πŸš€ Smoke Test ```bash # Quick MCP server validation python scripts/test_mcp_server.py ``` --- ## πŸ’‘ Real-World Use Cases ### πŸ€– AI Agent Teams **Structured workflows for AI development:** ```bash # Research phase python -m scribe_mcp.scripts.scribe "Research completed: authentication patterns" --status info --meta phase=research,confidence=0.9 # Architecture phase python -m scribe_mcp.scripts.scribe "Architecture guide updated with auth design" --status success --meta phase=architecture,sections=5 # Implementation phase python -m scribe_mcp.scripts.scribe "JWT authentication implemented" --status success --meta phase=implementation,tests=47,coverage=95% ``` ### 🏒 Enterprise Documentation **Compliance and audit trails:** ```bash # Security events python -m scribe_mcp.scripts.scribe "Security audit completed - all controls verified" --log security --status success --meta auditor=external,findings=0 # Change management python -m scribe_mcp.scripts.scribe "Production deployment completed" --status success --meta version=v2.1.0,rollback_available=true ``` ### πŸ“š Research Projects **Structured research documentation:** ```bash # Research findings python -m scribe_mcp.scripts.scribe "Performance bottleneck identified in database queries" --status info --meta research=true,impact=high,evidence=query_analysis # Experiment results python -m scribe_mcp.scripts.scribe "A/B test results: new algorithm 23% faster" --status success --meta experiment=performance_optimization,improvement=23% ``` --- ## πŸ”§ Troubleshooting ### Common Issues & Solutions **🚨 MCP SDK Missing** ```bash # Install the MCP Python SDK pip install mcp ``` **πŸ”§ No Tools Returned** ```bash # Ensure all modules are properly imported # Check that your virtual environment is active source .venv/bin/activate # Verify tool imports python -c "from scribe_mcp.tools import *; print('All tools loaded')" ``` **πŸ—„οΈ SQLite Permission Issues** ```bash # Check SCRIBE_ROOT is writable ls -la $SCRIBE_ROOT # Set proper permissions if needed chmod 755 $SCRIBE_ROOT ``` **🐍 Python Path Issues** ```bash # Ensure you're running from the correct directory # Run from MCP_SPINE parent directory, not inside scribe_mcp/ pwd # Should show .../MCP_SPINE/ # Test import path python -c "import sys; sys.path.insert(0, '.'); from scribe_mcp.config.settings import settings; print('βœ… Imports working')" ``` **⚑ Server Not Starting** ```bash # Check required dependencies pip install -r requirements.txt # Verify server startup with timeout timeout 5 python -m scribe_mcp.server || echo "βœ… Server starts correctly" ``` ### Getting Help - **πŸ“– Documentation**: Check `docs/whitepapers/scribe_mcp_whitepaper.md` for comprehensive technical details - **πŸ§ͺ Test Suite**: Run `pytest` to verify system functionality - **πŸ“‹ Project Templates**: Use `--list-projects` to see available configurations - **πŸ” Smoke Test**: Run `python scripts/test_mcp_server.py` for MCP validation --- ## 🀝 Contributing **We welcome contributions!** Here's how to get started: ### πŸ§ͺ Development Workflow ```bash # 1. Run the test suite pytest # 2. Verify MCP server functionality python scripts/test_mcp_server.py # 3. Test your changes python -m scribe_mcp.scripts.scribe "Testing new feature" --dry-run # 4. Log your contribution python -m scribe_mcp.scripts.scribe "Added new feature: description" --status success --meta contribution=true,feature_type=enhancement ``` ### πŸ“‹ Development Guidelines - **βœ… Test Coverage**: All new features must include tests - **πŸ“ Documentation**: Update relevant documentation sections - **πŸ”§ Integration**: Ensure MCP server compatibility - **πŸ›‘οΈ Security**: Follow security best practices for templates and inputs ### πŸš€ Quality Standards - **πŸ§ͺ 69+ functional tests** must pass - **⚑ Performance benchmarks** for file operations - **πŸ”’ Security validation** for template sandboxing - **πŸ“‹ MCP protocol compliance** verification --- ## πŸ“š Further Reading ### πŸ“– Technical Documentation - **[πŸ“„ Whitepaper v2.1](docs/whitepapers/scribe_mcp_whitepaper.md)** - Comprehensive technical architecture - **[πŸ”§ API Reference](docs/api/)** - Complete MCP tool documentation - **[🎨 Template Guide](docs/templates/)** - Custom template development - **[πŸ—οΈ Architecture Patterns](docs/architecture/)** - System design and integration ### 🌟 Advanced Features - **πŸ€– Claude Code Integration** - Structured workflows and subagent coordination - **πŸ“Š Agent Report Cards** - Performance grading and quality metrics - **πŸ” Vector Search** - FAISS integration for semantic search - **πŸ” Security Framework** - Comprehensive access control and audit trails ### πŸš€ Production Deployment - **🐘 PostgreSQL Setup** - Enterprise-scale deployment guide - **πŸ“ˆ Monitoring** - Performance tracking and alerting - **πŸ”„ Backup & Recovery** - Data protection strategies - **🌐 Multi-tenant** - Organizational deployment patterns --- ## πŸ“„ License MIT License - see [LICENSE](LICENSE) file for details. --- ## πŸ™ Acknowledgments Built with passion for better documentation and AI-human collaboration. Special thanks to: - The **MCP protocol** team for the standardized AI tool interface - **Jinja2** for the powerful and secure templating system - Our **early adopters** for invaluable feedback and feature suggestions --- <div align="center"> **πŸš€ Ready to transform your documentation?** [Start Logging](#-quick-start) β€’ [Explore Templates](#-template-system-showcase) β€’ [Read Whitepaper](docs/whitepapers/scribe_mcp_whitepaper.md) *Join thousands of developers and AI teams using Scribe for bulletproof documentation governance* </div>

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paxocial/scribe_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server