Skip to content

Conversation

@alhendrickson
Copy link
Collaborator

@alhendrickson alhendrickson commented Dec 4, 2025

What does this do?

image

This enables medcat-service to be used as a MCP Server. Gradio is magically able to serve up the method used by the demo page

This is it running in cursor answering chat messages. Can see in the logs it calling medcat-service:

image

What was changed?

  • The pydoc is the way it reads the description and knows when to use it.
  • Gradio[mcp] dependency, and fixing some pydantic version conflict.
  • Setting a flag to True

How to test it?

Cursor MCP was setup using the following config, which is printed on the gradio /demo page

{
  "mcpServers": {
    "gradio": {
      "url": "http://localhost:8000/demo/gradio_api/mcp/sse"
    }
  }
}

Why do it?

Because gradio promised it was literally a dependency and a boolean flag, it did deliver on that.

We could definitely make this off by default, though I don't think it really uses any resources unless the API is called.

Copy link
Collaborator

@mart-r mart-r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

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.

3 participants