In this video, you will explore how to access the passive data provided by your MCP server. You will use the Inspector to read both a direct resource and a dynamic resource template.
First, stop your previous tool server if it is still running (using Ctrl+C). Then, run your new resource server script:
uv run --with mcp resources_demo_server.py
Once the server is running on port 8000, switch to your Inspector terminal. If the Inspector is already running, you can simply refresh the browser window. If not, start it again with:
npx @modelcontextprotocol/inspector
In the Inspector interface, ensure you are connected to http://localhost:8000/mcp.
Now, navigate to the Resources tab. You will see two distinct sections here: Resources (for fixed URIs) and Resource Templates (for dynamic URIs).
First, test the direct resource. Locate get_bus_schedule_in_london in the list. Since this is a fixed URI (bus://schedule/london), there are no parameters to enter. Simply click the resource button.
On the right side of the screen, you will see the content returned immediately: “08:00 AM (Regular), 02:00 PM (Regular)”. This mimics an application reading a static file or a specific database row.
Next, test the dynamic resource template. Look for the get_train_schedule item. You will notice it requires an argument because of the {city} parameter in the URI.
In the input field provided, type london.
Click Read Resource.
The Inspector constructs the URI train://schedule/london, sends the request to your Python function, and displays the result. You should see the specific schedule for London: “08:00 AM (Express), 02:00 PM (Regular)”.
This confirms that your resource template is correctly routing requests to your code.