Unstorage MCP Server

Unstorage MCP Server

By slow-groovin GitHub

Key-Value storage MCP server based on unjs/unstorage, support drivers: redis, mongodb, filesystem. http

mcp kv-store
Overview

what is unstorage-mcp?

unstorage-mcp is a Key-Value storage MCP server based on unstorage, designed to provide efficient data storage and retrieval.

how to use unstorage-mcp?

To use unstorage-mcp, set up the server by following the installation instructions in the GitHub repository, and then interact with the server using the provided API endpoints for storing and retrieving key-value pairs.

key features of unstorage-mcp?

  • Simple and efficient key-value storage mechanism
  • Easy integration with existing applications
  • Supports various data types for storage

use cases of unstorage-mcp?

  1. Storing user session data in web applications
  2. Caching frequently accessed data for performance optimization
  3. Managing configuration settings for applications

FAQ from unstorage-mcp?

  • What is the license for unstorage-mcp?

unstorage-mcp is licensed under the MIT license, allowing for free use and modification.

  • Is unstorage-mcp suitable for production use?

While unstorage-mcp is in the early stages, it can be used in production environments with caution and thorough testing.

  • How can I contribute to unstorage-mcp?

Contributions are welcome! Please check the GitHub repository for guidelines on how to contribute.

Content

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)



install

{
  "mcpServers": {
    "unstorage": {
      "command": "npx",
      "env": {
        "REDIS_URL": "redis://default:123456@localhost:6379",
        "REDIS_BASE": "my:mcp:values:",
        "REDIS_MOUNT_POINT": "redis_storage"
      },
      "args": ["/y", "@slow-groovin/unstorage-mcp", "--disable-modify"]
    }
  }
}

for Cline+Windows:

{
  "mcpServers": {
    "unstorage": {
      "command": "cmd",
      "env": {
        "REDIS_URL": "redis://default:123456@localhost:6379",
        "REDIS_BASE": "my:mcp:values:",
        "REDIS_MOUNT_POINT": "redis_storage"
      },
      "args": [
        "/c",
        "npx",
        "/y",
        "@slow-groovin/unstorage-mcp",
        "--disable-modify"
      ]
    }
  }
}

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

SyntaxDescriptionDefault ValueOptional
REDIS_URLredis connect url, eg: redis://default:123456@localhost:6379
REDIS_BASEbase of redisDriver
REDIS_MOUNT_POINTmountpoint of this storage"/"

mongodb

if MONGODB_URL is set, a mongodb storage will be mounted

SyntaxDescriptionDefault ValueOptional
MONGODB_URLmongodb connect url, eg: mongodb://user:pass@host:port
MONGODB_DB_NAMEmongodb database name, eg: test
MONGODB_COLLECTION_NAMEmongodb collection name, eg: mycollection
MONGODB_MOUNT_POINTmountpoint of this storage"/"

filesystem

if FS_BASE is set, a redis storage will be mounted

SyntaxDescriptionDefault ValueOptional
FS_BASEbase of fsDriver, path of filesystem
FS_MOUNT_POINTmountpoint of this storage"/"

http server

if HTTP_BASE is set, a http storage will be mounted

SyntaxDescriptionDefault ValueOptional
HTTP_BASEbase of httpDriver, endpoint of http server
HTTP_MOUNT_POINTmountpoint of this storage"/"
HTTP_HEADERSheaders 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

No tools information available.

This is a basic MCP Server-Client Impl using SSE

mcp server-client
View Details

-

mcp model-context-protocol
View Details

Buttplug.io Model Context Protocol (MCP) Server

mcp buttplug
View Details

MCP web search using perplexity without any API KEYS

mcp puppeteer
View Details

free MCP server hosting using vercel

mcp mantle-network
View Details

MCPHubs is a website that showcases projects related to Anthropic's Model Context Protocol (MCP)

mcp mcp-server
View Details