npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@quocdat25/morph-fast-apply

v0.7.4

Published

MCP server with Morph AI-powered file editing using fast apply model and abbreviated edit snippets (obfuscated)

Downloads

15

Readme

Morph Fast Apply MCP Server

Node.js server implementing Model Context Protocol (MCP) for filesystem operations with AI-powered file editing using Morph's fast apply model.

Features

  • AI-Powered File Editing - Advanced edit_file tool using Morph's fast apply model for intelligent code merging
  • Read/write files with memory-efficient head/tail operations
  • Create/list/delete directories with detailed metadata
  • Move files/directories
  • Search files with exclude patterns
  • Get comprehensive file metadata
  • Dynamic directory access control via Roots
  • Workspace-aware path resolution and automatic workspace detection

Set MORPH_API_KEY environment variable to enable AI-powered editing features.

Environment Variables

ALL_TOOLS - Control Tool Availability

This server supports two modes via the ALL_TOOLS environment variable:

ALL_TOOLS="false" (Recommended) - Fast file editing only

  • Only exposes the edit_file tool for lightning-fast code edits
  • Minimal surface area, maximum performance
  • Perfect for AI assistants focused on code editing

ALL_TOOLS="true" - Full filesystem access

  • Exposes all filesystem tools: read_file, write_file, list_directory, search_files, etc.
  • Complete MCP filesystem server functionality
  • Use when you need comprehensive file system operations
# Fast editing mode (recommended)
export ALL_TOOLS="false"
export MORPH_API_KEY="sk-your-morph-api-key-here"

# Full filesystem mode  
export ALL_TOOLS="true"
export MORPH_API_KEY="sk-your-morph-api-key-here"

MCP Roots (Recommended)

MCP clients can dynamically update allowed directories via Roots.

Key Tools

AI-Powered Editing

  • edit_file - Advanced AI-powered file editing using Morph's fast apply model with intelligent code merging (requires MORPH_API_KEY)

File Operations

  • read_file - Read file contents with optional head/tail parameters for large files
  • read_multiple_files - Read multiple files simultaneously
  • write_file - Create/overwrite files with atomic operations
  • tiny_edit_file - Make small line-based edits with git-style diff output

Directory Operations

  • create_directory - Create directories recursively
  • list_directory - List directory contents
  • list_directory_with_sizes - List directory contents with file sizes and sorting
  • directory_tree - Get recursive JSON tree structure
  • move_file - Move/rename files and directories

Search & Info

  • search_files - Search for files recursively with exclude patterns
  • get_file_info - Get comprehensive file metadata
  • list_allowed_directories - Show accessible directories

AI-Powered Editing with Morph

This server uses Morph's fast apply model API for intelligent code merging at 4500+ tokens/second with 99.2% accuracy. The edit_file tool processes code edits by taking initial code and edit snippets, then merging them intelligently using special "// ... existing code ..." comments for unchanged sections.

Getting a Morph API Key

  1. Visit Morph to sign up for an API key
  2. Set the MORPH_API_KEY environment variable in your MCP configuration
  3. API keys typically start with sk- or morph-

Code Obfuscation

This package includes obfuscated code for production deployment while maintaining the same functionality and API compatibility.

Usage with Claude Desktop

Add to your Claude Desktop configuration file (claude_desktop_config.json):

NPX (Recommended)

{
  "mcpServers": {
    "morph-fast-apply": {
      "command": "npx",
      "args": ["-y", "@morph-llm/morph-fast-apply"],
      "env": {
        "MORPH_API_KEY": "sk-your-morph-api-key-here",
        "ALL_TOOLS": "false"
      }
    }
  }
}

Docker

{
  "mcpServers": {
    "morph-fast-apply": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "--mount", "type=bind,src=/Users/username/Desktop,dst=/projects/Desktop",
        "morph-llm/morph-fast-apply", "/projects"
      ],
      "env": {
        "MORPH_API_KEY": "sk-your-morph-api-key-here",
        "ALL_TOOLS": "false"
      }
    }
  }
}

Usage with Claude Code

One-liner Installation (Recommended)

claude mcp add filesystem-with-morph -e MORPH_API_KEY=sk-your-morph-api-key-here -e ALL_TOOLS=false -- npx @morph-llm/morph-fast-apply

💡 Pro tip: Configure Claude to always use Morph for edits by adding this to your project:

mkdir -p .claude
echo "IMPORTANT: ALWAYS use mcp_filesystem-with-morph_edit_file tool to make any code edits. Do not use the default edit tool." > .claude/CLAUDE.md

Config File Method

Add to your .claude.json file:

{
  "mcpServers": {
    "filesystem-with-morph": {
      "command": "npx",
      "args": [
        "@morph-llm/morph-fast-apply"
      ],
      "env": {
        "MORPH_API_KEY": "sk-your-morph-api-key-here",
        "ALL_TOOLS": "false"
      }
    }
  }
}

Manual Usage

For direct command-line usage or custom integrations:

# Set environment variables
export MORPH_API_KEY="sk-your-morph-api-key-here"
export ALL_TOOLS="false"  # or "true" for full filesystem access

# Run the MCP server
npx @morph-llm/morph-fast-apply

Usage with VS Code

For quick installation, click the installation buttons below...

Install with NPX in VS Code Install with NPX in VS Code Insiders

Install with Docker in VS Code Install with Docker in VS Code Insiders

For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open Settings (JSON).

Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

Note that the mcp key is not needed in the .vscode/mcp.json file.

You can provide sandboxed directories to the server by mounting them to /projects. Adding the ro flag will make the directory readonly by the server.

Docker

Note: all directories must be mounted to /projects by default. Remember to set your MORPH_API_KEY for AI-powered editing.

{
  "mcp": {
    "servers": {
      "morph-fast-apply": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "--mount", "type=bind,src=${workspaceFolder},dst=/projects/workspace",
          "morph-llm/morph-fast-apply",
          "/projects"
        ],
        "env": {
          "MORPH_API_KEY": "sk-your-morph-api-key-here",
          "ALL_TOOLS": "false"
        }
      }
    }
  }
}

NPX

{
  "mcp": {
    "servers": {
      "morph-fast-apply": {
        "command": "npx",
        "args": [
          "-y",
          "@morph-llm/morph-fast-apply",
          "${workspaceFolder}"
        ],
        "env": {
          "MORPH_API_KEY": "sk-your-morph-api-key-here",
          "ALL_TOOLS": "false"
        }
      }
    }
  }
}