
givhvy/word-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Сервер MCP для Microsoft Word, работающий на вашем ПК с Windows: читайте полный контекст документа, смотрите изображения и страницы, редактируйте, форматируйте, комментируйте и отвечайте.
Обзор
Сервер MCP, который позволяет агенту ИИ работать внутри, на локальных файлах и на документах SharePoint / OneDrive, открытых на рабочем столе Word. Агент вводит прямо в ваш открытый документ, пока вы смотрите: ни закрытия, ни повторного открытия, ни сохранения за вашей спиной. Построенный для написания технических документов с помощью агента: - агент читает вашу кодовую базу и пишет целые разделы (заголовки, списки, блоки кода, таблицы, скриншоты и диаграммы с пронумерованными подписями) с помощью word insert markdown; - он читает , в том числе то, что вы набрали сами и не сохранили, с его изображениями и комментариями (word context), и видит страницы именно так, как их отображает Word; - он замечает, поскольку он в последний раз выглядел (word changes) и нацеливает места по заголовку текста, поэтому ваше собственное письмо и его написание могут быть безопасно смешаны; - все, что он пишет, следует за документом: собственный заголовок, тело, список, таблица, код и стили подписи (обнаружено из документа или скопировано из файла шаблона); - сохранение остается (Ctrl + S):.
Обзор (машинный перевод)
Сервер MCP, который позволяет агенту ИИ работать внутри **Microsoft Word, который открыт на вашем ПК с Windows **, на локальных файлах и на документах SharePoint/OneDrive, открытых на рабочем столе Word. Агент печатает прямо В ваш открытый документ, пока вы смотрите: ни закрытия, ни повторного открытия, ни сохранения за вашей спиной.
Создан для написания технических документов с агентом:
- агент читает вашу кодовую базу и пишет целые разделы (заголовки, списки, блоки кода, таблицы);
скриншоты и диаграммы с пронумерованными подписями) в один звонок с
word_insert_markdown; - он читает весь живой документ**, включая то, что вы набрали сами и не сохранили, его изображения и комментарии ([T1]) и видит страницы точно так же, как их отображает Слово;
- он замечает ** ваши правки ** с тех пор, как он последний раз выглядел
word_changesи нацеливает места по заголовку текста, Чтобы ваше собственное письмо и его письмо могли быть безопасно смешаны. - все, что он пишет, следует стилю документа house: собственный заголовок шаблона, тело, стили списка, таблицы, кода и подписи (обнаружены из документа или скопированы из файла шаблона);
- сохранение остается ** ваше решение ** (Ctrl + S): агент никогда не экономит, если вы не попросите.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
word-mcp
An MCP server that lets an AI agent work inside the Microsoft Word that is open on your Windows PC, on local files and on SharePoint / OneDrive documents opened in Word desktop. The agent types straight into your open document while you watch: no closing, no reopening, no saving behind your back.
Built for writing technical documents with an agent:
- the agent reads your codebase and writes whole sections (headings, lists, code blocks, tables,
screenshots and diagrams with numbered captions) in one call with
word_insert_markdown; - it reads the whole live document, including what you typed yourself and have not saved, with
its images and comments (
word_context), and sees pages exactly as Word renders them; - it notices your edits since it last looked (
word_changes) and targets places by heading text, so your own writing and its writing can be mixed safely; - everything it writes follows the document’s house style: your template’s own heading, body, list, table, code and caption styles (detected from the document, or copied from a template file);
- saving stays your decision (Ctrl+S): the agent never saves unless you ask.
It uses Word’s own COM automation API, so everything happens in the real Word window, and every agent edit is a single Ctrl+Z step.
Requirements
- Windows 10 or 11
- Microsoft Word desktop (Microsoft 365, 2021, 2019 or 2016). Word on the web and Word for Mac do not work.
- Python 3.10 or newer
Install
1. Get the code and install dependencies
A virtual environment keeps the dependencies away from your other Python projects, and gives the
MCP client one fixed python.exe to launch.
git clone https://github.com/givhvy/word-mcp.git
cd word-mcp
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
Check Python can reach Word (prints its version, changes nothing). Word must be installed; it does not need to be open.
.\.venv\Scripts\python.exe -c "import win32com.client as c; print('Word', c.Dispatch('Word.Application').Version)"
2. Register it with your agent
Rules that apply to every client:
- The command is the full path to the venv’s
python.exe, followed by the full path toword_mcp_server.py. Relative paths break because the client starts the server from its own working directory. - The server talks over stdio. Do not run it by hand to “start” it: the client launches it.
- Below, replace
C:\path\to\word-mcpwith the folder you cloned into. - The default name is
word-huy. It is the key in each config below (and the name afterclaude mcp add). You can use any other name. The name only sets the tool prefix, for examplemcp__word-huy__...in Claude Code orword-huy_...in OpenCode. If you rename it, use your name wherever this README saysword-huy. - The
-Iflag runs Python isolated from the current directory. It is optional but recommended.
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"word-huy": {
"command": "C:\\path\\to\\word-mcp\\.venv\\Scripts\\python.exe",
"args": ["-I", "C:\\path\\to\\word-mcp\\word_mcp_server.py"]
}
}
}