vespper-mcp
v0.2.5Local stdio MCP server for editing DOCX files with Vespper.
Edit local DOCX files through Vespper from any MCP client. vespper-mcp is a local stdio server. It reads, creates, and replaces files only under directories you allow, while delegating document rendering, search, and edits to Vespper's hosted service. VESPPER_MCP_URL can provide the hosted URL. The API key is accepted only through VESPPER_API_KEY, not a command-line argument.
Summary extracted from the README.
vespper-mcp
Edit local DOCX files through Vespper from any MCP client.
vespper-mcp is a local stdio server. It reads, creates, and replaces files
only under directories you allow, while delegating document rendering, search,
and edits to Vespper's hosted service.
Edits change the file in place. Copy a document first if you need to preserve the original.
Local or hosted
https://mcp.vespper.com/mcpis hosted and needs no installation, but it cannot access paths on your computer.npx -y vespper-mcpruns as one long-lived local child process, can access explicitly allowed directories, and saves successful edits back to the file.
Both require a Vespper API key.
Run
export VESPPER_API_KEY="your-api-key"
npx -y vespper-mcp --allowed-directory /absolute/path/to/documents
Options:
--allowed-directory <path> Editable directory; repeat for more than one
--author <name> Default tracked-change author (default: "Vespper Agent")
--mcp-url <url> Hosted Vespper MCP URL
--help Show help
--version Show the installed version
VESPPER_MCP_URL can provide the hosted URL. The API key is accepted only
through VESPPER_API_KEY, not a command-line argument.
If no allowed directory is provided, the server allows the directory in which the MCP client starts it. For predictable access, always configure absolute directories.
Client setup
Use an absolute allowed directory in each example.
Claude Code
Add this to the project's .mcp.json:
{
"mcpServers": {
"vespper": {
"command": "npx",
"args": [
"-y",
"vespper-mcp",
"--allowed-directory",
"/absolute/path/to/documents"
],
"env": {
"VESPPER_API_KEY": "your-api-key"
}
}
}
}
Cursor
Add the same server entry to .cursor/mcp.json:
{
"mcpServers": {
"vespper": {
"command": "npx",
"args": [
"-y",
"vespper-mcp",
"--allowed-directory",
"/absolute/path/to/documents"
],
"env": {
"VESPPER_API_KEY": "your-api-key"
}
}
}
}
Codex
Add this to ~/.codex/config.toml:
[mcp_servers.vespper]
command = "npx"
args = [
"-y",
"vespper-mcp",
"--allowed-directory",
"/absolute/path/to/documents",
]
[mcp_servers.vespper.env]
VESPPER_API_KEY = "your-api-key"
Prefer your client's secret store or environment inheritance over committing an API key to a project file.
Raw MCP configuration
Clients that accept the common JSON stdio shape can use:
{
"command": "npx",
"args": [
"-y",
"vespper-mcp",
"--allowed-directory",
"/absolute/path/to/documents"
],
"env": {
"VESPPER_API_KEY": "your-api-key"
}
}
The client should keep this child process alive for the complete tool lifecycle rather than spawning a process for each call.
Tools
create_documentcreates a blank<name>.docxin the first allowed directory and returns itsfile_path.read_documentreturns a page range of a document as editable HTML.search_documentregex-searches up to eight documents in one call.edit_documentapplies HTML{ old, new }pairs and saves the result to the file.
Tools take file paths. A file_path is absolute, or relative to the first
allowed directory, so "report.docx" names report.docx in that directory.
Only .docx files are accepted, and glob patterns are not expanded.
create_document takes an optional name without the extension (default
untitled) and fails if that file already exists. To write a new document,
create it, read it with read_document, then replace the blank document's HTML
with edit_document.
edit_document makes tracked changes by default. Pass track_changes: false
for plain edits, and author to set that call's tracked-change author (default:
--author). Edits to documents made by create_document are untracked unless
track_changes is true.
The server manages Vespper sessions itself. It opens one the first time a tool uses a file and reuses it for later calls. It starts a fresh session when the file changes on disk or the hosted session expires, closes the least recently used session once 16 are open, and closes every session on shutdown.
File safety
Paths must name existing, writable DOCX files inside an allowed directory.
Symlinks are resolved before the containment check. MCP Roots are not used.
create_document only writes new files and never overwrites an existing one.
Saving writes and flushes a sibling temporary file before renaming it over the
DOCX. A failed temporary write leaves the original file intact. If an edit
succeeds remotely but replacement fails—for example because Word has the file
locked—the tool reports file_saved: false and keeps the updated bytes in
memory. The next call on that file retries the save. Do not retry the same
edit.
If the file changes on disk while an edit is still waiting to be saved, the version on disk wins. The next call reports that the pending edit was discarded, so the agent can read the document again and redo it.
Node.js 22 or newer is required.