Skip to content

Not able to load the widget html with MCP server in python, checked with MCP inspector #127

@Sateesh-karagana

Description

@Sateesh-karagana

I have aMCP server running in python
The server is running fine and i could test it with MCP inspector as suggested in the below doc

able to run the python server
I could see the resources and tools in the MCP inspector locally with the below
npx @modelcontextprotocol/inspector
I couldn't load the widget
Not sure if i am doing something wrong or something is missing, Could someone please help me out here to fix the issue.
I have aMCP server running in python
The server is running fine and i could test it with MCP inspector as suggested in the below doc

https://developers.openai.com/apps-sdk/quickstart
https://developers.openai.com/apps-sdk/build/mcp-server#structure-the-data-your-tool-returns
able to run the python server
I could see the resources and tools in the MCP inspector locally with the below
npx @modelcontextprotocol/inspector
I couldn't load the widget
Not sure if i am doing something wrong or something is missing, Could someone please help me out here to fix the issue.


The repo link is here and the steps to produce what i am trying to do
https://github.com/ecociel/mcp-app-python

Need to have these installation version

  • Python 3.13.2
  • fastmcp 2.13.1
  • mcp 1.21.2

Run the server, it show something like below screenshot

  • python server.py
Image

Run the MCP inspector in another terminal

  • npx @modelcontextprotocol/inspector

Go to the MCP inspector opened in the browser and click on tools, you can see something like below screenshot

  • click on tools
  • click on get_info tool below
  • In the topic (right side), enter some string(oranges)
  • click on Run Tool

it show you "Success" and the structured content but the widget (html i have provided in the repo) is not getting loaded.

Image

When i try to load the widget like below, getting 404 Not found
curl "http://localhost:8000/mcp/resource/ui%3A//widget/info-widget.html"

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions