npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@neuctra/r2-files-mcp

v1.0.2

Published

MCP server that gives LLMs, agents and IDEs accurate guidance for r2-files-sdk and the r2-files webhook

Readme

@neuctra/r2-files-mcp

An MCP server that teaches AI coding assistants (Claude Code, Cursor, VS Code Copilot, Windsurf, Codex and others) how to use @neuctra/r2-files-sdk and the r2-files webhook to upload, read, replace, list and delete files in Cloudflare R2.

Without it, assistants tend to invent methods (files.download(), getSignedUrl()), put the API key in browser code, or call the S3 API directly. With it, they look up the real functions, routes, error codes and recipes before writing code.

  • Runs locally over stdio, started on demand by your editor with npx
  • No API key, no account and no network access needed
  • Every tool is read-only

Requires Node.js 20 or newer.

Setup

Add the server to your AI client. They all run the same command:

npx -y @neuctra/r2-files-mcp

Claude Code

claude mcp add r2-files -- npx -y @neuctra/r2-files-mcp

The server is added to the current project only. Add --scope user to use it in every project, or --scope project to save it in .mcp.json and share it with your team.

Cursor, Windsurf, Claude Desktop, Gemini CLI

Add this to the client's MCP config file:

| Client | Config file | | ------ | ----------- | | Cursor | .cursor/mcp.json in your project, or ~/.cursor/mcp.json | | Windsurf | ~/.codeium/windsurf/mcp_config.json | | Claude Desktop | claude_desktop_config.json (Settings → Developer → Edit Config) | | Gemini CLI | ~/.gemini/settings.json |

{
  "mcpServers": {
    "r2-files": {
      "command": "npx",
      "args": ["-y", "@neuctra/r2-files-mcp"]
    }
  }
}

VS Code (Copilot agent mode)

.vscode/mcp.json:

{
  "servers": {
    "r2-files": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@neuctra/r2-files-mcp"]
    }
  }
}

OpenAI Codex CLI

~/.codex/config.toml:

[mcp_servers.r2-files]
command = "npx"
args = ["-y", "@neuctra/r2-files-mcp"]

Windows

Some clients can't start npx directly on Windows. Wrap it in cmd:

{
  "mcpServers": {
    "r2-files": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@neuctra/r2-files-mcp"]
    }
  }
}

Global install (optional)

If you'd rather not go through npx, install it once and use r2-files-mcp as the command, with no args:

npm install -g @neuctra/r2-files-mcp

Updating

npx can keep running a cached older copy. To always start the newest release, use @neuctra/r2-files-mcp@latest in the args.

Tools

| Tool | What it returns | | ---- | --------------- | | get_guideline | Start here: architecture, the API-key model, setup and the rules for writing correct code | | list_sdk_functions | Every SDK function and export, with signatures. Anything not listed doesn't exist | | get_sdk_function | Options, return value, behaviour, errors and examples for one function | | list_http_routes | Auth, response envelope, FileInfo and all routes, for non-JS clients | | get_http_route | Parameters, curl examples and errors for one route (or the multipart protocol) | | get_error_reference | What an error code means and how to fix it; without a code, all codes and a troubleshooting table | | get_config_reference | Worker settings, public vs private reads, local dev, deploy, security checklist and limits | | list_recipes / get_recipe | Next.js, Express, Cloudflare Workers, Python, avatars, private files, galleries, folders, renames | | search_docs | Keyword search across all of the above |

Tell your agent to use it

Clients that support MCP server instructions are told automatically to check these tools before writing code. For other clients, add a line like this to AGENTS.md, CLAUDE.md, .cursor/rules or .github/copilot-instructions.md:

When writing code that uploads, reads, replaces, lists or deletes files with @neuctra/r2-files-sdk or the r2-files webhook,
use the r2-files MCP tools first: get_guideline once, then get_sdk_function for each call. Don't guess method names.

Then ask your assistant something like "Add avatar uploads to my Next.js app with r2-files".

Try it without an AI client

Browse the tools in the MCP Inspector:

npx @modelcontextprotocol/inspector npx -y @neuctra/r2-files-mcp

Related

Development

To work on the server itself:

git clone https://github.com/Taha-Asif-313/cloudflare-r2-opensource.git
cd cloudflare-r2-opensource/mcp
npm install
npm test             # builds dist/index.js, starts it over stdio and checks the docs cover the SDK and webhook

To run your local build, point a client at node /abs/path/to/cloudflare-r2-opensource/mcp/dist/index.js instead of npx.

The content is plain data in src/docs/:

| File | Content | | ---- | ------- | | sdk.ts | One entry per SDK export | | http.ts | Webhook routes and the shared HTTP basics | | reference.ts | Guideline, server config, limits, error codes, troubleshooting | | recipes.ts | Recipes |

When the SDK or webhook changes, update these files and run npm test. It reads sdk/src and webhook/src and fails if a public method, option field, export, error code or route is missing from the server's answers, or if a doc mentions a recipe that doesn't exist. Bump version in package.json before publishing: npm publish runs the typecheck and tests first.

License

MIT