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 "Install 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 MCPread 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.)
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the document file | |
| file_type | No | Override file type detection (optional). Specify format explicitly instead of relying on extension |
Output Schema
| Name | Required | Description |
|---|---|---|
| error | No | |
| pages | No | |
| sheets | No | |
| slides | No | |
| tables | No | |
| headers | No | |
| success | No | |
| encoding | No | |
| metadata | No | |
| file_size | No | |
| file_type | No | |
| key_count | No | |
| item_count | No | |
| line_count | No | |
| paragraphs | No | |
| total_cols | No | |
| total_rows | No | |
| total_words | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states 'Get document metadata' which implies a read-only operation, but doesn't disclose behavioral traits like error handling (e.g., if file doesn't exist), performance considerations, or authentication needs. The description is minimal and lacks context beyond the basic action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and includes helpful examples (page count, etc.) that add value without verbosity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (simple metadata retrieval), 100% schema coverage, and the presence of an output schema (which handles return values), the description is reasonably complete. It clearly states what the tool does, though it lacks usage guidelines and behavioral details that could enhance agent understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds no parameter-specific information beyond implying metadata retrieval, which is covered by the tool's purpose. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'document metadata' with specific examples (page count, sheet count, slide count, file size, etc.). It distinguishes from sibling tools like 'read_document' (which likely reads content) and 'write_document' (which modifies content), though it doesn't explicitly mention these distinctions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., file existence), when not to use it, or how it differs from siblings like 'read_document' beyond the metadata focus implied in the purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the document file | |
| file_type | No | Override file type detection (optional). Specify format explicitly instead of relying on extension | |
| mode | No | Read mode | |
| page | No | Page number for paginated mode | |
| page_size | No | Items per page | |
| sheet_name | No | Sheet name for Excel files |
Output Schema
| Name | Required | Description |
|---|---|---|
| data | No | |
| page | No | |
| error | No | |
| sheets | No | |
| slides | No | |
| tables | No | |
| content | No | |
| headers | No | |
| success | No | |
| encoding | No | |
| has_more | No | |
| page_size | No | |
| paragraphs | No | |
| sheet_name | No | |
| total_cols | No | |
| total_rows | No | |
| total_lines | No | |
| total_pages | No | |
| current_page | No | |
| total_slides | No | |
| total_tables | No | |
| total_paragraphs | No | |
| total_page_groups | No | |
| current_page_group | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses key behavioral traits: format support, read modes (raw/paginated), and interactive UI for specific formats. However, it doesn't mention performance characteristics, error handling, authentication requirements, or rate limits that would be important for a document reading tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured in two sentences that each add value: first establishes core functionality with format enumeration, second adds mode and UI information. No redundant information, though it could be slightly more front-loaded with the most critical information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (6 parameters, multiple formats and modes) and the presence of an output schema, the description provides good foundational context. It covers what the tool does, supported formats, and key operational modes. The output schema existence means return values don't need explanation, making this reasonably complete for agent usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds some context about format support and modes that complements the schema, but doesn't provide additional parameter semantics beyond what's already documented in the schema descriptions. The description doesn't explain parameter interactions or provide usage examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific verb ('Read') and resource ('document content'), enumerates supported file formats, and distinguishes from sibling tools like 'get_document_info' (metadata) and 'write_document' (write operation). It provides comprehensive scope information beyond just the tool name.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context through format support and mode options, but doesn't explicitly state when to use this tool versus alternatives like 'get_document_info' for metadata or 'write_document' for modifications. No explicit when-not-to-use guidance or prerequisite information is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
run_pythonC
Execute Python code for flexible file operations, data processing, and custom tasks. Supports any file format and Python libraries.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python code to execute. Access files using their absolute paths. | |
| packages | No | Package mappings (import_name -> pypi_name) for required dependencies | |
| file_paths | No | File paths that the code needs to access |
Output Schema
| Name | Required | Description |
|---|---|---|
| error | No | |
| result | No | |
| stderr | No | |
| stdout | No | |
| success | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Supports any file format and Python libraries', which hints at capabilities, but lacks critical behavioral details: it doesn't mention security implications (e.g., sandboxing, permissions), resource limits (e.g., execution time, memory), error handling, or output format. For a powerful tool like code execution, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two sentences that efficiently cover the tool's purpose and capabilities. It's front-loaded with the core function ('Execute Python code') and avoids unnecessary details. However, it could be slightly more structured by separating use cases or adding a brief example, but overall, it's well-sized with minimal waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (code execution with 3 parameters, no annotations, but an output schema exists), the description is moderately complete. It covers the high-level purpose and capabilities but lacks depth in usage guidelines, behavioral transparency, and parameter semantics. The presence of an output schema means return values are documented elsewhere, reducing the burden on the description, but for a tool with potential security and resource implications, more context is needed to be fully helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all three parameters (code, packages, file_paths) with descriptions. The description adds no additional meaning beyond what the schema provides—it doesn't explain parameter interactions, provide examples, or clarify semantics like how 'packages' mappings work or how 'file_paths' are accessed. Baseline 3 is appropriate since the schema does the heavy lifting, but the description doesn't compensate with extra insights.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with the verb 'Execute' and resource 'Python code', specifying it's for 'flexible file operations, data processing, and custom tasks'. It distinguishes from sibling tools (get_document_info, read_document, write_document) by focusing on code execution rather than document operations, though it doesn't explicitly name those alternatives. The purpose is specific but could be more precise about what distinguishes it from similar code execution tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It mentions 'flexible file operations, data processing, and custom tasks' but doesn't specify scenarios where run_python is preferred over sibling tools like write_document for file operations or other code execution methods. There's no mention of prerequisites, constraints, or typical use cases, leaving the agent with minimal contextual guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_documentC
Write document content (Excel, Word, PowerPoint, Text)
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to save the document | |
| format | Yes | Document format | |
| data | Yes | Document data structure. Excel: array of rows [[cell1, cell2], ...]. Word: {paragraphs: string[], tables?: [[[cell]]]}. Text/CSV/JSON: string or object |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It implies a write operation ('Write') but lacks critical behavioral details: it doesn't disclose whether this overwrites existing files, requires specific permissions, handles errors, or has side effects like file creation. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise and front-loaded, using a single phrase that efficiently conveys the core purpose and supported formats. Every word earns its place with no redundancy or unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a write operation with 3 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, error handling, file system interactions, and return values, making it inadequate for safe and effective tool invocation by an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema by listing supported formats, but it doesn't provide additional context on parameter usage, constraints, or examples. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Write') and resource ('document content'), specifying the supported formats (Excel, Word, PowerPoint, Text). It distinguishes from sibling tools like 'read_document' by focusing on writing rather than reading. However, it doesn't explicitly differentiate from 'get_document_info' or 'run_python' in terms of document creation vs. metadata retrieval or execution.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., file system access), when-not-to-use scenarios (e.g., for reading documents), or explicit alternatives among sibling tools like 'read_document' for reading or 'run_python' for other operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Composable APIs for document extraction, image transformation, and document & sheet generation.
110+ deterministic file tools: PDF, image, media, convert, analyze. Connect in one click (OAuth).
Create and manage documents, spreadsheets, and presentations from your AI assistant.
Turn documents into structured, AI-ready data by parsing, enriching, chunking, and embedding.
Related MCP Servers
- -licenseBqualityNot 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.32
- 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.161MIT
- 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.20561MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to read, edit, and create Microsoft Word documents (.docx) with support for rich text, tables, and images, deployable locally or via SSE.3MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcpc-tech/docsmith-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server