Back to MCP directory
publicPublicdnsLocal runtime

nostr-code-snippet-mcp

一个通过Nostr协议实现代码片段分享的Claude插件项目

article

README

🚀 🤖 代码片段 MCP

代码片段 MCP 可帮助你在Claude中进行特定配置,通过视频演示你能更直观地了解其使用方式。

视频演示

🚀 快速开始

配置Claude

将以下内容添加到你的Claude配置文件中:

{
  "mcpServers": {
    "nostr-code-snippet-mcp": {
      "command": "node",
      "args": ["/Users/<路径>/nostr-code-snippet-mcp/dist/index.js"],
      "env": {
        "NSEC": "<某个nsec值>",
        "RELAYS": "wss://relay.damus.io,wss://relay.snort.social"
      }
    }
  }
}

⚠️ 重要提示

请确保将<路径>替换为你克隆仓库的实际路径。

根据你的操作系统,配置文件的位置如下: | 操作系统 | 配置文件位置 | | ---- | ---- | | macOS | ~/Library/Application Support/Claude/claude_desktop_config.json | | Linux | ~/.config/Claude/claude_desktop_config.json | | Windows | %APPDATA%/Claude/claude_desktop_config.json |

📦 安装指南

安装依赖项

npm install

构建项目

npm run build

运行检查工具

npm run inspect
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client