MCP Server
The Applesauce MCP (Model Context Protocol) server helps AI agents build Nostr applications by providing semantic search over Applesauce documentation and code examples. By integrating this into your AI-powered IDE or coding assistant, your agent gains instant access to comprehensive documentation, real-world examples, and best practices.
Why Use the MCP Server?
- Reduce hallucinations - AI agents can verify API usage against actual documentation
- Faster development - Find relevant examples and patterns through natural language queries
- Stay current - Access up-to-date documentation and examples
- Better code quality - Learn from real-world usage patterns
Quick Start
The easiest way to use the MCP server is through the public HTTP endpoint:
https://mcp.applesauce.hzrd149.com/mcpNo installation required! Just configure your IDE to connect to this endpoint.
If you want to test out the tool manually you can run this command:
npx @modelcontextprotocol/inspector --server-url https://mcp.applesauce.hzrd149.com/mcpIDE Integration
Configure the MCP server for your preferred IDE:
// ~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"applesauce": {
"type": "remote",
"url": "https://mcp.applesauce.hzrd149.com/mcp"
}
}
}// .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
"mcpServers": {
"applesauce": {
"url": "https://mcp.applesauce.hzrd149.com/mcp"
}
}
}// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// %APPDATA%\Claude\claude_desktop_config.json (Windows)
// ~/.config/Claude/claude_desktop_config.json (Linux)
{
"mcpServers": {
"applesauce": {
"url": "https://mcp.applesauce.hzrd149.com/mcp"
}
}
}// Configuration location varies by IDE
{
"mcpServers": {
"applesauce": {
"url": "https://mcp.applesauce.hzrd149.com/mcp"
}
}
}Resources:
Recommended: Install Nostrbook MCP
For comprehensive Nostr protocol knowledge, we recommend also installing the Nostrbook MCP server. While Applesauce MCP provides documentation and examples for building with Applesauce, Nostrbook MCP gives agents direct access to NIPs, event kinds, tags, and protocol documentation.
Benefits of using both:
- Protocol reference - Query NIPs and protocol specifications directly
- Event kind details - Get up-to-date information about any Nostr event kind
- Tag documentation - Understand how to use specific tags
- Complementary coverage - Applesauce shows how to build, Nostrbook explains what to build
Add Nostrbook MCP alongside Applesauce in your configuration:
// ~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"applesauce": {
"type": "remote",
"url": "https://mcp.applesauce.hzrd149.com/mcp"
},
"nostr": {
"type": "command",
"command": "npx",
"args": ["-y", "@nostrbook/mcp@latest"]
}
}
}// .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
"mcpServers": {
"applesauce": {
"url": "https://mcp.applesauce.hzrd149.com/mcp"
},
"nostr": {
"command": "npx",
"args": ["-y", "@nostrbook/mcp@latest"]
}
}
}// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// %APPDATA%\Claude\claude_desktop_config.json (Windows)
// ~/.config/Claude/claude_desktop_config.json (Linux)
{
"mcpServers": {
"applesauce": {
"url": "https://mcp.applesauce.hzrd149.com/mcp"
},
"nostr": {
"command": "npx",
"args": ["-y", "@nostrbook/mcp@latest"]
}
}
}// Configuration location varies by IDE
{
"mcpServers": {
"applesauce": {
"url": "https://mcp.applesauce.hzrd149.com/mcp"
},
"nostr": {
"command": "npx",
"args": ["-y", "@nostrbook/mcp@latest"]
}
}
}See nostrbook.dev/mcp for full installation instructions and available tools.
Available Tools
Once configured, AI agents can use these tools:
Documentation Tools
search_docs- Semantic search through Applesauce documentationlist_docs- List all available documentation filesread_docs- Read full content of specific documentation files
Example Code Tools
search_examples- Search real-world code exampleslist_examples- List all available examplesread_example- Read full source code and metadata for examples
Running Locally
For advanced users who want to run the MCP server locally:
{
"mcpServers": {
"applesauce": {
"command": "deno",
"args": ["run", "-P", "jsr:@applesauce/mcp"]
}
}
}# Using Docker Compose
docker-compose up -d
# Or build and run directly
docker build -t applesauce-mcp .
docker run -p 3000:3000 applesauce-mcpPrerequisites for Deno:
Custom Embedding Providers
The server supports multiple embedding providers (Ollama, OpenAI, OpenRouter, etc.). Configure using environment variables:
# Using OpenAI
export EMBEDDING_PROVIDER=openai
export EMBEDDING_MODEL=text-embedding-3-small
export OPENAI_API_KEY=sk-your-api-key
# Using OpenRouter
export EMBEDDING_PROVIDER=openai
export EMBEDDING_MODEL=nomic-ai/nomic-embed-text-v1.5
export OPENAI_API_KEY=sk-or-v1-your-api-key
export OPENAI_BASE_URL=https://openrouter.ai/api/v1Source Code
The MCP server is open source and available on GitHub:
- Repository: github.com/hzrd149/applesauce-mcp
- JSR Package: @applesauce/mcp
- License: MIT
