Notepad++ MCP Server
Provides comprehensive automation and control for Notepad++, including file operations (open, create, save), text manipulation (insert, search), tab management (list, switch, close), session management (save, load workspaces), and real-time status monitoring through Windows API integration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Notepad++ MCP Serversave my current workspace as 'project_backup'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Notepad++ MCP Server
MCP server for Notepad++ on Windows. Uses FastMCP 3.1.0 with portmanteau tools (fewer tools, same coverage), optional HTTP bridge, sampling (Ollama-compatible HTTP or client LLM), prompts, skill:// resources, and agentic workflows.
Editor vs this repo: Notepad++s own strengths (Scintilla, plugins, macros, sessions, ) are separate from what this MCP exposes. See docs/EDITOR_AND_MCP_SCOPE.md for a clear split and a fuller editor-side overview.
Requirements
Item | Notes |
OS | Windows 10/11 (64-bit) |
Editor | Notepad++ 8+ installed |
Python | 3.12+ ( |
API | pywin32 (pulled in on Windows) |
Installation
Recommended: uv.
From a clone of this repo:
git clone https://github.com/sandraschi/notepadpp-mcp.git
Set-Location notepadpp-mcp
uv sync
uv run notepadpp-mcp --helpOr install the package in editable mode:
uv pip install -e ".[dev]"When the package is published to PyPI, you can run it with:
uvx notepadpp-mcpUsage
How the server runs
The published console script is notepadpp-mcp (notepadpp_mcp.server:run in pyproject.toml).
Default stdio: what most MCP hosts use (Claude Desktop, Cursor, etc.). No extra flags.
Optional HTTP bridge: FastAPI + uvicorn on
127.0.0.1, MCP HTTP at/mcp.
notepadpp-mcp --http --port 10815Change --port if 10815 is taken (see central port registry if you use a fleet of MCP webapps).
MCP client configuration
Claude Desktop (claude_desktop_config.json) point command/args at your install. Example using uv from a fixed repo path:
{
"mcpServers": {
"notepadpp-mcp": {
"command": "uv",
"args": ["run", "--directory", "D:/Dev/repos/notepadpp-mcp", "notepadpp-mcp"]
}
}
}If notepadpp-mcp is on PATH:
{
"mcpServers": {
"notepadpp-mcp": {
"command": "notepadpp-mcp",
"args": []
}
}
}Legacy: older docs referenced python -m notepadpp_mcp.tools.server. Prefer notepadpp-mcp unless you are debugging that module.
Calling tools (conceptual)
The assistant calls MCP tools by name; you do not run these in PowerShell. Examples of operations inside portmanteau tools:
Tool | Typical |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also: suggest_notepad_plan, agentic_notepad_workflow (orchestration), depending on build.
Session snapshots (session_ops)
save Copies Notepad++s live
session.xml(typically%APPDATA%\Notepad++\session.xml), which lists all open buffers, into a named file under%APPDATA%\Notepad++\notepadpp-mcp-sessions\. Format matches what Notepad++ uses for Load Session /-openSession. If the live file is missing or lists no files, the server falls back to a minimal session built from the active tab path when that path exists on disk.load Runs
notepad++.exe -openSession "<saved.xml>". Whether a new or existing instance opens files depends on your Multi-instance settings in Notepad++.Overrides
NOTEPADPP_SESSION_STORAGE_DIR(where named*.xmlare stored),NOTEPADPP_LIVE_SESSION_XML(override path to the livesession.xml, e.g. portable or-settingsDirlayouts).
Sampling (LLM for workflows)
Optional. Set env vars as documented in the server / NotepadSamplingHandler, for example:
NOTEPADPP_SAMPLING_BASE_URLOpenAI-compatible base (e.g. Ollamahttp://127.0.0.1:11434/v1)NOTEPADPP_SAMPLING_MODELNOTEPADPP_SAMPLING_USE_CLIENT_LLMlet the MCP host run sampling when supported
Tools overview (portmanteau)
Tool | Purpose |
file_ops | Open, new, save, file info |
text_ops | Insert / find in buffer |
status_ops | Help, system status, health |
tab_ops | List / switch / close tabs |
session_ops | Save / load / list workspace sessions |
linting_ops | Python, JS, JSON, Markdown, (uses |
display_ops | Invisible text / display glitches |
plugin_ops | Discover / install / list / execute plugins |
Responses use a consistent dict shape: success, message or summary, plus error / recovery_options where relevant.
Documentation in repo
docs/EDITOR_AND_MCP_SCOPE.mdNotepad++ (editor) vs this server: strengths of the editor, boundaries of the MCP bridgedocs/NOTEPADPP_MACROS.mdMacros (what people use them for,shortcuts.xml, curated-set / future tool ideas)src/notepadpp_mcp/docs/API notes, examples, PRD where presentsrc/notepadpp_mcp/docs_manifest.pyREST/MCP overview for the web bridge (when enabled)
Development
uv pip install -e ".[dev]"
uv run pytest src/notepadpp_mcp/tests/
uv run ruff check src/notepadpp_mcp tests
uv run ruff format src/notepadpp_mcp testsOptional: python demonstration_test.py or project dev.py if present for integration smoke tests.
Roadmap / TODO (extensions)
Work that is planned or open good first issues for contributors:
Multi-instance / multi-window target a specific Notepad++ HWND when several are open
Richer plugin flows coordinated multi-plugin steps, better error surfaces from Plugin Admin
Linting HTML/CSS, optional config files for linters
Config profiles server-side defaults (paths, timeouts, auto-start)
Batch first-class batch file operations with progress reporting
Web UI align docs with the actual dashboard package (e.g.
web_sota/) and portsTests / coverage raise coverage; keep CI green on Windows runners
Macros curated XML snippets in-repo; optional read/list/merge for
%APPDATA%\Notepad++\shortcuts.xml(seedocs/NOTEPADPP_MACROS.md)
Older changelog bullets (multi-instance, plugin analytics, etc.) are folded into the list above where they still apply.
Troubleshooting
Notepad++ not found Install Notepad++, start it once, or enable auto-start behavior if your build supports it.
Windows API not available Use Windows; install pywin32 in the same environment as the server.
Tools missing in the client Restart the host, check MCP logs, confirm
notepadpp-mcpruns without errors from a terminal.Session save empty / fails Notepad++ may not refresh
session.xmluntil you have opened saved files or restarted the editor; ensure Settings > Preferences > Backup session behavior matches your expectations. For portable installs, setNOTEPADPP_LIVE_SESSION_XMLto the correctsession.xml.
Changelog (short)
0.2.x
session_opspersists named sessions: copies livesession.xml, loads via-openSession(see README section Session snapshots).0.2.0 FastMCP 3.1.0, sampling, skills, prompts, agentic workflow, HTTP bridge + web hooks as implemented in
server.py.Earlier Portmanteau tool consolidation, linting and plugin tooling.
🛡️ Industrial Quality Stack
This project adheres to SOTA 14.1 industrial standards for high-fidelity agentic orchestration:
Python (Core): Ruff for linting and formatting. Zero-tolerance for
printstatements in core handlers (T201).Webapp (UI): Biome for sub-millisecond linting. Strict
noConsoleLogenforcement.Protocol Compliance: Hardened
stdout/stderrisolation to ensure crash-resistant JSON-RPC communication.Automation: Justfile recipes for all fleet operations (
just lint,just fix,just dev).Security: Automated audits via
banditandsafety.
License
MIT see LICENSE.
This server cannot be installed
Maintenance
Appeared in Searches
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