Nostr MCP Server logo

Nostr MCP Server

by AustinKelsay

The Nostr MCP Server provides Nostr capabilities to LLMs like Claude. It implements tools for interacting with the Nostr network, enabling LLMs to fetch user profiles, notes, zaps, search NIPs, and even send anonymous zaps.

View on GitHub

Last updated: N/A

What is Nostr MCP Server?

The Nostr MCP Server is a Model Context Protocol server that allows Large Language Models (LLMs) like Claude and Cursor to interact with the Nostr network. It acts as a bridge, providing LLMs with tools to access and utilize Nostr data.

How to use Nostr MCP Server?

To use the server, you need to install it, configure your LLM (Claude or Cursor) to connect to it, and then issue commands to the LLM that utilize the Nostr tools. The README provides detailed instructions for installation and configuration for both Claude and Cursor. Once configured, you can ask the LLM to perform actions like fetching profiles, notes, or zaps from the Nostr network.

Key features of Nostr MCP Server

  • Fetches user profile information

  • Retrieves text notes and long-form content

  • Fetches sent and received zaps with detailed payment information

  • Searches Nostr Implementation Possibilities (NIPs) with relevance scoring

  • Prepares anonymous zaps with lightning invoice generation

  • Supports both hex public keys and npub format

  • Allows specifying custom relays for queries

  • Offers advanced usage options like specifying the number of notes to fetch and enabling validation/debugging for zap queries

Use cases of Nostr MCP Server

  • Allowing LLMs to access and analyze user profiles and content on Nostr

  • Enabling LLMs to retrieve and process zap data for financial analysis or social insights

  • Providing LLMs with the ability to search and understand Nostr Improvement Proposals (NIPs)

  • Giving LLMs the capability to send anonymous zaps as part of automated workflows or experiments

FAQ from Nostr MCP Server

What is an MCP server?

An MCP (Model Context Protocol) server acts as an intermediary between a Large Language Model (LLM) and external data sources, allowing the LLM to access and utilize information from those sources.

Which LLMs are supported?

Currently, the server provides instructions for connecting to Claude for Desktop and Cursor.

How do I configure the server to use different relays?

You can specify custom relays in your queries to the LLM. For example: "Show me the profile for npub1... using relay wss://relay.damus.io"

Can I send zaps anonymously?

Yes, the server provides a sendAnonymousZap tool that allows you to send zaps without revealing your Nostr identity.

What do I do if queries time out?

Try increasing the QUERY_TIMEOUT value in the source code (currently 8 seconds) or specifying different relays.