Join us and get access to thousands of tutorials and a community of expert Pythonistas.
This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.
Connecting LLMs With MarkItDown's MCP Server
00:00 Now you know how to use MarkItDown’s Python library, but what if you just want to use it while you’re chatting with your LLM? Good news is, MarkItDown has a dedicated MCP server that you can connect to.
00:13
In this lesson, you’ll specifically focus on adding this MCP to your Claude Desktop. Go ahead and install markitdown-mcp in your working directory, and after that, you need to open up your claude_desktop_config.json and add these lines to the beginning of your file.
00:32
You also need to find the exact path markitdown-mcp is installed in. Just pay attention that after you add in these lines, you need to restart Claude Desktop to be able to use your new MCP.
00:45
You can go ahead and double-check whether you have successfully added markitdown-mcp by checking the Connectors section in the settings of your Claude Desktop.
00:55
As you can see here, it is added to Claude Desktop. You need to locate your claude_desktop_config.json file, click on Developer, and then find Edit Config and click on it.
01:09
This will take you to your file, claude_desktop_config.json. After you paste your MCP server’s details, your config file should look similar to this file right here.
01:23
Make sure you paste the absolute path to where you have markitdown-mcp installed. If you want to learn more about these steps, you can always check out the tutorial this video course is based on.
01:35 Just pay attention that after you add in the lines inside of your Claude JSON, you need to restart Claude Desktop to be able to use your new MCP. You can start a new chat and test it out.
01:48 Again, you need to pay attention to the fact that this MCP is running locally, so you need to reference the full path to the file you want to convert in your prompt.
01:57
You can’t just drop in your file in Claude’s sandbox. In that case, the MCP wouldn’t have access to it. You’ll be converting the markdown_syntax.pdf file that you have in the materials of this course into an MD file.
02:13 Here’s how it looks. You have headings, you have lists, you have links, you have code, and you have tables. Okay, back to Claude. Here is my prompt.
02:27
Convert a PDF to Markdown using the markitdown-mcp server, and then the full path to that PDF.
02:39 And here you go. You have the headings, you have the lists, you have the links, you have the function, you have the code, and then you have the table as well.
02:51 You converted a PDF file into Markdown using MarkItDown’s MCP. It’s done an okay job, but a lot of the structure has been lost. This can happen with PDF files.
03:02 You’ll learn about the limitations of MarkItDown and what to do about them later on. Now, you have a few images in your directory. You might be wondering what they’re for.
03:12 You can also use MarkItDown to describe an image and put that description into an MD file so you can feed it to an LLM. You’ll learn how to do that in the next lesson.
Become a Member to join the conversation.