Unstorage

Unstorage

slow-groovin

云存储
访问服务器

README

Unstorage MCP Server

中文 README

A Key-Value storage MCP server based on unjs/unstorage.

Current support drivers:

  1. memory
  2. filesystem
  3. redis
  4. unstorage http server
  5. mongodb

Current tools:

  • showMounts()
  • getItem(key)
  • getItems(items)
  • getItemRaw(key)
  • getMeta(key, nativeOnly)
  • getKeys(base, maxDepth)
  • setItem(key, value)
  • setItems(items)
  • setItemRaw(key, value)
  • setMeta(key, meta)
  • removeItem(key, removeMeta)
  • removeMeta(key)

<br><br>

install

minimal configuration

{
  "mcpServers": {
    "unstorage": {
      "command": "npx",
      "args": ["/y", "@slow-groovin/unstorage-mcp"]
    }
  }
}

maximum configuration

{
  "mcpServers": {
    "unstorage": {
      "command": "npx",
      "env": {
        "REDIS_URL": "redis://default:123456@localhost:6379",
        "REDIS_BASE": "visits:date:api:",
        "REDIS_MOUNT_POINT": "redis_storage",
        "FS_BASE": "D:/tmp",
        "FS_MOUNT_POINT": "fs_storage",
        "HTTP_BASE": "http://localhost:3001",
        "HTTP_MOUNT_POINT": "http_storage",
        "HTTP_HEADERS": "Authorization=Bear 123;A=3;B=4;C=5",
        "MONGODB_URL": "mongodb://root:123456@localhost:27017/",
        "MONGODB_DB_NAME": "test",
        "MONGODB_COLLECTION_NAME": "unstorage",
        "MONGODB_MOUNT_POINT": "mongo_storage"
      },
      "args": ["/y", "@slow-groovin/unstorage-mcp", "--disable-modify"]
    }
  }
}

for Cline+Windows:

{
  "mcpServers": {
    "unstorage": {
      "command": "cmd",
      "args": ["/c", "npx", "/y", "@slow-groovin/unstorage-mcp"]
    }
  }
}

If you have problem of installation on Windows, you can refrer to this article

args

--disable-modify

Default: false

Disable tools with modify functionality like setItem, setItems ...

environment variables

for the concept of base and mountpoint, please refer to the doc of unstorage

redis

if REDIS_URL is set, a redis storage will be mounted

Syntax Description Default Value Optional
REDIS_URL redis connect url, eg: redis://default:123456@localhost:6379
REDIS_BASE base of redisDriver
REDIS_MOUNT_POINT mountpoint of this storage "/"

mongodb

if MONGODB_URL is set, a mongodb storage will be mounted

Syntax Description Default Value Optional
MONGODB_URL mongodb connect url, eg: mongodb://user:pass@host:port
MONGODB_DB_NAME mongodb database name, eg: test
MONGODB_COLLECTION_NAME mongodb collection name, eg: mycollection
MONGODB_MOUNT_POINT mountpoint of this storage "/"

filesystem

if FS_BASE is set, a redis storage will be mounted

Syntax Description Default Value Optional
FS_BASE base of fsDriver, path of filesystem
FS_MOUNT_POINT mountpoint of this storage "/"

http server

if HTTP_BASE is set, a http storage will be mounted

Syntax Description Default Value Optional
HTTP_BASE base of httpDriver, endpoint of http server
HTTP_MOUNT_POINT mountpoint of this storage "/"
HTTP_HEADERS headers for http requests, eg: Authorization=Bear 123;A=1;B=2

memory

If there is no mount on root("/"), a memory driver will be mounted automatically on "/" (same behaviour of unstorage).

extend guide

  1. clone this repo
  2. copy src/storage/redis.ts to a new file and modify it to your desired driver(unjs/unstorage is super easy to learn)
  3. test and verify that it is effective
  4. (optional) pull a merge request

If you are not a typescript developer, please submit a issue to ask for other drivers support.

prompts for cursor/cline assisted programming

@/src/storage/mongodb.ts , please implement this file:
1. you need to fetch information using the storage type's corresponding Doc URL (https://unstorage.unjs.io/drivers/<storage type>).
2. you can refer to examples in @/src/adapter/redis.ts and @/src/storage/http.ts.
3. You are only responsible for generating the code and do not need to perform testing.

