Content
# MCP MarkitDown Base
This is an MCP (Multi-Agent Communication Protocol) service based on the `MarkItDown` library, designed to convert various file formats into Markdown text.
## Features
- Converts specified files into Markdown format text.
- Supports multiple file formats, including PDF, PowerPoint, Word, Excel, Images (EXIF metadata and OCR), Audio (EXIF metadata and speech transcription), HTML, Text-based formats (CSV, JSON, XML), ZIP files (iterates over contents), Youtube URLs, and EPubs.
- Optionally saves the converted Markdown text to a specified path.
## Installation
1. Clone the repository:
```bash
git clone https://gitee.com/mcp-markitdown-base.git
```
## Usage
The service provides the `convertFileToMarkdown` tool via the MCP protocol. You can call this tool through the MCP client.
### `convertFileToMarkdown` Tool
- **Description**: Converts the file at the given file path into Markdown format and returns the converted Markdown text.
- **Parameters**:
- `file` (str): File path, write the absolute path according to the system.
- `resultPath` (str): Path to save the converted Markdown text, you can pass an empty string `""` by default. If a specific path is required, write the absolute path according to the system.
### Example (Calling via MCP Client)
MCP client configuration example (Windows)
Here is an example configuration for an MCP client to start this service:
```json
{
"mcpServers": {
"mcp-markitdown-base": {
"command": "uv",
"args": [
"run",
"--directory",
"E:\\mcp-markitdown-base",
"main.py"
]
}
}
}
```
Please replace `E:\\mcp-markitdown-base` with the actual path of your project, and ensure that the backslashes `\` in the path are correctly escaped as `\\`.