Skip to content

feat(filesystem): add append_file #2093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

altrao
Copy link

@altrao altrao commented Jun 12, 2025

Description

Added append_file capability to filesystem server:

  • Appends content to existing files or creates new files

Server Details

  • Server: filesystem
  • Changes to: tools

Motivation and Context

Need to provide log-style file operations for LLM clients:

  • append_file enables incremental writes without full file rewrites

How Has This Been Tested?

Testing performed for append_file:

  1. Basic functionality:
    • Append to existing files
    • Append to new files (creates file)
  2. Security boundaries:
    • Works in allowed dir
    • Fails in not specified dir
  3. Edge cases:
    • Empty files
    • Large content appends
    • Empty append to new file (creates empty file)
    • Empty append to existing file (maintains empty state)
  4. Error handling:
    • Invalid paths
    • Permission issues

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

@olaservo olaservo added server-filesystem Reference implementation for the Filesystem MCP server - src/filesystem enhancement New feature or request labels Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server-filesystem Reference implementation for the Filesystem MCP server - src/filesystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants