mcp
v0.1.2An MCP server that lets agents manage Shelby buckets
An MCP server that lets agents manage Shelby buckets and read and write their objects. It authenticates with an agent key, which you can limit to an organization, some projects, or specific buckets, and make read-only. 1. Go to https://console.shelby.xyz/ and open Integrations. 2. Create an agent key. Choose what it can reach (the organization, some projects, or specific buckets), whether it's read-only, and when it expires (30, 60, 90 or 180 days). 3. Copy the key. It's shown once.
Summary extracted from the README.
Shelby MCP
An MCP server that lets agents manage Shelby buckets and read and write their objects. It authenticates with an agent key, which you can limit to an organization, some projects, or specific buckets, and make read-only.
Requirements
- Node.js
>= 22.12.0(see.nvmrc) - A Shelby agent key
Get an agent key
- Go to https://console.shelby.xyz/ and open Integrations.
- Create an agent key. Choose what it can reach (the organization, some projects, or specific buckets), whether it's read-only, and when it expires (30, 60, 90 or 180 days).
- Copy the key. It's shown once.
In the last 7 days before the key expires, every tool result carries a second text block warning about it, so the agent can tell you to create a new key and update SHELBY_AGENT_KEY.
Give the key the least it needs. A key limited to specific buckets can read and write those buckets but can't create new ones.
Setup
npm install
npm run build
The server reads the key from, in order:
SHELBY_AGENT_KEYin the environment, or in a.envfile in this directory (.envis gitignored).SHELBY_BOT_KEY, the older name.- The OS keychain, under service
shelby-mcpand accountSHELBY_AGENT_KEY:- macOS:
security add-generic-password -s shelby-mcp -a SHELBY_AGENT_KEY -w - Linux (libsecret):
secret-tool store --label "Shelby agent key" service shelby-mcp account SHELBY_AGENT_KEY
- macOS:
Uploads read and downloads write only inside the allowed directories. Pass --allow-dir <dir>, with more directories after it or repeated; without it, only the directory the server starts in is allowed. Paths are checked after resolving symlinks, so neither .. nor a link can reach outside.
SHELBY_ENV selects the backend. It defaults to beta; staging points at staging. SHELBY_ADMIN_URL, SHELBY_S3_ADMIN_URL and SHELBY_S3_ENDPOINT override single endpoints.
Use with Cursor
Add this to your user-level ~/.cursor/mcp.json, and set SHELBY_AGENT_KEY in your shell profile or keychain rather than in the file:
{
"mcpServers": {
"shelby": {
"command": "node",
"args": [
"<path-to-shelby-mcp>/dist/server.js",
"--allow-dir",
"<directory-with-your-files>"
],
"env": {
"SHELBY_AGENT_KEY": "${env:SHELBY_AGENT_KEY}"
}
}
}
}
Don't put the key itself in a project-level .cursor/mcp.json or .mcp.json; those are easy to commit.
The server uses stdio. Restart the MCP client after changing the config.
Use with Claude Desktop
npm run bundle builds two MCP bundles: build/shelby.mcpb for beta and build/shelby-staging.mcpb for staging. Open one to install it in Claude Desktop, which asks for the agent key (masked and stored securely) and the allowed directories.
Tools
Tools take bucket and project names. The project is only needed when two reachable buckets share a name.
| Tool | What it does |
|---|---|
get_shelby_agent_key_info |
The key's name, expiry, permission, what it reaches, and the allowed directories. Never the key itself |
list_shelby_buckets |
Buckets the key reaches, with each one's S3 bucket name and account address, and where new buckets can be created |
get_shelby_bucket |
One bucket by name |
create_shelby_bucket |
Create a bucket and the managed account that owns its data |
rename_shelby_bucket |
Rename a bucket's display name. Its S3 bucket name and account address do not change |
delete_shelby_bucket |
Delete a bucket. This cannot be undone |
list_shelby_objects |
List objects, optionally under a prefix, a page at a time |
upload_shelby_object |
Upload a local file, streamed, with a multipart upload above 16 MiB |
download_shelby_object |
Download an object to a local file. Won't replace an existing file unless asked |
get_shelby_s3_connection_guide |
Sample code (boto3, AWS SDK v3, AWS CLI) for S3 clients |
get_mcp_version |
Return this server's version |
A bucket's name is also its S3 bucket name, so it must be 3–32 characters of lowercase letters, numbers, and dashes, start and end with a letter or number, and contain at least one letter. It also can't look like an account address (0x followed by hex) or use an AWS-reserved prefix or suffix, and health, ready, metrics and internal are reserved. API key names and renamed display names must be 3–32 characters: lowercase letters, numbers, dashes, and underscores.
S3 clients use the bucket's s3_bucket: the name it was created with, or its account_address for older buckets whose names aren't valid S3 bucket names. The account address always works too. Renaming a bucket only changes its display name, so S3 clients keep using the original s3_bucket.
Unscoped bot keys
Bot keys created before agent keys aren't limited to anything. They still work for managing buckets: create_shelby_bucket then also creates an API key, the bucket's S3 credential, and list_shelby_buckets returns API keys. They can't use the object tools; use an agent key for those.
Scripts
| Script | What it does |
|---|---|
npm run build |
Compile TypeScript to dist/ |
npm start |
Build and run the server |
npm run dev |
Build and run the FastMCP dev inspector |
npm test |
Build, then run the unit and smoke tests |
npm run lint |
Biome and tsc --noEmit |
npm run format |
Format with Biome |
npm run bundle |
Build the Claude Desktop bundles in build/ |