- Home
- MCP servers
- Nostr Code Snippet
Nostr Code Snippet
- javascript
2
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"nodetec-nostr-code-snippet-mcp": {
"command": "node",
"args": [
"/Users/<path to>/nostr-code-snippet-mcp/dist/index.js"
],
"env": {
"NSEC": "<some nsec>",
"RELAYS": "wss://relay.damus.io,wss://relay.snort.social"
}
}
}
}You deploy a local MCP server that runs a Node.js entrypoint and exposes control to Claude via a dedicated interprocess configuration. This server lets you connect your MCP client to a self-hosted nostr code snippet processor, using environment-driven configuration for identity and relay endpoints.
How to use
To run the nostr code snippet MCP locally and connect to it from your MCP client, start the server as described in the configuration below. The server executes a Node.js entry script and reads two environment variables to configure access keys and relay endpoints.
Configuration example for your client
{
"mcpServers": {
"nostr_snippet_mcp": {
"command": "node",
"args": ["/Users/<path to>/nostr-code-snippet-mcp/dist/index.js"],
"env": {
"NSEC": "<some nsec>",
"RELAYS": "wss://relay.damus.io,wss://relay.snort.social"
}
}
}
}
How to install
Prerequisites: ensure Node.js is installed on your machine. You will also need npm to install dependencies and build the project.
-
Check Node.js and npm versions to confirm installation.
-
Install dependencies.
-
Build the project.
-
Run the inspector (optional) to debug or inspect the MCP server.
Notes and configuration details
OS-specific configuration file location for Claude is shown below. You will place the MCP configuration there so Claude can discover and start the server when it launches.
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Security and environment configuration
The MCP server relies on environment variables to configure access and relay endpoints.
NSEC provides a secret used by the server for authentication or signing operations. RELAYS defines the WebSocket endpoints the server should connect to for real-time data.