Skip to main content
Glama

Notepad++ MCP Server

CI Release Python FastMCP License: MIT Tests Coverage Version

MCP server for Notepad++ automation with portmanteau tool consolidation. FastMCP 2.14.1 compliant with structured logging and Windows API integration.

Installation

MCPB Package Installation

Download and install the MCPB package from Releases.

Python Installation

# Install from PyPI
pip install notepadpp-mcp

# Or install from source
git clone https://github.com/sandraschi/notepadpp-mcp.git
cd notepadpp-mcp
pip install -e .

βš™οΈ Claude Desktop Configuration

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "notepadpp-mcp": {
      "command": "notepadpp-mcp",
      "args": []
    }
  }
}

πŸ”§ Manual Configuration (if needed)

{
  "mcpServers": {
    "notepadpp-mcp": {
      "command": "python",
      "args": ["-m", "notepadpp_mcp.tools.server"],
      "cwd": "${workspaceFolder}",
      "env": {
        "PYTHONPATH": "${workspaceFolder}/src"
      }
    }
  }
}

πŸ“‹ Requirements

πŸ–₯️ System Requirements

  • Windows 10/11 (64-bit)

  • Notepad++ 8.0+ installed and accessible

  • Python 3.10+ with pip

  • pywin32 for Windows API integration

Dependencies

  • FastMCP 2.14.1+ - MCP framework

  • structlog 23.0.0+ - Structured JSON logging

  • pywin32 - Windows API bindings

  • psutil - System monitoring

🚨 Important Notes

  • Notepad++ must be installed on the system

  • Server requires Windows API access (pywin32)

  • First run may require Notepad++ to be started manually

Tool Organization

The server uses portmanteau tools following FastMCP 2.14.1+ standards. Each tool consolidates related operations to prevent tool explosion while maintaining functionality.

Usage Examples

# File operations
file_ops("open", file_path="document.txt")
file_ops("save")
file_ops("info")

# Text operations
text_ops("insert", text="Hello World")
text_ops("find", text="search term")

# Status operations
status_ops("help")
status_ops("system_status")
status_ops("health_check")

πŸ“ Project Structure

notepadpp-mcp/
β”œβ”€β”€ src/notepadpp_mcp/
β”‚   β”œβ”€β”€ tools/          # MCP server implementation
β”‚   β”œβ”€β”€ docs/           # Documentation and examples
β”‚   β”œβ”€β”€ tests/          # Test suite
β”‚   └── dxt/            # DXT packaging configuration
β”œβ”€β”€ pyproject.toml      # Package configuration
β”œβ”€β”€ README.md           # This file
└── LICENSE             # MIT license

Documentation

Tools Overview (8 Portmanteau Tools)

Tool

Operations

Description

file_ops

open, new, save, info

File management operations

text_ops

insert, find

Text manipulation and search

status_ops

help, system_status, health_check

System status and help

tab_ops

list, switch, close

Tab navigation and management

session_ops

save, load, list

Workspace session management

linting_ops

python, javascript, json, markdown, tools

Code quality analysis

display_ops

fix_invisible_text, fix_display_issue

Display and theme fixes

plugin_ops

discover, install, list, execute

Plugin ecosystem management

All tools follow FastMCP 2.14.1+ portmanteau pattern with enhanced response patterns.

Portmanteau Tools

file_ops

Consolidates file operations: open, new, save, info

  • Open files in Notepad++

  • Create new files

  • Save current file

  • Get file metadata

text_ops

Consolidates text operations: insert, find

  • Insert text at cursor position

  • Search text with options

status_ops

Consolidates status operations: help, system_status, health_check

  • Hierarchical help system

  • System diagnostics

  • Health checks

tab_ops

Consolidates tab operations: list, switch, close

  • List open tabs with metadata

  • Switch between tabs by index

  • Close tabs by index

session_ops

Consolidates session operations: save, load, list

  • Save workspace sessions

  • Load saved sessions

  • List available sessions

linting_ops

Consolidates linting operations: python, javascript, json, markdown, tools

  • Python analysis (ruff/flake8)

  • JavaScript validation (ESLint)

  • JSON syntax checking

  • Markdown style validation

display_ops

Consolidates display operations: fix_invisible_text, fix_display_issue

  • Fix invisible text issues

  • Fix display problems

plugin_ops

Consolidates plugin operations: discover, install, list, execute

  • Discover plugins from official list

  • Install plugins via Plugin Admin

  • List installed plugins

  • Execute plugin commands

Core Capabilities

  • Windows API integration with pywin32

  • FastMCP 2.14.1+ compliance with portmanteau pattern

  • Structured JSON logging to stderr

  • 64 tests covering all portmanteau tools

  • Enhanced response patterns (summary, next_steps, recovery_options)

  • Multi-linter support with fallback options

  • Code quality analysis for multiple languages

  • Plugin ecosystem integration

πŸ› οΈ Development

# Clone and install
git clone https://github.com/sandraschi/notepadpp-mcp.git
cd notepadpp-mcp
pip install -e .[dev]

# Run comprehensive tests
pytest src/notepadpp_mcp/tests/