If you have not installed fetch MCP server, delete the first sentence

debug approaches

mcp-inspector

 mcp-inspector -e HTTP_BASE=http://localhost:3001 -e HTTP_MOUNT_POINT=http_storage -e FS_BASE=D:/temp -e FS_MOUNT_POINT=fs_storage -e HTTP_HEADERS="Authorization=Bear 123;" tsx ./src/index.ts

tsx mcpServer Config for local dev

{
  "mcpServers": {
    "command": "cmd",
    "env": {
      "REDIS_URL": "redis://default:123456@localhost:6379",
      "REDIS_BASE": "my:mcp:values:",
      "REDIS_MOUNT_POINT": "redis_storage"
    },
    "args": ["/c", "tsx", "D:/xxx/projects/unstorage-mcp/src/index.ts"]
  }
}

restarting server is needed to make changes take effect

推荐服务器

Google Drive MCP Server

Google Drive MCP Server

启用与 Google Drive 的集成,用于列出、读取和搜索文件,支持各种文件类型,并为 Google Workspace 文件提供自动导出功能。

本地
JavaScript
AWS MCP Server

AWS MCP Server

一个模型上下文协议服务器实现,使 Claude 能够通过自然语言命令在 S3 和 DynamoDB 服务上执行 AWS 操作。

本地
Python
Google Drive MCP Server

Google Drive MCP Server

与 Google Drive 集成,以实现文件列表、搜索和读取,以及 Google 表格的读取和写入。

本地
TypeScript
Azure MCP Server

Azure MCP Server

这个服务器实现了模型上下文协议,可以与 Azure Blob 存储和 Cosmos DB 无缝交互,从而实现操作的自动日志记录和审计跟踪。

Python
Box MCP Server

Box MCP Server

Box MCP 服务器方便使用开发者令牌认证在 Box 中搜索和读取 PDF 和 Word 文件。

JavaScript
MCP JSON Document Collection Server

MCP JSON Document Collection Server

一个模型上下文协议服务器,允许创建和管理多个 Fireproof JSON 数据库,具备 CRUD 操作、查询功能以及云同步能力,以便与他人共享数据库。 (Breakdown of the translation:) * **一个模型上下文协议服务器 (Yī gè móxíng shàngxiàwén xiéyì fúwùqì):** A Model Context Protocol server * **允许 (yǔnxǔ):** allows * **创建和管理 (chuàngjiàn hé guǎnlǐ):** creation and management * **多个 (duō gè):** multiple * **Fireproof JSON 数据库 (Fireproof JSON shùjùkù):** Fireproof JSON databases * **具备 (jùbèi):** with, possesses * **CRUD 操作 (CRUD cāozuò):** CRUD operations (Create, Read, Update, Delete) * **查询功能 (cháxún gōngnéng):** querying capabilities * **以及 (yǐjí):** and * **云同步能力 (yún tóngbù nénglì):** cloud synchronization capability * **以便 (yǐbiàn):** in order to * **与他人共享 (yǔ tārén gòngxiǎng):** sharing with others * **数据库 (shùjùkù):** databases

JavaScript
Unstructured Document Processor MCP

Unstructured Document Processor MCP

一个模型上下文协议服务器,它使大型语言模型能够从各种文件格式的非结构化文档中提取和使用内容。

Python
Firebase MCP Server

Firebase MCP Server

一个提供统一接口以与 Firebase 服务(包括身份验证、Firestore 和存储)交互的服务器。

TypeScript
MCP Server for Apache OpenDAL™

MCP Server for Apache OpenDAL™

一个模型上下文协议服务器,通过 Apache OpenDAL™ 提供对包括 S3、Azure Blob 存储和 Google Cloud Storage 在内的多个存储服务的无缝访问。

Python
Cloudinary MCP Server

Cloudinary MCP Server

这个服务器提供了一些工具,可以使用 Claude/Cline 直接将图片和视频上传到 Cloudinary,从而方便资源管理,并提供可定制的选项,例如资源类型和公共 ID。

JavaScript