lego-obs-mcp 0.1.0

MCP server for managing configuration files on OBS (Object Storage Service)
lego-obs-mcp-0.1.0 is not a library.

lego-obs-mcp

MCP server for managing configuration files on OBS (Object Storage Service).

Installation

From crates.io

cargo install lego-obs-mcp

From source

cargo build --release

Binary output: target/release/lego-obs-mcp

Configuration

All settings are controlled via environment variables:

Variable Required Description
LEGO_OBS_ACCESS_KEY Yes OBS access key
LEGO_OBS_SECRET_KEY Yes OBS secret key
LEGO_OBS_BUCKET Yes OBS bucket name
LEGO_OBS_ENDPOINT Yes OBS endpoint URL
LEGO_OBS_REGION Yes OBS region

Integration with AI Agents

OpenCode

Add to opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "lego-obs": {
      "type": "local",
      "command": ["lego-obs-mcp"],
      "enabled": true,
      "environment": {
        "LEGO_OBS_ACCESS_KEY": "your-access-key",
        "LEGO_OBS_SECRET_KEY": "your-secret-key",
        "LEGO_OBS_BUCKET": "your-bucket-name",
        "LEGO_OBS_ENDPOINT": "https://obs.cn-east-3.myhuaweicloud.com",
        "LEGO_OBS_REGION": "cn-east-3"
      }
    }
  }
}

Claude Code

Add to .mcp.json in the project root:

{
  "mcpServers": {
    "lego-obs": {
      "command": "lego-obs-mcp",
      "env": {
        "LEGO_OBS_ACCESS_KEY": "your-access-key",
        "LEGO_OBS_SECRET_KEY": "your-secret-key",
        "LEGO_OBS_BUCKET": "your-bucket-name",
        "LEGO_OBS_ENDPOINT": "https://obs.cn-east-3.myhuaweicloud.com",
        "LEGO_OBS_REGION": "cn-east-3"
      }
    }
  }
}

Or via CLI:

claude mcp add lego-obs -- \
  env LEGO_OBS_ACCESS_KEY=your-key \
  env LEGO_OBS_SECRET_KEY=your-secret \
  env LEGO_OBS_BUCKET=your-bucket \
  env LEGO_OBS_ENDPOINT=https://obs.cn-east-3.myhuaweicloud.com \
  env LEGO_OBS_REGION=cn-east-3 \
  lego-obs-mcp

Trae

Add to .trae/mcp.json in the project root:

{
  "mcpServers": {
    "lego-obs": {
      "command": "lego-obs-mcp",
      "env": {
        "LEGO_OBS_ACCESS_KEY": "your-access-key",
        "LEGO_OBS_SECRET_KEY": "your-secret-key",
        "LEGO_OBS_BUCKET": "your-bucket-name",
        "LEGO_OBS_ENDPOINT": "https://obs.cn-east-3.myhuaweicloud.com",
        "LEGO_OBS_REGION": "cn-east-3"
      }
    }
  }
}

OpenClaw

Add to openclaw.json:

{
  "mcp": {
    "lego-obs": {
      "type": "stdio",
      "command": "lego-obs-mcp",
      "env": {
        "LEGO_OBS_ACCESS_KEY": "your-access-key",
        "LEGO_OBS_SECRET_KEY": "your-secret-key",
        "LEGO_OBS_BUCKET": "your-bucket-name",
        "LEGO_OBS_ENDPOINT": "https://obs.cn-east-3.myhuaweicloud.com",
        "LEGO_OBS_REGION": "cn-east-3"
      }
    }
  }
}

Cursor

Open Settings → Features → MCP Servers, add a new server:

{
  "lego-obs": {
    "command": "lego-obs-mcp",
    "env": {
      "LEGO_OBS_ACCESS_KEY": "your-access-key",
      "LEGO_OBS_SECRET_KEY": "your-secret-key",
      "LEGO_OBS_BUCKET": "your-bucket-name",
      "LEGO_OBS_ENDPOINT": "https://obs.cn-east-3.myhuaweicloud.com",
      "LEGO_OBS_REGION": "cn-east-3"
    }
  }
}

Windsurf

Add to .windsurf/mcp.json:

{
  "mcpServers": {
    "lego-obs": {
      "command": "lego-obs-mcp",
      "env": {
        "LEGO_OBS_ACCESS_KEY": "your-access-key",
        "LEGO_OBS_SECRET_KEY": "your-secret-key",
        "LEGO_OBS_BUCKET": "your-bucket-name",
        "LEGO_OBS_ENDPOINT": "https://obs.cn-east-3.myhuaweicloud.com",
        "LEGO_OBS_REGION": "cn-east-3"
      }
    }
  }
}

Using Environment Variables Directly

Instead of hardcoding credentials in config files, you can set them in your shell profile (~/.bashrc, ~/.zshrc, etc.):

export LEGO_OBS_ACCESS_KEY="your-access-key"
export LEGO_OBS_SECRET_KEY="your-secret-key"
export LEGO_OBS_BUCKET="your-bucket-name"
export LEGO_OBS_ENDPOINT="https://obs.cn-east-3.myhuaweicloud.com"
export LEGO_OBS_REGION="cn-east-3"

Then the MCP configuration only needs the command:

{
  "mcpServers": {
    "lego-obs": {
      "command": "lego-obs-mcp"
    }
  }
}

Available Tools

Tool Description
list_objects List objects in the OBS bucket with optional prefix filter
read_object Read the full content of a specified object
put_object Upload or update an object
delete_object Delete a specified object

License

MIT