README.mdโข17.1 kB
# Notepad++ MCP Server
[](https://github.com/sandraschi/notepadpp-mcp/actions/workflows/ci.yml)
[](https://github.com/sandraschi/notepadpp-mcp/actions/workflows/release.yml)
[](https://python.org)
[](https://github.com/jlowin/fastmcp)
[](https://opensource.org/licenses/MIT)
[](https://github.com/sandraschi/notepadpp-mcp)
[](https://github.com/sandraschi/notepadpp-mcp)
[](https://github.com/sandraschi/notepadpp-mcp/releases)
**๐ Gold Status Certified** FastMCP 2.12 compatible MCP server for comprehensive Notepad++ automation, plugin management, and code quality analysis. Enterprise production-ready with 64 passing tests, structured logging, and official plugin ecosystem integration.
โจ **26 powerful tools** including plugin management, display fixes, and code linting
๐ **Plugin ecosystem** integration with 1,400+ official Notepad++ plugins
๐งช **64 comprehensive tests** with real Windows API integration and 23% coverage
๐ **5 linting tools** for Python, JavaScript, JSON, and Markdown
๐ฏ **Enterprise production-ready** with structured logging and error handling
๐ **Gold Status** on Glama.ai platform (85/100 quality score)
## ๐ Installation & Setup
### ๐ฆ **Option 1: DXT Installation** (Recommended)
1. **Download** the latest DXT file from [Releases](https://github.com/sandraschi/notepadpp-mcp/releases)
2. **Open Claude Desktop**
3. **Go to Settings** โ **Developer** โ **MCP Servers**
4. **Drag & Drop** the DXT file onto the extensions screen
5. **Restart Claude Desktop** - the server will auto-install and configure
### ๐ **Option 2: Python Installation**
```bash
# 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:
```json
{
"mcpServers": {
"notepadpp-mcp": {
"command": "notepadpp-mcp",
"args": []
}
}
}
```
### ๐ง **Manual Configuration** (if needed)
```json
{
"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.12+** - MCP framework
- **pywin32** - Windows API bindings
- **psutil** - System monitoring
- **pathlib** - Path operations
### ๐จ **Important Notes**
- Notepad++ must be installed on the system
- Server requires Windows API access (pywin32)
- First run may require Notepad++ to be started manually
## ๐ฏ **New in v1.0: Advanced Workspace Management**
### ๐ **Tab Management Tools**
Organize and navigate multiple open files efficiently:
- **List all tabs**: See filenames, modification status, and active tab
- **Switch tabs**: Jump to any tab by index (0-based)
- **Close tabs**: Remove tabs individually or current tab
### ๐พ **Session Management Tools**
Save and restore your entire workspace:
- **Save sessions**: Preserve all open files and cursor positions
- **Load sessions**: Restore complete workspace state
- **List sessions**: Browse saved workspace configurations
### ๐ก **Usage Examples**
```bash
# Get comprehensive help about all tools
get_help()
# List all open tabs
list_tabs()
# Save current workspace
save_session("my_project_session")
# Load a saved session
load_session("my_project_session")
# Switch to tab 2
switch_to_tab(2)
```
## ๐ 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
### **Core Documentation**
- **[Complete API Documentation](src/notepadpp_mcp/docs/README.md)** - Comprehensive guide
- **[Product Requirements Document](src/notepadpp_mcp/docs/PRD.md)** - Vision and roadmap
- **[Plugin Ecosystem Guide](src/notepadpp_mcp/docs/PLUGIN_ECOSYSTEM.md)** - 1,400+ plugin integration
- **[Configuration Examples](src/notepadpp_mcp/docs/examples/)** - Integration templates
### **Notepad++ Reference** ๐
- **[Notepad++ Complete Guide](docs/notepadpp/NOTEPADPP_COMPLETE_GUIDE.md)** - History, features, architecture (15+ pages)
- **[Plugin Ecosystem Guide](docs/notepadpp/PLUGIN_ECOSYSTEM_COMPREHENSIVE.md)** - Complete plugin reference (12+ pages)
- **[Community & Support](docs/notepadpp/COMMUNITY_AND_SUPPORT.md)** - All community channels (10+ pages)
- **[Color Fix Guide](docs/notepadpp/NOTEPADPP_COLOR_FIX_2025_10_08.md)** - Display troubleshooting
### **Repository Protection & AI Workflow** ๐ก๏ธ
- **[Repository Protection Hub](docs/repository-protection/README.md)** - Complete protection strategy
- **[Branch Protection Setup](docs/repository-protection/BRANCH_PROTECTION_SETTINGS.md)** - 5-minute setup guide
- **[Branch Strategy & AI Workflow](docs/repository-protection/BRANCH_STRATEGY_AND_AI_WORKFLOW.md)** - Safe AI collaboration
- **[Backup & Recovery Guide](docs/repository-protection/BACKUP_AND_RECOVERY_GUIDE.md)** - Multi-layer protection
### **Platform Integration & Quality** ๐
- **[Glama.ai Platform Hub](docs/glama-platform/README.md)** - Gold Status certification & platform integration
- **[Gold Status Achievement](docs/glama-platform/GOLD_STATUS_ACHIEVEMENT.md)** - Original 85/100 certification
- **[Gold Status Update (Latest)](docs/glama-platform/GOLD_STATUS_UPDATE_2025_10_08.md)** - Enhanced 90/100 status
- **[CI/CD & Optimization Guide](docs/glama-platform/CI_CD_GLAMA_OPTIMIZATION_GUIDE.md)** - Quality optimization
### **Development & Best Practices** ๐ป
- **[Development Hub](docs/development/README.md)** - Development guides & lessons learned
- **[AI Development Rules](docs/development/AI_DEVELOPMENT_RULES.md)** - AI collaboration guidelines
- **[Python Snippets Guide](docs/development/PYTHON_SNIPPETS_USAGE_GUIDE.md)** - Reusable code patterns
- **[Debugging Lessons](docs/development/DEBUGGING_LESSONS_LEARNED.md)** - Real-world solutions
### **MCP Technical Documentation** ๐ง
- **[MCP Technical Hub](docs/mcp-technical/README.md)** - MCP server development & deployment
- **[Claude Desktop Debugging](docs/mcp-technical/CLAUDE_DESKTOP_DEBUGGING.md)** - Debug guide
- **[MCP Production Checklist](docs/mcp-technical/MCP_PRODUCTION_CHECKLIST.md)** - Production readiness
- **[FastMCP Troubleshooting](docs/mcp-technical/TROUBLESHOOTING_FASTMCP_2.12.md)** - Framework issues
### **MCPB Packaging & Distribution** ๐ฆ
- **[MCPB Packaging Hub](docs/mcpb-packaging/README.md)** - Professional packaging guide
- **[MCPB Building Guide](docs/mcpb-packaging/MCPB_BUILDING_GUIDE.md)** - Complete 1,900+ line guide
- **[MCPB Implementation](docs/mcpb-packaging/MCPB_IMPLEMENTATION_SUMMARY.md)** - Our package (0.19 MB)
## ๐ ๏ธ **Tools Overview** (26 Total)
| Category | Tools | Description |
|----------|-------|-------------|
| **File Operations** | 4 | Create, open, save, and inspect files |
| **Text Operations** | 2 | Insert and search text content |
| **Status & Info** | 4 | Monitor system and document state |
| **Tab Management** | 3 | Organize and navigate multiple files |
| **Session Management** | 3 | Save and restore workspace states |
| **Code Quality & Linting** | 5 | Analyze code for multiple file types |
| **Display Fixes** | 2 | Fix invisible text and theme issues โจ **NEW** |
| **Plugin Ecosystem** | 4 | Discover, install, and manage plugins โจ **NEW** |
**Total: 26 production-ready tools** with comprehensive Windows API integration, plugin ecosystem support, and multi-linter capabilities.
## โก Features
### ๐ **File Operations** (4 tools)
- `open_file` - Open files in Notepad++
- `new_file` - Create new files
- `save_file` - Save current file
- `get_current_file_info` - Get file metadata
### ๐ **Text Operations** (2 tools)
- `insert_text` - Insert text at cursor position
- `find_text` - Search text with case sensitivity options
### ๐ **Status & Information** (3 tools)
- `get_status` - Notepad++ status and window info
- `get_system_status` - Comprehensive system diagnostics
- `get_help` - Hierarchical help system
### ๐ **Tab Management** (3 tools) โจ **NEW**
- `list_tabs` - List all open tabs with metadata
- `switch_to_tab` - Switch between tabs by index
- `close_tab` - Close tabs by index or current tab
### ๐พ **Session Management** (3 tools) โจ **NEW**
- `save_session` - Save workspace to named session
- `load_session` - Load saved sessions
- `list_sessions` - List all saved sessions
### ๐ **Code Quality & Linting** (5 tools)
- `lint_python_file` - Comprehensive Python code analysis with ruff/flake8
- `lint_javascript_file` - JavaScript validation with ESLint or basic checking
- `lint_json_file` - JSON syntax validation and structure analysis
- `lint_markdown_file` - Markdown style and syntax validation
- `get_linting_tools` - Overview of available linting capabilities
### ๐จ **Display Fixes** (2 tools) โจ **NEW**
- `fix_invisible_text` - Fix invisible text issue (white on white)
- `fix_display_issue` - Fix general Notepad++ display problems
### ๐ **Plugin Ecosystem** (4 tools) โจ **NEW**
- `discover_plugins` - Discover available plugins from official Notepad++ Plugin List
- `install_plugin` - Install plugins via Plugin Admin automation
- `list_installed_plugins` - List currently installed plugins
- `execute_plugin_command` - Execute commands from installed plugins
### ๐ง **Core Capabilities**
- ๐ฏ **Windows Integration**: Native Windows API with pywin32
- โก **FastMCP 2.12**: Latest MCP framework compliance
- ๐ **Structured Logging**: Professional error handling
- ๐งช **Comprehensive Testing**: 64 tests covering all tools
- ๐ **Self-Documenting**: Built-in help system
- ๐ **Multi-linter Support**: ruff, flake8, ESLint with fallback options
- ๐จ **Code Quality**: Syntax validation for Python, JS, JSON, Markdown
- ๐ **Plugin Ecosystem**: Integration with 1,400+ official Notepad++ plugins
## ๐ ๏ธ Development
```bash
# Clone and install
git clone https://github.com/sandraschi/notepadpp-mcp.git
cd notepadpp-mcp
pip install -e .[dev]
# Run comprehensive tests
python -m pytest src/notepadpp_mcp/tests/
# Format code
black src/
# 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"**
```bash
# 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"**
```bash
# Install pywin32
pip install pywin32
# Restart Python environment
# Try running demonstration script again
python demonstration_test.py
```
#### **"Server not connecting"**
```json
{
"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**
```bash
# 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**
```bash
# Enable debug logging
import logging
logging.basicConfig(level=logging.DEBUG)
# Run server with debug output
python -m notepadpp_mcp.tools.server
```
#### **Manual Testing**
```python
# Test individual tools
from notepadpp_mcp.tools.server import get_status, get_help
# Get status
status = await get_status()
print("Status:", status)
# Get help
help_info = await get_help()
print("Help:", help_info)
```
## ๐ค Contributing
### ๐ **Development Setup**
```bash
# 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
black src/
# Build DXT 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 tools** in the tools overview
- **Consider Windows API limitations**
- **Test with real Notepad++ workflows**
- **Follow FastMCP 2.12 patterns**
## ๐ Changelog
### **v1.2.0** - Plugin Ecosystem Release โจ **NEW**
- โ
**6 new tools** (4 plugin tools + 2 display fix tools)
- โ
**Plugin ecosystem integration** with official Notepad++ Plugin List (1,400+ plugins)
- โ
**Display fix tools** for invisible text and theme issues
- โ
**Plugin discovery** from GitHub repository with category filtering
- โ
**Automated plugin installation** via Plugin Admin
- โ
**Plugin command execution** for workflow automation
- โ
**PLUGIN_ECOSYSTEM.md** comprehensive documentation (300+ lines)
- โ
**Total: 26 tools** for complete Notepad++ automation
### **v1.1.0** - Linting Tools Release
- โ
**5 comprehensive linting tools** for Python, JavaScript, JSON, and Markdown
- โ
**Multi-linter support** with ruff, flake8, ESLint, and fallback options
- โ
**16 additional tests** covering all linting functionality
- โ
**Enhanced DXT configuration** with detailed linting tool documentation
- โ
**Total: 20 tools** for complete code quality analysis
### **v1.0.0** - Core Release
- โ
**15 comprehensive tools** for Notepad++ automation
- โ
**Real Windows API integration** with pywin32
- โ
**Advanced tab and session management**
- โ
**18 comprehensive tests** with full coverage
- โ
**DXT packaging** for easy installation
- โ
**Production-ready** error handling and logging
### **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](LICENSE)