Skip to content

Conversation

@kevincormier-toast
Copy link

Feature Additions: Enhanced Configuration and Debugging

Apologies for the Multi-Feature PR

I apologize for submitting multiple features in one PR - I realize this isn't ideal for review. I'm happy to split this into separate PRs if you prefer. Each feature is in its own commit which should make review easier, but please let me know if you'd like me to split them up.

Summary

This PR adds several optional features to improve usability for different vault sizes and deployment scenarios:

  1. Optional Journaling Tool - Agent reflection and rubber duck debugging
  2. Patch Content Tool Improvements - Better documentation to prevent common errors
  3. Disable Simple Search - For large vaults that overwhelm token limits
  4. Custom SSL Certificates - Use self-signed certs without system keychain
  5. Debug Logging - Troubleshoot connection and SSL issues

All features are opt-in via environment variables and maintain full backward compatibility.


1. Optional Journaling Tool (62be425)

Problem: Agents working on complex tasks benefit from articulating their thinking (rubber duck debugging), and cross-session continuity requires capturing the messy reality of development.

Solution: Adds obsidian_journal_entry tool (gated behind OBSIDIAN_ENABLE_JOURNALING=true) that automates timestamps, formatting, and file organization for agent reflection logs.

Documentation: Extensive guidance in JOURNALING.md on getting value from agent journaling.

Why opt-in: Requires thoughtful prompting to be valuable - not useful for everyone.


2. Patch Content Tool Improvements (46f983b)

Problem: The patch_content tool's heading path requirements caused frequent errors - users weren't building full paths from h1 down.

Solution: Enhanced tool description with explicit instructions and examples showing correct vs incorrect usage.

Impact: Reduces agent errors and user frustration with heading-based patches.


3. Disable Simple Search (76bfe4c)

Problem: For large vaults, simple_search returns excessive context that can overwhelm token limits, making the tool unusable.

Solution: Add OBSIDIAN_DISABLE_SIMPLE_SEARCH=true to hide the simple search tool while keeping complex search available.

Why opt-in: Most users benefit from simple search - only large vaults need this.


4. Custom SSL Certificate Support (bbf03a0)

Problem: The Obsidian Local REST API uses self-signed certificates. Currently, users must either:

  • Add the cert to system keychain and mark it globally trusted (security risk)
  • Disable SSL verification entirely (verify=False)

Solution: Support custom SSL certificates without system keychain:

  • OBSIDIAN_SSL_CERT_BASE64 - Base64-encoded certificate (recommended)
  • OBSIDIAN_SSL_CERT_PATH - Path to certificate file

Benefits:

  • Certificate scoped to this connection only
  • No global trust required
  • Automatic temp file cleanup
  • Clear error messages for invalid configs

5. Debug Logging (5f9f817)

Problem: MCP servers use stdio for communication, making it extremely difficult to debug connection issues, SSL errors, or configuration problems.

Solution: Add OBSIDIAN_DEBUG_LOG=/path/to/debug.log to write diagnostic information to a separate file:

  • Environment configuration and SSL cert setup
  • All MCP tool calls with request/response details
  • API requests with URLs and verify_ssl settings
  • Full stack traces for errors
  • Feature flag status

Why needed: This was essential for debugging the SSL certificate feature and helped identify a real issue where tilde expansion in paths failed silently.

Documentation: Added warning about using full paths instead of ~ in configs.


Testing

All features tested with:

  • Syntax validation (python3 -m py_compile)
  • Import validation in venv
  • Backward compatibility (all env vars optional)
  • Debug logging output verification

Breaking Changes

None - all features are opt-in and maintain full backward compatibility.


Again, I apologize for the multi-feature PR. Please let me know if you'd like me to:

  1. Split this into separate PRs (I can do this quickly)
  2. Remove any features you don't want
  3. Make any changes to the implementation or documentation

Thank you for maintaining this excellent MCP server!

kevincormier-toast and others added 5 commits December 5, 2025 16:17
Enhanced parameter descriptions for obsidian_patch_content to address two recurring issues that caused document corruption: 1. **target parameter (heading paths):** - Added explicit requirement to start with h1 (top-level) heading - Emphasized complete path from h1 down to target with '::' separator - Included WRONG/CORRECT examples showing common mistakes - Previously: agents would skip h1 or use incomplete paths 2. **content parameter (trailing newlines):** - Made trailing '\n' MANDATORY to prevent next heading from breaking - Clarified do NOT include heading markup when using replace operation - Added multiple examples showing wrong (no newline) vs correct patterns - Previously: missing newlines caused "content### Next Heading" corruption These detailed descriptions embed correctness rules directly in the tool interface, reducing need for external workaround documentation. Tested with fresh agent contexts - achieved 100% correct usage on first try.
Adds opt-in journaling tool (OBSIDIAN_ENABLE_JOURNALING=true) that automates timestamps, formatting, and file organization for LLM journaling workflows. Key features: - Structured metadata (type, alternatives, confidence) - Date-based organization: work-logs/{YYYY-MM-DD}/{agent}.log - Optional project-specific paths - Multi-agent support Implementation: - New journaling.py module with core logic - JournalEntryToolHandler in tools.py - Environment variable feature flag in server.py - Comprehensive JOURNALING.md guide with usage patterns - Updated README with brief overview Inspired by patterns in agent reflection research showing performance improvements from articulating thinking. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
For large vaults, simple search can return excessive context that overwhelms token limits. This change allows users to disable the simple_search tool via OBSIDIAN_DISABLE_SIMPLE_SEARCH=true environment variable. - Add conditional check in server.py to skip SearchToolHandler registration - Document the new environment variable in README.md Configuration section - Tool is enabled by default, only disabled when explicitly configured 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Adds support for custom SSL certificates without requiring system keychain trust. Users can now provide certificates via: - Base64-encoded cert in OBSIDIAN_SSL_CERT_BASE64 environment variable - Path to cert file via OBSIDIAN_SSL_CERT_PATH environment variable Implementation details: - Checks OBSIDIAN_SSL_CERT_BASE64 first, decodes and writes to temp file - Falls back to OBSIDIAN_SSL_CERT_PATH, validates file exists - Maintains backward compatibility (verify=False when no cert provided) - Automatic cleanup of temporary certificate files via __del__ - Clear error messages for invalid configurations Documentation includes instructions for both options with examples. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Adds comprehensive debug logging to troubleshoot connection issues, SSL certificate problems, and configuration errors. Features: - OBSIDIAN_DEBUG_LOG environment variable for file-based logging - Logs environment configuration and SSL cert setup at startup - Logs all MCP tool calls with request/response details - Logs all API requests with URLs and verify_ssl settings - Enhanced SSL error handling with separate exception catching - Feature flag status logging (journaling, simple search) - Full stack traces for all errors Documentation: - Added README section for debug logging with examples - Added warning about using full paths instead of ~ for file paths - Explains why file-based logging is needed (stdio interference) This addresses issues where: - SSL certificate configuration errors were hard to diagnose - API connection failures had insufficient context - Environment variable conflicts (multiple sources) were unclear - Tilde expansion in paths failed silently 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant