Skip to main content
Glama

MCP Template

status.py832 B
""" Example status resource implementation. """ import json from datetime import datetime from typing import Any import mcp.types as types async def status_resource_handler(uri: str) -> str: """ Example resource that returns server status. Args: uri: Resource URI Returns: JSON string containing server status """ status = { "status": "running", "timestamp": datetime.utcnow().isoformat(), "uptime": "unknown", # Could be calculated from start time "health": "healthy", } return json.dumps(status, indent=2) # Resource schema definition STATUS_RESOURCE_SCHEMA = types.Resource( uri="status://example_status", name="Server Status", description="Get current server status and health information", mimeType="application/json", )

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/riteshsonawala/mcp-template'

If you have feedback or need assistance with the MCP directory API, please join our Discord server