Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added FastAPI server to handle file conversion to markdown #1111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dev-myk
Copy link

@dev-myk dev-myk commented Mar 10, 2025

This PR introduces a FastAPI server that allows users to upload a file, which is then converted to Markdown using the Markitdown library.

What I Added:

  • A new server.py file implementing a FastAPI-based API.
  • A /convert endpoint that accepts file uploads and returns the Markdown conversion result.
  • Integration of the Markitdown library to process file contents.

How It Works:

  • Users send a POST request to /convert with a file as input.
  • The server reads the file content and passes it to Markitdown for conversion.
  • The API returns a JSON response containing the Markdown text.

@afourney
Copy link
Member

Thanks. I've been thinking about something like this -- especially for MCP use. But I've not yet decided how to proceed. I think I might advocate for a separate package. Let me think about this a little.

@afourney
Copy link
Member

There's now an mcp server

A more general FastAPI server would also be useful, perhaps. But I think I would recommend hosting that as a separate repo/project similar to how plugins are handled currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants