Skip to main content
Glama
base.py753 B
"""Base class for resource modules in the MCP system.""" from abc import ABC, abstractmethod import structlog from fastmcp import FastMCP from ceph_mcp.models.base import MCPResponse class ResourceModule(ABC): """Base class for resource modules in the MCP system.""" def __init__(self, mcp: FastMCP, name: str): self.mcp = mcp self.name = name self.logger = structlog.get_logger(f"resources.{name}") # Register resources when created self.register_resources() @abstractmethod def register_resources(self) -> None: """Register resources with FastMCP.""" @abstractmethod def format_response(self, response: MCPResponse) -> str: """Format response for this module."""

Latest Blog Posts

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/rajmohanram/ceph-mcp-server'

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