Skip to main content
Glama
heresun

OrbStack MCP Server

by heresun

orbstack_compose_ps

Check the running status of services in a Docker Compose project by specifying the project directory path.

Instructions

查看 Docker Compose 项目中各服务的运行状态。

Args: params: 包含项目目录

Returns: str: 服务状态列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The handler function `orbstack_compose_ps` executes the `docker compose ps` command.
    async def orbstack_compose_ps(params: DockerComposeInput) -> str:
        """查看 Docker Compose 项目中各服务的运行状态。
    
        Args:
            params: 包含项目目录
    
        Returns:
            str: 服务状态列表
        """
        args = ["compose", "-f", f"{params.project_dir}/docker-compose.yml", "ps"]
    
        code, stdout, stderr = await _run_docker(args)
        if code != 0:
            return _format_error(stderr)
        return f"Compose 服务状态:\n{stdout}" if stdout else "没有运行中的 Compose 服务"
  • Tool registration for `orbstack_compose_ps` using the `@mcp.tool` decorator.
    @mcp.tool(
        name="orbstack_compose_ps",
        annotations={
            "title": "查看 Compose 服务状态",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": 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/heresun/orbstack-mcp'

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