# Run with coverage
pytest src/notepadpp_mcp/tests/ --cov=src/notepadpp_mcp --cov-report=html

# Format code
ruff format src/ tests/

# Lint code
ruff check src/ tests/

# Via Makefile
make test
make test-coverage
make lint
make format
make check  # Run all checks

# Test real Notepad++ integration
python demonstration_test.py

# Development helper
python dev.py test|format|build|validate-dxt

πŸ§ͺ Testing

  • 64 comprehensive tests covering all tools including linting and plugin functionality

  • Real Windows API testing with actual Notepad++ integration

  • Demonstration script (demonstration_test.py) tests live functionality

  • CI/CD ready with automated testing pipeline

  • Multi-linter testing with ruff, flake8, and ESLint integration

  • Plugin ecosystem testing with GitHub API mocking

πŸ—οΈ Architecture

🎯 Core Components

  • NotepadPPController - Windows API integration layer

  • FastMCP Server - MCP protocol implementation

  • Tool Decorators - Automatic tool registration

  • Structured Logging - Professional error handling

πŸ”§ Integration Flow

  1. MCP Client (Claude Desktop) β†’ FastMCP Server

  2. Server β†’ NotepadPPController β†’ Windows API

  3. Windows API β†’ Notepad++ Application β†’ User Interface

πŸ“ File Structure

src/notepadpp_mcp/
β”œβ”€β”€ tools/server.py     # Main MCP server (2424 lines)
β”œβ”€β”€ tests/              # Comprehensive test suite (64 tests)
β”œβ”€β”€ docs/               # Documentation and examples
β”‚   β”œβ”€β”€ README.md       # API documentation
β”‚   β”œβ”€β”€ PRD.md          # Product requirements
β”‚   └── PLUGIN_ECOSYSTEM.md  # Plugin integration guide
└── dxt/                # DXT packaging configuration

πŸ› Troubleshooting

❌ Common Issues

"Notepad++ not found"

# Check if Notepad++ is installed
python demonstration_test.py

# Install Notepad++
# Download from: https://notepad-plus-plus.org/downloads/
# Or via Chocolatey: choco install notepadplusplus

"Windows API not available"

# Install pywin32
pip install pywin32

# Restart Python environment
# Try running demonstration script again
python demonstration_test.py

"Server not connecting"

{
  "mcpServers": {
    "notepadpp-mcp": {
      "command": "python",
      "args": ["-m", "notepadpp_mcp.tools.server"],
      "cwd": "${workspaceFolder}",
      "env": {
        "PYTHONPATH": "${workspaceFolder}/src"
      }
    }
  }
}

"Tools not appearing in Claude"

  1. Restart Claude Desktop after configuration

  2. Check logs in Claude developer console

  3. Verify Notepad++ is running on the system

  4. Run demonstration script to test functionality

πŸ†˜ Getting Help

Run Diagnostics

# Test all functionality
python demonstration_test.py

# Check tool availability
python -c "from notepadpp_mcp.tools.server import app; print('Tools:', len(app._tools))"

Debug Mode

# Enable debug logging
import logging
logging.basicConfig(level=logging.DEBUG)

# Run server with debug output
python -m notepadpp_mcp.tools.server

Manual Testing

# Test portmanteau tools
from notepadpp_mcp.tools.server import file_ops, status_ops

# Get file info
info = await file_ops("info")
print("File info:", info)

# Get help
help_info = await status_ops("help")
print("Help:", help_info)

🀝 Contributing

πŸ“ Development Setup

# Clone repository
git clone https://github.com/sandraschi/notepadpp-mcp.git
cd notepadpp-mcp

# Install development dependencies
pip install -e .[dev]

# Run tests
python -m pytest

# Format code
ruff format src/

# Build MCPB package
python dev.py build

πŸ› Reporting Issues

  1. Run demonstration script first: python demonstration_test.py

  2. Check existing issues on GitHub

  3. Include error logs and system information

  4. Test with different Notepad++ versions if possible

Feature Requests

  • Check existing portmanteau tools before proposing new ones

  • Consider Windows API limitations

  • Test with real Notepad++ workflows

  • Follow FastMCP 2.14.1+ portmanteau patterns

Changelog

v1.2.0 - SOTA Compliance & Portmanteau Consolidation

  • Portmanteau tool consolidation (26 β†’ 8 tools)

  • FastMCP 2.14.1+ compliance with enhanced response patterns

  • Plugin ecosystem integration

  • Display fix tools

  • Updated MCPB packaging

v1.1.0 - Linting Tools

  • Multi-language linting support

  • Code quality analysis tools

  • Enhanced testing coverage

v1.0.0 - Core Release

  • Initial Notepad++ automation tools

  • Windows API integration

  • MCP server implementation

Planned Features

  • Multi-instance support for multiple Notepad++ windows

  • Advanced plugin workflows with multiple plugin coordination

  • Plugin analytics and usage monitoring

  • Custom plugin support for user-developed plugins

  • HTML/CSS linting tools for web development

  • Configuration files for custom settings

  • Batch operations for multiple file processing

πŸ“„ License

MIT - see LICENSE

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

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/sandraschi/notepadpp-mcp'

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