We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/oleksandrsirenko/mcp-simple-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test_streamable_app.pyβ’1.11 KiB
#!/usr/bin/env python3
"""Test script to verify we can get and use FastMCP's streamable_http_app"""
import os
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("Test Server")
@mcp.tool()
def test_tool() -> str:
"""Test tool"""
return "test"
print("π§ͺ Testing FastMCP's streamable_http_app...")
try:
app = mcp.streamable_http_app
print(f"β Got streamable_http_app: {type(app)}")
print(f"App object: {app}")
if app is not None:
print("π SUCCESS: streamable_http_app is available!")
print("This means we can run it with uvicorn directly!")
# Check if it's a proper ASGI app
if hasattr(app, "__call__"):
print("β App is callable (ASGI compatible)")
else:
print("β App is not callable - might not be ASGI")
else:
print("β streamable_http_app is None")
except Exception as e:
print(f"β Error accessing streamable_http_app: {e}")
print(f"\nπ All app-related attributes:")
for attr in dir(mcp):
if "app" in attr.lower():
value = getattr(mcp, attr)
print(f" {attr}: {type(value)} = {value}")