Skip to main content
Glama
r3-yamauchi

MCP Configuration Editor

by r3-yamauchi

get_server

Retrieve configuration settings for a specific MCP server to view or manage its setup details within the MCP Configuration Editor.

Instructions

特定のMCPサーバーの設定を取得する。

Args:
    name: 取得するサーバーの名前

Returns:
    Dict[str, Any]: サーバーの設定情報、またはエラー情報

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The main handler function for the 'get_server' tool. It loads the MCP configuration, checks if the server exists, and returns its configuration or an error with available servers.
    @mcp.tool(name="get_server")
    async def get_server(name: str) -> Dict[str, Any]:
        """特定のMCPサーバーの設定を取得する。
    
        Args:
            name: 取得するサーバーの名前
    
        Returns:
            Dict[str, Any]: サーバーの設定情報、またはエラー情報
        """
        config = load_config()
    
        if name not in config.mcpServers:
            # サーバーが見つからない場合はエラーと利用可能なサーバーリストを返す
            logger.warning(f"Attempted to get non-existent server: {name}")
            return {"error": f"Server '{name}' not found", "available_servers": list(config.mcpServers.keys())}
    
        # サーバー情報を返す
        server = config.mcpServers[name]
        logger.debug(f"Retrieved server configuration for: {name}")
        return {"name": name, "command": server.command, "args": server.args, "env": server.env}

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/r3-yamauchi/mcp-conf-mcp-server'

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