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

jsonbin-mcp-server

v1.1.0

Published

MCP server for JSONBin.io: Bins CRUD, Collections, Schema Docs Validation

Readme

JSONBin MCP Server

一个基于Model Context Protocol (MCP)的JSONBin.io数据管理服务器,支持通过AI对话进行完整的CRUD操作。

License: MIT Node.js

功能特性

  • ✅ 完整CRUD操作 - 创建、读取、更新、删除JSONBin数据
  • ✅ Collections API - 创建、管理Collection,分组Bin
  • ✅ Schema Docs API - 创建Schema Doc,为Collection附加校验(需Pro)
  • ✅ Token管理 - 安全的API密钥配置
  • ✅ 元数据管理 - 更新Bin名称和隐私设置
  • ✅ AI友好 - 通过自然语言对话操作数据

可用工具

Bins

| 工具 | 描述 | 参数 | |------|------|------| | setToken | 设置JSONBin.io的Master Key | token (必需) | | listBins | 获取所有Bins列表 | 无 | | createBin | 创建新Bin | data (必需), name, isPrivate, collectionId | | getBin | 获取指定Bin的数据 | binId (必需) | | updateBin | 更新Bin数据 | binId, data (必需) | | updateBinName | 更新Bin名称 | binId, name (必需) | | deleteBin | 删除Bin | binId (必需) | | updateBinPrivacy | 更新Bin隐私状态 | binId, isPrivate (必需) |

Collections

| 工具 | 描述 | 参数 | |------|------|------| | createCollection | 创建Collection | name (必需) | | listCollections | 获取所有Collections | 无 | | fetchCollectionBins | 获取Collection下的Bins(分页) | collectionId (必需), lastBinId, sortOrder | | addSchemaToCollection | 为Collection附加Schema Doc | collectionId, schemaDocId (必需) | | removeSchemaFromCollection | 从Collection移除Schema Doc | collectionId (必需) |

Schema Docs

| 工具 | 描述 | 参数 | |------|------|------| | createSchemaDoc | 创建Schema Doc | schema, name (必需) | | readSchemaDoc | 读取Schema Doc | schemaDocId (必需) | | updateSchemaDoc | 更新Schema Doc内容 | schemaDocId, schema (必需) |

安装

方式1:本地开发

# 克隆或下载项目
cd jsonbin-mcp-server

# 安装依赖
npm install

方式2:全局安装(可选)

npm install -g jsonbin-mcp-server

配置

在Cursor中配置

  1. 打开Cursor设置
  2. 找到MCP服务器配置部分
  3. 添加以下配置:

本地路径方式:

{
  "mcpServers": {
    "jsonbin-mcp-server": {
      "command": "node",
      "args": ["/path/to/jsonbin-mcp-server/index.js"],
      "env": {
        "JSONBIN_TOKEN": ""
      }
    }
  }
}

全局安装方式:

{
  "mcpServers": {
    "jsonbin-mcp-server": {
      "command": "npx",
      "args": ["jsonbin-mcp-server"],
      "env": {
        "JSONBIN_TOKEN": ""
      }
    }
  }
}

获取JSONBin Token

  1. 访问 JSONBin.io
  2. 登录或注册账户
  3. 进入 API Keys 页面
  4. 复制你的Master Key
  5. 在配置中设置JSONBIN_TOKEN环境变量,或通过setToken工具设置

使用示例

配置完成后,在Cursor中可以通过自然语言与AI对话来操作JSONBin:

设置Token

帮我设置jsonbin token为$2a$10$xxxxx

创建Bin

创建一个名为user-data的bin,内容是:
{
  "name": "张三",
  "age": 25,
  "email": "[email protected]"
}

查询Bins

列出我所有的bins

读取数据

获取bin id为 65f1a2b3c4d5e6f7g8h9i0j1 的数据

更新数据

更新bin 65f1a2b3c4d5e6f7g8h9i0j1 的数据,把年龄改为26

删除Bin

删除bin 65f1a2b3c4d5e6f7g8h9i0j1

使用Collections

创建一个名为users的Collection
列出我所有的Collections
获取Collection xxx下的所有bins

使用Schema校验(需Pro)

创建一个名为UserSchema的Schema Doc,规则是 {"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}
把Schema Doc附加到Collection xxx

系统要求

  • Node.js >= 18.0.0
  • npm >= 7.0.0
  • JSONBin.io账户和API Token

项目结构

src/
├── api/           # API封装
│   ├── bins.js        # Bins API
│   ├── collections.js # Collections API
│   └── schema.js      # Schema Docs API
├── handlers/      # 工具处理器
│   ├── bins.js
│   ├── collections.js
│   ├── schema.js
│   └── tools.js   # 路由聚合
├── schemas/       # MCP工具定义
│   ├── bins.js
│   ├── collections.js
│   ├── schema.js
│   └── tools.js   # 合并导出
└── config.js

开发

# 启动服务器
npm start

# 或直接运行
node index.js

故障排除

Token错误

确保已正确设置Token:

  • 环境变量方式:在配置文件的env.JSONBIN_TOKEN中设置
  • 运行时方式:通过setToken工具设置

权限错误

确保Token是Master Key类型,而不是Access Key

Bin名称错误

JSONBin.io只支持ASCII字符作为Bin名称,不支持中文等特殊字符

Schema相关错误

创建Schema Doc、为Collection附加Schema需Pro计划,Free Trial用户仅可创建1个Collection

技术栈

许可证

MIT License

相关项目

贡献

欢迎提交Issue和Pull Request!

支持

如有问题或建议,请提交Issue或联系作者。