Docsmith MCP
Supports advanced data analysis and manipulation by allowing the use of the pandas library within the server's Python execution environment.
Enables the execution of Python code in a secure WebAssembly sandbox for custom file operations, data processing, and complex automation tasks.
Allows for the reading and writing of YAML and YML files, supporting configuration management and data serialization.
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., "@Docsmith MCP read the first 2 pages of monthly_report.pdf"
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.
docsmith-mcp
Python-powered document processing MCP with MCP Apps — Process Excel, Word, PDF, PowerPoint documents with ease using Python, and view them beautifully through an interactive MCP App.
Features
Excel: Read/write
.xlsxfiles with sheet support and paginationWord: Read/write
.docxfiles with paragraph and table supportPDF: Read
.pdffiles with text extraction and paginationPowerPoint: Read
.pptxfiles with slide content extractionText Files: Read/write
.txt,.csv,.md,.json,.yaml,.ymlwith pagination supportRun Python: Execute Python code for flexible file operations and data processing
MCP App: Beautiful React + Tailwind CSS app for viewing all document types
Flexible Reading Modes: Raw full read or paginated for large files
Powered by Pyodide: Runs in secure WebAssembly sandbox via code-runner-mcp
Related MCP server: docxtpl MCP Server
Quick Start
MCP Configuration
Add to your MCP client configuration (e.g., Claude Desktop, Cline, etc.):
Via npx (recommended):
{
"mcpServers": {
"docsmith": {
"command": "npx",
"args": ["-y", "docsmith-mcp"],
"env": {
"DOC_PAGE_SIZE": "100"
}
}
}
}Via global installation:
npm install -g docsmith-mcp{
"mcpServers": {
"docsmith": {
"command": "docsmith-mcp",
"env": {
"DOC_PAGE_SIZE": "100"
}
}
}
}Via local path:
{
"mcpServers": {
"docsmith": {
"command": "node",
"args": ["/path/to/docsmith-mcp/dist/index.js"]
}
}
}Then use the read_document tool:
{
"file_path": "/path/to/document.xlsx",
"mode": "paginated",
"page": 1,
"page_size": 50
}The MCP App will automatically open to display the document content beautifully.
Supported Formats
Format | Extensions | Read | Write | Notes |
Excel |
| ✅ | ✅ | Multi-sheet support, pagination |
Word |
| ✅ | ✅ | Paragraphs and tables |
| ✅ | ❌ | Text extraction with pagination | |
PowerPoint |
| ✅ | ❌ | Slide content extraction |
CSV |
| ✅ | ✅ | - |
Text |
| ✅ | ✅ | Pagination support |
JSON |
| ✅ | ✅ | - |
YAML |
| ✅ | ✅ | - |
Tools
read_document
Read document content with automatic format detection.
Parameters:
file_path(string, required): Path to the documentmode(string, optional):"paginated"or"raw"(default:"paginated")page(number, optional): Page number for paginated mode (default: 1)page_size(number, optional): Items per page (default: 100)sheet_name(string, optional): Sheet name for Excel files
Example:
{
"file_path": "/path/to/document.xlsx",
"mode": "paginated",
"page": 1,
"page_size": 50,
"sheet_name": "Sheet1"
}write_document
Write document content.
Parameters:
file_path(string, required): Output pathformat(string, required):"excel","word","csv","txt","json","yaml"data(array/object, required): Document content
Example:
{
"file_path": "/path/to/output.xlsx",
"format": "excel",
"data": [
["Product", "Q1", "Q2"],
["Laptop", 100, 150],
["Mouse", 500, 600]
]
}get_document_info
Get document metadata without reading full content.
Parameters:
file_path(string, required): Path to the document
Example:
{
"file_path": "/path/to/document.pdf"
}run_python
Execute Python code for flexible file operations, data processing, and custom tasks. Supports any file format and Python libraries.
Parameters:
code(string, required): Python code to executepackages(object, optional): Package mappings (import_name -> pypi_name) for required dependenciesfile_paths(array, optional): File paths that the code needs to access
Examples:
Read and process any file:
{
"code": "import json\nwith open('/path/to/file.json') as f:\n data = json.load(f)\n result = len(data)\n print(json.dumps({'count': result}))",
"file_paths": ["/path/to/file.json"]
}Batch rename files with regex:
{
"code": "import os, re\nfolder = '/path/to/files'\nfor name in os.listdir(folder):\n new_name = re.sub(r'old_', 'new_', name)\n os.rename(os.path.join(folder, name), os.path.join(folder, new_name))\nprint(json.dumps({'success': True}))",
"file_paths": ["/path/to/files"]
}Process data with pandas:
{
"code": "import pandas as pd\ndf = pd.read_csv('/path/to/data.csv')\nsummary = df.describe().to_dict()\nprint(json.dumps(summary))",
"packages": {"pandas": "pandas"},
"file_paths": ["/path/to/data.csv"]
}Extract archive files:
{
"code": "import zipfile, os\nwith zipfile.ZipFile('/path/to/archive.zip', 'r') as z:\n z.extractall('/path/to/output')\nfiles = os.listdir('/path/to/output')\nprint(json.dumps({'extracted_files': files}))",
"file_paths": ["/path/to/archive.zip", "/path/to/output"]
}MCP App
The built-in MCP App provides a beautiful, interactive interface for viewing documents:
Excel: Interactive tables with sticky headers
PDF: Page-by-page text viewing
Word: Paragraph and table rendering
PowerPoint: Slide navigation
Built with React 19, Tailwind CSS v4, and Lucide icons.
Configuration
Environment variables for customizing behavior:
Variable | Description | Default |
| Enable full raw read mode |
|
| Default items per page |
|
| Max file size in MB |
|
Contributing
See CONTRIBUTING.md for development setup and contribution guidelines.
License
MIT
Available Tools
4 toolsget_document_infoB
Get document metadata (page count, sheet count, slide count, file size, etc.)
Inputs: file_path (required), file_type. Returns: Document metadata with format-specific fields
read_documentA
Read document content (Excel, Word, PowerPoint, PDF, TXT, CSV, Markdown, JSON, YAML). Supports raw full read or paginated mode. Includes interactive UI for Excel and PDF.
Inputs: file_path (required), file_type, mode, page, +2 more. Returns: Document content with format-specific structure. Common fields: success (boolea…
run_pythonC
Execute Python code for flexible file operations, data processing, and custom tasks. Supports any file format and Python libraries.
Inputs: code (required), packages, file_paths. Returns: error, result, stderr, stdout, +1 more
write_documentC
Write document content (Excel, Word, PowerPoint, Text)
Inputs: file_path (required), format (required), data (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The tools are mostly distinct in purpose: get_document_info for metadata, read_document for reading content, write_document for writing content, and run_python for custom operations. However, run_python could overlap with read_document and write_document for file operations, potentially causing confusion about when to use it versus the specialized tools.
All tool names follow a consistent verb_noun pattern with snake_case: get_document_info, read_document, run_python, write_document. This makes them predictable and easy to understand, with no deviations in style.
With 4 tools, the count is reasonable for a document processing server, covering core operations like reading, writing, and metadata retrieval. However, it feels slightly thin as it lacks tools for operations like document conversion, editing, or deletion, which might be expected in a comprehensive document toolset.
The toolset covers basic read, write, and metadata operations, but has notable gaps for a document processing domain. Missing operations include document conversion (e.g., to different formats), editing (e.g., modifying content without full rewrite), and deletion, which could limit agent workflows and cause dead ends in complex tasks.
Maintenance
Related MCP Connectors
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Convert PDF, Word, Excel and scanned documents to Markdown, tables and RAG chunks. OCR.
Hosted document tools for agents: extract, parse, classify, convert, OCR, sign, and redact.
Composable APIs for document extraction, image transformation, and document & sheet generation.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceEnables AI assistants to create, read, and manipulate Microsoft Word documents with comprehensive formatting, table creation, content management, and document protection capabilities. Supports advanced operations like merging documents, PDF conversion, and rich text formatting through a standardized interface.32MIT
- AlicenseNot gradedqualityDmaintenanceEnables Word document generation from templates using Jinja2 syntax and parsing of DOCX, PDF, and Excel files to extract structured content, metadata, and text.17 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and users to process documents through natural language, supporting PDF operations like text extraction, redaction, splitting, form filling, annotations, and content search.85 npm62MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to create, edit, and extract data from Microsoft Word documents programmatically, supporting document creation, content editing, table manipulation, parameter extraction, and template generation.1MIT