-
Notifications
You must be signed in to change notification settings - Fork 379
Description
🐞 Bug Summary
Briefly describe the issue or unexpected behavior.
I have an MCP server which has a couple of MCP resources, which is not getting listed under resources tab in 0.8.0 version. Tools and Prompts are getting listed.
Below is the Code snippet to test.
from fastmcp import FastMCP
import query_watsonx_service as watsonx_service
import mcp_util as util
import system_prompt_v1
Initialize MCP server
try:
mcp = FastMCP("milvus-vector", host="0.0.0.0")
print("[INFO] FastMCP server initialized successfully.")
except Exception as e:
print(f"[ERROR] Failed to initialize FastMCP server: {e}")
# Consider raising an exception or exiting if initialization fails
raise
@mcp.resource("vector-db://Helper_Agent_v1.0.0/{query}", name="Helper_Agent_v1.0.0")
def v1_query(query: str) -> str:
"""Ask questions."""
try:
print(
f"[INFO] Received request with query: {query}")
return "return something here....!!!!"
except Exception as e:
print(
f"[ERROR] An unexpected error occurred in visf_policy_v1_query: {e}")
return "An unexpected error occurred while processing your request."
Run server
if name == "main":
try:
print(
"[INFO] Starting MCP server on 0.0.0.0:8080 with streamable-http transport...")
mcp.run(transport="streamable-http", port=8080)
except Exception as e:
print(f"[CRITICAL] Failed to start MCP server: {e}")
exit(1)
Thanks,
Sunish
🧩 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
- ...
- ...
- ...
🤔 Expected Behavior
What should have happened instead?
📓 Logs / Error Output
Paste any relevant stack traces or logs here.
🧠 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 |
🧩 Additional Context (optional)
Add any configuration details, flags, or related issues.