Skip to main content
Glama

Model Context Provider (MCP) Server

by Mark850409
handle_command.py992 B
import logging from mcpcli.messages.send_ping import send_ping from mcpcli.messages.send_tools_list import send_tools_list from mcpcli.messages.send_resources import send_resources_list from mcpcli.messages.send_prompts import send_prompts_list async def handle_command(command: str): """處理命令行指令""" try: if command == "ping": logging.info("執行 ping 命令") return True elif command == "list-tools": logging.info("執行 list-tools 命令") return True elif command == "list-resources": logging.info("執行 list-resources 命令") return True elif command == "list-prompts": logging.info("執行 list-prompts 命令") return True else: logging.warning(f"未知命令: {command}") return False except Exception as e: logging.error(f"執行命令時發生錯誤: {str(e)}") return False

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/Mark850409/20250223_mcp-client'

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