Skip to content

Conversation

@JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Sep 8, 2025

Summary

This PR adds comprehensive documentation for the .thvignore feature in ToolHive, which allows users to prevent sensitive files from being exposed when mounting directories to MCP containers.

Closes #109

Changes

  • ✨ Added new documentation page /docs/toolhive/guides-cli/thvignore.md explaining:

    • How .thvignore works with tmpfs and bind mount overlays
    • How to create and configure .thvignore files
    • Support for global ignore patterns
    • Troubleshooting tips
    • Examples of common patterns to exclude (.env, SSH keys, cloud credentials)
  • 📝 Updated /docs/toolhive/guides-cli/run-mcp-servers.mdx to reference the new .thvignore documentation in the file system access section

  • 📚 Updated sidebars.ts to include the new .thvignore page under the Security section

Context

The .thvignore mechanism is an important security feature that helps developers:

  • Keep sensitive files like .env, SSH keys, and cloud credentials secure
  • Maintain fast bind mounts for development while masking selected paths
  • Use gitignore-like patterns for familiar configuration

This feature was added in ToolHive v0.2.1 (see stacklok/toolhive#1137).

Testing

  • Documentation follows the project's writing style guide
  • Links to related documentation are included
  • Examples are clear and practical
  • Markdown formatting is consistent with project standards

Copilot AI review requested due to automatic review settings September 8, 2025 08:28
@vercel
Copy link

vercel bot commented Sep 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs-website Ready Ready Preview Comment Sep 9, 2025 9:36am

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive documentation for the .thvignore feature, which allows users to hide sensitive files from MCP containers while maintaining bind mounts for development. The feature helps prevent secrets like environment variables, SSH keys, and cloud credentials from being exposed to containerized MCP servers.

Key changes:

  • Added complete .thvignore documentation covering usage, patterns, and troubleshooting
  • Updated existing MCP server documentation to reference the new security feature
  • Integrated the new page into the documentation sidebar under the Security section

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
docs/toolhive/guides-cli/thvignore.md New comprehensive documentation page explaining .thvignore functionality, usage patterns, and troubleshooting
docs/toolhive/guides-cli/run-mcp-servers.mdx Added reference to .thvignore documentation in the file system access section
sidebars.ts Added the new .thvignore page to the Security section of the documentation sidebar

@stacklok stacklok deleted a comment from Copilot AI Sep 8, 2025
@stacklok stacklok deleted a comment from Copilot AI Sep 8, 2025
@stacklok stacklok deleted a comment from Copilot AI Sep 8, 2025
- Add new documentation page explaining .thvignore functionality
- Document how to prevent secrets from leaking into MCP containers
- Include examples for creating and using .thvignore files
- Add reference to .thvignore in run-mcp-servers guide
- Update sidebar to include new .thvignore page under Security section
- Fix global config path to be cross-platform compatible (Linux/macOS/Windows)
- Remove redundant Requirements section
- Change section heading to 'Create an ignore file'
- Update file creation description to be more specific
- Replace 'fetch' with 'filesystem' in command examples (better example)
- Update troubleshooting section to use collapsible details format
- Convert recommendation text to use tip admonition format
- Improve global patterns description text
- Add clarification about pattern matching limitations (no full glob syntax)
@JAORMX JAORMX force-pushed the add-thvignore-docs branch from df26d9d to ac67329 Compare September 9, 2025 09:34
Copy link
Contributor Author

@JAORMX JAORMX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback @danbarr! I've addressed all your comments:

  • Fixed the global config paths to be cross-platform (Linux/macOS/Windows)
  • Removed the Requirements section since it was redundant
  • Changed the heading and made the file creation description more specific
  • Switched from fetch to filesystem in the examples - much better since it actually uses the mounts
  • Updated troubleshooting to use collapsible details
  • Converted the recommendation to a tip admonition
  • Clarified that we don't support full gitignore glob syntax like **/*.env

Should be good to go now.

@danbarr danbarr merged commit 191c3a9 into main Sep 9, 2025
7 checks passed
@danbarr danbarr deleted the add-thvignore-docs branch September 9, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI] Document .thvignore file for volume mounts (v0.2.1)

3 participants