doc-tools-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., "@doc-tools-mcp search my bibliography for the author 'Smith'"
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.
Doc Tools MCP Server
⚠️ Work in Progress — APIs may change without notice.
A Model Context Protocol (MCP) server for managing pandoc/CSL-YAML bibliographies and verifying citations. Lets your LLM read, search, add, update, delete, validate bibliography entries, and systematically verify that citations support the claims made in your text.
Quick Start
npx @metaneutrons/doc-tools-mcpAdd to your MCP client config (e.g., claude_desktop_config.json):
{
"mcpServers": {
"doc-tools": {
"command": "npx",
"args": ["-y", "@metaneutrons/doc-tools-mcp"],
"env": {
"DT_BIB_YAML": "/path/to/references.yaml",
"DT_BIB_CSL": "/path/to/style.csl",
"DT_CT_REGISTRY": "/path/to/ctverify.json"
}
}
}
}Related MCP server: cite-rag-mcp
Environment Variables
Variable | Description |
| Default path to CSL-YAML bibliography file. Makes |
| Default path to CSL style file (.csl). Enables style-aware field validation on |
| Default path to citation verification registry JSON. Makes |
All env vars are ignored if the referenced file does not exist. Tool descriptions adapt dynamically to show configured defaults.
Bibliography Tools (bib:*)
Read
Tool | Description |
| Retrieve a single entry by ID (full YAML block) |
| Full-text search across all fields: author, title, type, year, editor, container-title |
| List all entries of a given type (e.g., |
| Check if an ID exists (fast boolean check before citing) |
| Entry count total and breakdown by CSL type |
Write
Tool | Description |
| Add a new entry with duplicate ID check, required field validation, and YAML confirmation output |
| Patch individual fields of an existing entry (other fields remain untouched) |
| Remove an entry by ID |
Validation
Tool | Description |
| Check entire file: YAML syntax, required fields per CSL type, duplicate IDs, missing |
All write operations automatically create a .bak backup before modifying the file.
CSL Style Validation
When a CSL style file is configured (via DT_BIB_CSL or the style parameter), validation uses the variables actually referenced in the style instead of hardcoded required fields. Entry types not handled by the style produce a warning.
Without a style file, these hardcoded defaults apply:
Type | Required Fields |
|
|
|
|
|
|
|
|
|
|
|
|
Citation Verification Tools (ctverify:*)
Systematic verification that cited sources actually support the claims made in the text.
Workflow: extract → set claims → verify each claim against the source → update status.
Tool | Description |
| Extract citations from Pandoc inline footnotes ( |
| Batch update citation entries: set |
| Batch status update by ID list or |
| Show verification progress with counts. Filter by |
Re-sync after edits
Re-running ctverify:extract after text changes is safe:
Exact match — citations with unchanged text keep their claims and status
Proximity match — if cite text changed but the position is within ±5 lines, claims are recovered from the nearest previous entry
dry_run: true— preview new, removed, and proximity-matched entries before committing
Architecture
src/
├── index.ts # MCP server, dynamic provider loading, stdio transport
├── shared/
│ ├── types.ts # Provider, ToolDefinition, ToolResult interfaces
│ ├── logger.ts # Structured logging (pino → stderr)
│ └── errors.ts # Typed error hierarchy
└── providers/
├── bib/ # Bibliography provider
│ ├── index.ts # BibProvider (9 tool handlers, env var resolution)
│ ├── store.ts # YAML read/write with .bak backup
│ ├── schema.ts # Zod schemas + per-type field validation
│ ├── csl-style.ts # CSL style parser (variable extraction per type)
│ └── tools/ # Dynamic tool definitions (read + write)
└── ctverify/ # Citation verification provider
├── index.ts # CtverifyProvider (4 tool handlers)
├── extract.ts # Pandoc inline footnote parser
└── types.ts # CitationEntry interfaceThe provider system is extensible — add a new directory under src/providers/ with a createProvider() export and it will be auto-discovered at startup.
Development
npm install # Install dependencies
npm run build # Compile TypeScript
npm test # Run tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage report
npm run lint # ESLintCommit Convention
This repo uses Conventional Commits enforced via Husky + commitlint.
Types: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert
Scopes: bib, ctverify, core, deps, config
License
GPL-3.0 — See LICENSE for details.
Available Tools
14 toolsbib:addA
Add a new bibliography entry. Validates required fields per CSL type, checks for duplicate IDs, and creates a .bak backup before writing. Returns the created YAML block for confirmation.
Inputs: file (required), entry (required), style.
bib:deleteA
Remove a bibliography entry by ID. Creates a .bak backup before writing.
Inputs: id (required), file (required).
bib:existsA
Check if a citation ID exists in the bibliography. Fast boolean check before citing.
Inputs: id (required), file (required).
bib:getA
Retrieve a single bibliography entry by ID. Returns the full YAML block.
Inputs: id (required), file (required).
bib:listB
List all bibliography entries of a given CSL type (e.g., "legal_case", "book", "article-journal", "chapter").
Inputs: file (required), type (required), limit (required).
bib:searchA
Search bibliography entries across all fields: author, title, type, year, editor, container-title. Use ONE search term per call (e.g., "Pahlow" or "OLG Köln"). For multiple lookups, call this tool multiple times.
Inputs: file (required), limit (required), query (required).
bib:statsA
Get bibliography statistics: total entry count and breakdown by CSL type.
Inputs: file (required).
bib:updateA
Update fields of an existing bibliography entry. Only the specified fields are changed; all other fields remain untouched. Creates a .bak backup before writing.
Inputs: id (required), file (required), fields (required), style.
bib:validateA
Validate the entire bibliography file: YAML syntax, required fields per CSL type, duplicate IDs, and missing issued dates. Returns a list of errors and warnings.
Inputs: file (required), style.
ctverify:bulk-updateA
Update status (and optionally note) for multiple citations at once. Select entries either by a list of IDs or by filter (current status). At least one of ids or filter_status must be provided.
Inputs: status (required), registry_path (required), ids, note, +1 more.
ctverify:extractA
Extract citations from Pandoc inline footnotes (^[...]) for verification tracking. This is a CITATION VERIFICATION tool, not bibliography management. It extracts citations so the LLM can systematically verify that each cited source actually supports the claim made in the text. Use registry_path to save/merge results into a JSON registry file (preserves existing claims and statuses). Re-running after text edits is safe: exact cite matches preserve claims/status, proximity matching (±5 lines) recovers claims when cite text changed. Each citation captures ~200 chars of surrounding context for claim formulation. Workflow: extract → set claims → verify each claim against the source using research tools → update status.
Inputs: file (required), dry_run (required), registry_path (required).
ctverify:getA
Retrieve one or more citation entries by ID. Returns full details including cite, context, claim, status, and note.
Inputs: ids (required), registry_path (required).
ctverify:statusB
Show verification progress of a citation registry: counts by status and list of citations. Use filter_status to focus on specific statuses, filter_claim to search claims or find missing ones.
Inputs: limit (required), offset (required), registry_path (required), ids, +3 more.
ctverify:updateA
Batch update citation verification entries. Each entry can set claim, status, and/or note independently. The claim field records WHAT the text asserts at this citation point. The status tracks verification progress: pending → under_review → verified/disputed/not_found. If an ID does not exist and cite is provided, creates a new entry (for inline citations not in footnotes).
Inputs: entries (required), registry_path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
The bib:* and ctverify:* namespaces cleanly separate bibliography management from citation verification. Within each group, tools like get, search, exists, list, and stats have clearly distinct purposes, so an agent is unlikely to select the wrong one.
The namespace:action pattern is consistent and readable, with snake_case action names like bib:list and ctverify:bulk-update. The only minor deviations are noun-style actions such as bib:stats and ctverify:status, plus the hyphenated bulk-update.
Fourteen tools is well-scoped for a server covering bibliography management and citation verification. Each tool represents a distinct operation, and the split of 9 bibliography tools and 5 verification tools feels balanced without unnecessary bloat.
The bibliography side covers CRUD, search, validation, existence checks, and statistics, while the verification side covers extraction, status tracking, and batch updates. Minor gaps exist, such as no way to list all bibliography entries without specifying a CSL type and no delete operation for verification registry entries, but these are workable.
Maintenance
Related MCP Connectors
Zotero MCP server for Claude and ChatGPT: search, citations, safe writes, PDF passages and pages.
Remote MCP server for full read/write access to a Zotero library
MCP server for StyleKit styles, tokens, recipes, lint and repair over stdio or HTTP.
MCP server for FCA Handbook compliance analysis with verbatim citations.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for verifying academic citations via Semantic Scholar, OpenAlex, and CrossRef.128 PyPIMIT
- FlicenseNot gradedqualityDmaintenanceA local MCP server for evidence-safe academic citation workflows, including verified-reference retrieval, Zotero duplicate detection and import, and Word export via Pandoc with zotero.lua.1-
- AlicenseAqualityDmaintenanceAn MCP server that gives any MCP-compatible assistant access to your Zotero reference library, enabling search, citation, bibliography generation, and .docx processing while keeping Zotero as the ground truth for references.91MIT
- AlicenseNot gradedqualityDmaintenanceThis MCP server enables AI assistants like Claude to read and search your local Zotero bibliographic database directly from your machine.8MIT