Exposes silverbullet-ai tools from a SilverBullet space to MCP clients
Runs on your machine from its package; the steps are below.
At most: creates or changes data: records, files, settings.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y silverbullet-ai-mcp
MCP client config
{
"mcpServers": {
"silverbullet-ai": {
"command": "npx",
"args": [
"-y",
"silverbullet-ai-mcp"
]
}
}
}This plug integrates various LLMs (Large Language Models) into SilverBullet, the markdown-based note taking tool, allowing users to perform various AI-related tasks directly within their notes. It requires SilverBullet to work, and also access to either a self-hosted or SaaS LLM such as Ollama, OpenAI (ChatGPT), Google Gemini, etc.
silverbullet-ai is very new and is still in early development. It may not work as expected. Please report any issues you encounter, or feature ideas.
If you are new here, start with either the AI: Chat on current page command or the custom templated prompts!
Warning: Please backup your notes before using this plug. It inserts and replaces text at certain points and isn't well-tested yet, so back up your data!
The list below are the commands available in this plugin.
After installing the plug, you can access its features through the command palette. Configuration is done using Space Lua in your CONFIG page (or any page with a space-lua block).
SilverBullet v2 uses Space Lua for configuration. Add a space-lua block to your CONFIG page:
local openai_key = "sk-your-openai-key-here"
config.set {
ai = {
providers = {
openai = {
apiKey = openai_key,
preferredModels = {"gpt-4o", "gpt-4o-mini"}
},
ollama = {
baseUrl = "http://localhost:11434/v1",
useProxy = false,
preferredModels = {"llama3.2", "qwen2.5-coder"}
}
},
-- Optional: auto-select a default model on startup
defaultTextModel = "ollama:llama3.2",
-- Chat settings (optional)
chat = {
userInformation = "I'm a software developer who likes taking notes.",
userInstructions = "Please give short and concise responses."
}
}
}
With this configuration:
preferredModels appear first in the picker (marked with ★)| Option | Description |
|---|---|
apiKey | API key for the provider |
baseUrl | Custom API endpoint |
useProxy | Use SilverBullet's proxy (default: true, set false for local services) |
preferredModels | Models shown first in picker |
fetchModels | Fetch models from API (default: true). Set false if API doesn't support it |
provider | Explicit provider type when key name doesn't match (e.g., provider = "openai" for OpenRouter) |
config.set {
ai = {
providers = {
ollama = {
baseUrl = "http://localhost:11434/v1",
useProxy = false,
preferredModels = {"llama3.2", "qwen2.5-coder"}
}
},
defaultTextModel = "ollama:llama3.2"
}
}
config.set {
ai = {
providers = {
gemini = {
apiKey = "your-google-ai-studio-key",
preferredModels = {"gemini-2.0-flash", "gemini-1.5-pro"}
}
}
}
}
Get your API key from Google AI Studio.
OpenRouter provides access to many models via one API:
config.set {
ai = {
providers = {
openrouter = {
provider = "openai", -- OpenRouter uses OpenAI-compatible API
apiKey = "your-openrouter-key",
baseUrl = "https://openrouter.ai/api/v1",
preferredModels = {"anthropic/claude-3.5-sonnet", "openai/gpt-4o"}
}
}
}
}
You can configure multiple instances of the same provider type:
config.set {
ai = {
providers = {
ollamaLocal = {
provider = "ollama",
baseUrl = "http://localhost:11434/v1",
useProxy = false
},
ollamaServer = {
provider = "ollama",
baseUrl = "http://my-server:11434/v1",
useProxy = true
}
}
}
}
Image models use a separate configuration:
config.set {
ai = {
keys = {
OPENAI_API_KEY = "your-openai-key"
},
imageModels = {
{name = "dall-e-3", modelName = "dall-e-3", provider = "dalle"}
}
}
}
The system prompt includes optional user information and instructions:
config.set {
ai = {
chat = {
userInformation = "I'm a software developer who likes taking notes.",
userInstructions = "Please give short and concise responses."
}
}
}
You can use template notes to create custom prompts. Template notes must have:
tags including meta/template/aiPromptaiprompt object with a description keyaiprompt.systemPrompt to override the system promptExample template to summarize the current note:
---
tags: meta/template/aiPrompt
aiprompt:
description: "Generate a summary of the current page."
---
Generate a short and concise summary of the note below.
title: ${@page.name}
Everything below is the content of the note:
${readPage(@page.ref)}
Run AI: Execute AI Prompt from Custom Template to use your templates.
npm install
npm run build
Copy the resulting .plug.js file into your space's _plug folder:
npm run build && cp *.plug.js /my/space/_plug/
Requires SilverBullet v2.11.0+
Library: Install commandLatest release:
ghr:justyns/silverbullet-ai/PLUG.md
Specific release:
ghr:justyns/silverbullet-ai@0.9.1/PLUG.md
See GitHub Releases for available versions.
Upgrading? If you have an old version in _plug/, delete it before reinstalling via Library Manager.
See the documentation for full configuration details.