Skip to content

[Bug]: Resources and Prompts not displaying in Admin Dashboard while Tools are visible #716

@umashanker088

Description

@umashanker088

🐞 Bug Summary

I'm unable to see the my Resources and Prompts in MCP admin Dashboard which is presented in our MCP -Server , but we are able to see my all tools in MCP gateway Dashboard so that what is wrong I have implemented ?

Load environment variables
load_dotenv()

MCP Server Created Object

mcp = FastMCP(name="Weather_MCP_Server",version="1.0.0", request_timeout=30000)
setting = Settings(host="127.0.0.1", port=8000)
mcp.settings = setting

MCP tool for Get-City-Coordinates based on the City Name

@mcp.tool(name="Get-City-Coordinates", annotations= {"title":"Get-City-Coordinates","readOnlyHint":True,"readOnlyHint":True})
async def get_city_coordinates(City_Name: str) -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]:
"""Get City Coordinates Details.
Args:
City_Name: city name
Returns:
str: string with current weather data
"""
try:
weatherServices = WeatherServices()
dict = weatherServices.get_city_coordinates(City_Name)
response= f"Latitude : {dict.get("Latitude")} and Longitude {dict.get("Longitude")} for City Name : '{City_Name}'."
return [types.TextContent(type="text", text=str(response))]
except Exception as ex:
# Log the exception or handle it as needed
result = f'''An error occurred while while invoking the get_city_coordinates(): {str(ex)} '''
return [types.TextContent(type="text", text=str(result))]

MCP Resource

@mcp.resource("greeting://{name}")
def get_greeting(name: str) -> str:
"""Get a personalized greeting"""
return f"Hello, {name}!"

@mcp.resource("config://app", name="app-config")
def get_config() -> str:
"""Static configuration data"""
return "App configuration here"

@mcp.resource("users://{user_id}/profile")
def get_user_profile(user_id: str) -> str:
"""Dynamic user data"""
return f"Profile data for user {user_id}"

MCP Prompt

@mcp.prompt(name= "Get-Initial-Prompts")
async def get_initial_prompts() -> list[base.Message]:
return [
base.UserMessage("You are a helpful assistant that can help with weather-related questions."),
base.AssistantMessage("You are a helpful assistant that can help with weather-related questions."),
]


🧩 Affected Component

Select the area of the project impacted:

  • mcpgateway - API
  • mcpgateway - UI (admin panel)
  • mcpgateway.wrapper - stdio wrapper
  • Federation or Transports
  • CLI, Makefiles, or shell scripts
  • Container setup (Docker/Podman/Compose)
  • Other (explain below)

🔁 Steps to Reproduce

  1. ...
  2. ...
  3. ...

🤔 Expected Behavior

List of Prompts and List of Resources of MCP server should be fetch in MCP gateway.

📓 Logs / Error Output

Paste any relevant stack traces or logs here.
⚠️ Do not paste secrets, credentials, or tokens.


🧠 Environment Info

You can retrieve most of this from the /version endpoint.

Key Value
Version or commit e.g. v0.9.0 or main@a1b2c3d
Runtime e.g. Python 3.11, Gunicorn
Platform / OS e.g. Ubuntu 22.04, macOS
Container e.g. Docker, Podman, none

MCP gateway -0.5.0 on Window System.


🧩 Additional Context (optional)

Add any configuration details, flags, or related issues.

Metadata

Metadata

Labels

bugSomething isn't workingtriageIssues / Features awaiting triage

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions