docx-fnbib-mcp
Click on "Deploy 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., "@docx-fnbib-mcp Add APA citations and a bibliography to my thesis.docx"
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.
word-footnotes-bibliography-mcp
A self-contained Model Context Protocol
server that adds footnotes, in-text citations, and a bibliography /
references / works-cited section to Microsoft Word .docx files — without
Word.
Styles: APA 7, MLA 9, Chicago 17 (author-date and notes). Transport: stdio.
Prefer a Claude skill (SKILL.md + a CLI, no server) with the same capabilities? See the companion repo word-footnotes-bibliography-skill.
What's in here
word-footnotes-bibliography-mcp/
├── server.py the MCP server (10 tools)
├── docx_fnbib/ the engine (python-docx + lxml) — importable on its own
├── pyproject.toml installs `docx-fnbib-mcp` console script
├── requirements.txt
├── examples/build_demo.py
└── tests/ pytest suite (13 tests)Related MCP server: mcp-server-docx
Install
git clone https://github.com/<you>/word-footnotes-bibliography-mcp
cd word-footnotes-bibliography-mcp
pip install -e . # or: pip install -r requirements.txtRequires Python 3.10+ and the mcp SDK v2 (MCPServer). For SDK v1, change the
import in server.py to from mcp.server.fastmcp import FastMCP — the tool API
is identical.
Run
docx-fnbib-mcp # console script (after pip install -e .)
python server.py # or run the module directlyRegister with a client
{
"mcpServers": {
"docx-fnbib": { "command": "docx-fnbib-mcp" }
}
}Without installing the console script:
{
"mcpServers": {
"docx-fnbib": {
"command": "python",
"args": ["/absolute/path/to/word-footnotes-bibliography-mcp/server.py"]
}
}
}Tools
Tool | Purpose |
| new .docx with optional title + paragraphs |
| list paragraphs as |
| footnote on a paragraph; |
| existing footnotes |
| add/replace a bibliography source (matched by |
| manage the source store |
| bulk import BibTeX or CSL-JSON |
| in-text citation (a footnote, for |
| References / Works Cited section |
Styles: apa, mla, chicago-author-date, chicago-notes.
Modes: text (formatted by the server) or field (Word CITATION /
BIBLIOGRAPHY fields the user refreshes in Word).
Paths resolve on the machine running the server; edits are in place unless an
out path is passed.
Example session
create_document {path: "paper.docx", title: "Draft", paragraphs: ["A claim.", "Another point about Rome."]}
add_source {path: "paper.docx", source: {tag: "Syme1939", type: "Book", authors: ["Syme, Ronald"], title: "The Roman Revolution", year: "1939", city: "Oxford", publisher: "Clarendon Press"}}
add_footnote {path: "paper.docx", paragraph_index: 2, text: "Founded 753 BC.", anchor: "Rome"}
add_citation {path: "paper.docx", paragraph_index: 1, tag: "Syme1939", style: "chicago-notes", page: "47"}
add_bibliography{path: "paper.docx", style: "chicago-author-date", heading: "Bibliography"}How it works (short version)
Footnotes — creates
word/footnotes.xml, the separator notes, theFootnoteText/FootnoteReferencestyles, and numbered reference marks. Reopen-safe: numbering continues from existing notes.Sources — stored in Word's native
customXmlbibliography part (b:namespace), so References ▸ Manage Sources in Word sees them.Rendering —
textmode formats entries itself (italic titles, hanging indent, sorted);fieldmode writes Word fields and setsSelectedStyle.chicago-notesemits real footnotes.
Run the tests
pip install -e ".[test]"
pytestLimitations
fieldmode needs desktop Word to render; elsewhere fields show cached text.The
textformatter covers common source types well but is not a full CSL engine.Endnotes: create as footnotes, then Convert Notes in Word.
Verify important documents open cleanly in your target Word version.
License
MIT — see LICENSE.
Available Tools
10 toolsadd_bibliographyB
Append a References / Works Cited section built from the stored sources.
Inputs: path (required), out, mode, style, +1 more. Returns: object
add_citationB
Append an in-text citation for tag to a paragraph.
With style 'chicago-notes' the citation is rendered as a footnote instead of parenthetical text.
Inputs: tag (required), path (required), paragraph_index (required), out, +4 more. Returns: object
add_footnoteA
Attach a footnote to a paragraph.
If anchor is given, the footnote mark is placed right after that
substring; otherwise it goes at the end of the paragraph. Creates
word/footnotes.xml and the FootnoteText/FootnoteReference styles on first use.
Inputs: path (required), text (required), paragraph_index (required), out, +1 more. Returns: object
add_sourceB
Add or replace a bibliography source (matched by tag).
Source fields: tag, type (Book|BookSection|JournalArticle| ArticleInAPeriodical|ConferenceProceedings|Report| DocumentFromInternetSite|Misc), authors/editors/translators (list of {last,first,middle} or {corporate} or "Last, First" strings), title, year, month, day, publisher, city, journal, volume, issue, pages, edition, doi, url, accessed, note.
Inputs: path (required), source (required), out. Returns: object
create_documentB
Create a new .docx at path with an optional title and body paragraphs.
Inputs: path (required), title, paragraphs. Returns: object
document_outlineA
List every paragraph as {index, style, text} so you can target one.
Inputs: path (required). Returns: result
import_referencesC
Bulk-import sources from a BibTeX (fmt='bibtex') or CSL-JSON
(fmt='csl-json') string.
Inputs: data (required), path (required), fmt, out. Returns: object
list_footnotesB
Return existing footnotes as {id, text}.
Inputs: path (required). Returns: result
list_sourcesB
Return all sources stored in the document.
Inputs: path (required). Returns: result
remove_sourceC
Delete the source with the given tag.
Inputs: tag (required), path (required), out. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools clearly target distinct resources: paragraphs, footnotes, sources, citations, and the document itself. Minor ambiguity exists between add_footnote and add_citation when using 'chicago-notes' style, since the citation is rendered as a footnote, but the descriptions clarify the intent.
The naming is mostly consistent with a verb_noun pattern: add_footnote, list_footnotes, add_source, list_sources, remove_source, add_citation, add_bibliography, create_document. The exception is document_outline, which is a noun phrase rather than a verb-led action, making it the one inconsistent name.
With 10 tools, the set is well-scoped for a docx footnote and bibliography server. Each tool covers a distinct part of the workflow without unnecessary duplication or bloat.
The surface covers the full creation workflow: document creation, outlining, footnote insertion/listing, source management, citation insertion, and bibliography generation. Minor gaps exist—there is no way to remove or edit footnotes or citations, and source updates are only handled through add_source/import_references.
Maintenance
Related MCP Connectors
Document editing, AI writing, saved documents, DOCX downloads, PDF, STT, TTS and watermarking
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Create Word .docx files from sections or markdown, fill templates, and read text from a .docx.
Turn Markdown and AI answers into Word (.docx) with native equations, or into PDF.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables comprehensive management of Microsoft Word documents with 30+ tools for reading, writing, formatting, template merging, image extraction, equation extraction, and style application.241MIT
- AlicenseBqualityDmaintenanceEnables creating professional Word documents from markdown or structured content with fast, customized formatting via natural language.71ISC
- AlicenseAqualityBmaintenanceEnables full-featured editing of Word .docx files through natural language, including merge-aware table operations, bulk cell edits, footnotes/endnotes, TOC management, tracked changes, and document comparison.1016AGPL 3.0
- AlicenseAqualityBmaintenanceEnables users to generate APA 7, MLA 9, or Chicago author-date citations from a DOI, ISBN, or entered details, and to produce matching in-text citations with optional page numbers.8179 npmMIT