mcp server opendal

Local 2025-08-31 23:15:16 0

A Model Context Protocol server that provides seamless access to multiple storage services including S3, Azure Blob Storage, and Google Cloud Storage through Apache OpenDAL™.


A Model Context Protocol (MCP) server implementation that provides access to various storage services via Apache OpenDAL™.

PyPI - Version PyPI - Python Version Lint and Test

Features

  • Seamless access to multiple storage services including S3, Azure Blob Storage, Google Cloud Storage, and more
  • List files and directories from storage services
  • Read file contents with automatic text/binary detection
  • Environment variable based configuration

Installation

pip install mcp-server-opendal

Usage

Configure storage services by setting environment variables. Each service requires a prefix and specific configuration options.

For example, to configure an S3 service with alias "mys3":

OPENDAL_MYS3_TYPE=s3
OPENDAL_MYS3_BUCKET=mybucket
OPENDAL_MYS3_REGION=us-east-1
OPENDAL_MYS3_ENDPOINT=http://localhost:9000
OPENDAL_MYS3_ACCESS_KEY_ID=myaccesskey
OPENDAL_MYS3_SECRET_ACCESS_KEY=mysecretkey

Then you can use tool like read and list with mys3://path/to/file.

mcp-server-opendal will also load from .env.

Development

npx @modelcontextprotocol/inspector n  uv run mcp-server-opendal
[
  {
    "description": "n    List files in OpenDAL servicenn    Args:n        uri: resource URI, e.g. mys3://path/to/dirnn    Returns:n        String containing directory contentn    ",
    "inputSchema": {
      "properties": {
        "uri": {
          "title": "Uri",
          "type": "string"
        }
      },
      "required": [
        "uri"
      ],
      "title": "listArguments",
      "type": "object"
    },
    "name": "list"
  },
  {
    "description": "n    Read file content from OpenDAL servicenn    Args:n        uri: resource URI, e.g. mys3://path/to/filenn    Returns:n        File content or error informationn    ",
    "inputSchema": {
      "properties": {
        "uri": {
          "title": "Uri",
          "type": "string"
        }
      },
      "required": [
        "uri"
      ],
      "title": "readArguments",
      "type": "object"
    },
    "name": "read"
  },
  {
    "description": "n    Get metadata of file in OpenDAL servicenn    Args:n        uri: resource URI, e.g. mys3://path/to/filenn    Returns:n        File metadata informationn    ",
    "inputSchema": {
      "properties": {
        "uri": {
          "title": "Uri",
          "type": "string"
        }
      },
      "required": [
        "uri"
      ],
      "title": "get_infoArguments",
      "type": "object"
    },
    "name": "get_info"
  }
]