Metadata-Version: 2.4
Name: iflow-mcp_xuanwo-mcp-server-opendal
Version: 0.1.0
Summary: A Model Context Protocol server providing tools to access storage services for usage by LLMs
License: Apache-2.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=1.0.0
Requires-Dist: opendal<0.46.0,>=0.45.16
Requires-Dist: python-dotenv>=1.0.1
Dynamic: license-file

# Model Context Protocol Server for Apache OpenDAL™
A Model Context Protocol (MCP) server implementation that provides access to various storage services via [Apache OpenDAL™](https://opendal.apache.org/).

[![PyPI - Version](https://img.shields.io/pypi/v/mcp-server-opendal)](https://pypi.org/project/mcp-server-opendal/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mcp-server-opendal)](https://pypi.org/project/mcp-server-opendal/)
[![Lint and Test](https://github.com/Xuanwo/mcp-server-opendal/actions/workflows/test.yml/badge.svg)](https://github.com/Xuanwo/mcp-server-opendal/actions/workflows/test.yml)

## 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

```shell
pip install mcp-server-opendal
```

## Usage with Claude Desktop

Add the following to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "opendal": {
      "command": "uvx",
      "args": [
        "mcp-server-opendal"
      ],
      "env": {
        "YOUR_ENV_VAR": "YOUR_ENV_VALUE"
      }
    }
  }
}
```

It requires `uv` to be installed on your machine. Check the [official documentation](https://docs.astral.sh/uv/getting-started/installation/) for installation guides.

## Environment variables

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

```shell
npx @modelcontextprotocol/inspector \
  uv run mcp-server-opendal
```
