Logo de SilverBullet MCP 服务器

SilverBullet MCP 服务器

Comunidade
Ahmad-A0

A Model Context Protocol (MCP) server to interact with your SilverBullet notes and data.

Publicado porAhmad-A0
Repositóriosilverbullet-mcp
IdiomaTypeScript
Forks
9
Estrelas
36
Ferramentas disponíveis
0
Tipo de transportestdio, streamable-http
Categorias
LicençaMIT
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    SilverBullet MCP 服务器 disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 0 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    36 estrelas e 9 forks no repositório vinculado.

SilverBullet MCP Server

This project provides a Model Context Protocol (MCP) server that acts as a bridge to your SilverBullet instance. It enables Large Language Models (LLMs) and other MCP-compatible clients to interact with your SilverBullet notes and data by exposing them through standardized MCP tools and resources.

The server is designed to be run via Docker Compose alongside your existing SilverBullet Docker container. It handles authentication and provides a secure way for external applications to access and manipulate your SilverBullet space.

Retirement Prompt Demo

Asking Claude to create a retirement projection, based on my notes.

Prerequisites

  • Docker
  • Docker Compose

Getting Started

  1. Clone the repository:

    bash
    git clone https://github.com/Ahmad-A0/silverbullet-mcp.git
    cd silverbullet-mcp
  2. Create an environment file: Copy the contents of .env.example to a new file named .env.

    bash
    cp .env.example .env

    Update the .env file with your specific values:

    • SB_AUTH_TOKEN: The token this MCP server uses to access SilverBullet. For multi-space servers, use a Dashboard-issued API token with access to the target space.
    • MCP_TOKEN: A secure token for clients (e.g., your AI model) to authenticate with this MCP server.
    • SB_API_BASE_URL: (Optional if running via docker-compose as defined) The base URL for the SilverBullet API. Defaults to http://silverbullet:3000 in the docker-compose.yml.
    • PORT: (Optional if running via docker-compose as defined) The port the MCP server will listen on. Defaults to 4000.
  3. Build and run the services using Docker Compose:

    bash
    docker compose up --build

    This command will:

    • Build the Docker image for the silverbullet-mcp-server if it doesn't exist or if Dockerfile or related files have changed.
    • Pull the tested SilverBullet 2.11.0 slim image (override with SILVERBULLET_IMAGE).
    • Start both the SilverBullet instance and the MCP server.

    The SilverBullet instance will be accessible at http://localhost:3000. The MCP server will be accessible at http://localhost:4000.

Existing SilverBullet and multi-space servers

Set SB_API_BASE_URL to the full address of the target space, including its path binding. Do not append /.fs and do not infer the URL from the space's display name. For example:

dotenv
SB_API_BASE_URL=http://your-silverbullet-host:3000/work
SB_AUTH_TOKEN=your-dashboard-issued-api-token
MCP_TOKEN=your-separate-mcp-client-token

Then start only the MCP service:

sh
docker compose up --build --no-deps silverbullet-mcp-server

The hostname must be reachable from the MCP container; localhost inside that container refers to the MCP container itself. Hostname-bound spaces need their configured hostname. See SilverBullet's Dashboard and authentication documentation.

The bundled two-service Compose example retains legacy single-space mode for existing ./space folders. It is not a multi-space migration tool. For an existing multi-space server, create tokens in its Dashboard rather than setting the SilverBullet server's legacy SB_AUTH_TOKEN environment variable.

A 404 No space here from /.fs usually means the configured URL points at the instance root rather than the space. Compose now respects SB_API_BASE_URL from .env. List/read/create/replace/delete and resource reads have been verified against a disposable SilverBullet 2.11.0 multi-space server.

Discovery and caching

resources/list returns up to 100 notes and a nextCursor for the next page. Pass it as cursor until no next cursor is returned. Direct sb-note:// resource reads and the list-notes tool remain available.

File listings are cached for 30 seconds and concurrent listing requests share one fetch. Successful MCP writes and deletes invalidate listing and content caches. Edits made outside MCP may take up to 30 seconds to appear in listing-backed operations. read-note reads directly; read-multiple-notes accepts enableCaching: false to bypass its content cache (its note discovery still uses the listing cache). Content caching retains at most 256 notes.

search-replace-note always treats replacement text literally, including $1, $&, and $$, even when useRegex enables regex matching of the search pattern.

Editing notes and structured tool results

Use edit-note for precise edits. Example tool arguments:

json
{
  "filename": "Projects/Plan.md",
  "edits": [
    { "oldText": "Status: draft", "newText": "Status: approved", "expectedMatches": 1 }
  ],
  "dryRun": true
}

Matching is literal and case-sensitive, with one expected match per edit by default. Every edit is matched against the original note, so replacements never cascade into subsequent edits. A missing, ambiguous, or overlapping match rejects the entire batch without writing. expectedMatches permits intentional multiple replacements. Empty oldText is rejected; empty newText deletes the matched text.

A dry run returns a unified diff and the note's revision. To apply that preview, repeat the arguments with dryRun: false and expectedRevision set to the returned revision. The tool also uses the revision it reads as an HTTP write precondition, so a concurrent change between its read and write fails rather than being lost. This requires a SilverBullet server implementing ETag/If-Match semantics (tested on 2.11). If no strong ETag is returned, changed edits cannot be applied; previews still work. Unchanged edits make no write. Diffs are capped at 50,000 characters, with diffTruncated indicating omitted output. The diff computation has a one-second budget; exceeding it rejects the edit before writing.

search-replace-note remains available with its existing case-insensitive, replace-all defaults. It does not provide revision protection; use edit-note for that. Invalid regexes now return errors instead of falling back to literal matching. search-notes also accepts useRegex: false for literal searches.

All eight tools advertise an outputSchema and return structuredContent on success alongside the existing readable text. Tool failures return isError: true and an explanation; successful output schemas do not describe error results. Batch reads and searches include per-note errors when only some reads fail.

Returned data is bounded:

  • read-note: offset and limit (default 50,000, maximum 100,000 characters), plus nextOffset, totalCharacters, and the full note's revision. Offsets count JavaScript UTF-16 code units. If the revision changes between pages, restart the read to avoid combining different note versions.
  • list-notes: limit (default 100, maximum 500) and cursor; results contain nextCursor and the filtered total. Keep filters unchanged when advancing.
  • read-multiple-notes: up to 100 notes and contentLimit (default 50,000, maximum 100,000 characters per note). Truncated notes report truncated and totalCharacters; retrieve the remainder with read-note.
  • search-notes: up to 100 results per page and maxMatchesPerNote (default 20, maximum 100). Returned line snippets are capped at 2,000 characters and context at 4,000. Scores count all matches; matchesTruncated flags omitted matching lines. Counts and page numbers must be positive integers; context may be zero.

create-note still defaults to refusing overwrite. It only treats an actual 404 as a missing note and sends If-None-Match: * to prevent a racing creation from being overwritten on servers supporting conditional writes.

Connecting to the MCP Server

This MCP server runs as part of a Docker Compose setup and will be accessible at http://localhost:4000 by default.

You can connect to this server using an MCP client. The method of connection and authentication depends on the client's capabilities.

Using mcp-remote (for stdio-only clients)

If your MCP client only supports stdio connections (e.g., older versions of Claude Desktop, Cursor, Windsurf), you can use mcp-remote to bridge the connection to this HTTP-based MCP server.

mcp-remote acts as a local stdio MCP server that proxies requests to a remote HTTP MCP server, handling authentication in the process.

Client Configuration with Authentication:

This MCP server requires token-based authentication. Configure your MCP client (e.g., in claude_desktop_config.json, ~/.cursor/mcp.json, or ~/.codeium/windsurf/mcp_config.json) to use mcp-remote and pass the MCP_TOKEN via a custom header:

jsonc
{
  "mcpServers": {
    "silverbullet-mcp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:4000/mcp", 
        "--transport",
        "http-only",
        "--header",
        "Authorization:Bearer ${MCP_SERVER_TOKEN}" 
      ],
      "env": {
        "MCP_SERVER_TOKEN": "your_actual_mcp_token_from_dotenv"
      }
    }
  }
}

Important:

  • Replace "your_actual_mcp_token_from_dotenv" with the actual value of MCP_TOKEN you have set in your .env file for the silverbullet-mcp-server.
  • Some clients (like Cursor and Claude Desktop on Windows) have issues with spaces in args. The example above (Authorization:Bearer ${MCP_SERVER_TOKEN}) avoids this.
  • Ensure npx can find mcp-remote. You might need to add -y as the first argument to args (e.g., ["-y", "mcp-remote", ...]) or install mcp-remote globally (npm install -g mcp-remote).

Refer to the mcp-remote documentation for more advanced configurations, including OAuth support (not used by this server's default auth), different transport strategies, and troubleshooting.

Direct Connection (for Streamable HTTP clients)

If your MCP client supports Streamable HTTP transport and can send custom headers, you can connect to it directly.

The server supports two methods for token-based authentication:

  1. Authorization Header (Recommended):

    • Header Name: Authorization
    • Header Value: Bearer YOUR_MCP_TOKEN
  2. Query Parameter:

    • Append ?token=YOUR_MCP_TOKEN to the server URL.
    • Example: http://localhost:4000/mcp?token=YOUR_MCP_TOKEN

Replace YOUR_MCP_TOKEN with the actual value of the MCP_TOKEN environment variable set in your .env file.

Endpoint: http://localhost:4000/mcp (or as configured by PORT if not using Docker Compose defaults).

Consult your MCP client's documentation on how to configure connections to remote HTTP MCP servers, including how to send custom headers or append query parameters.

Development and testing

Use Node.js 24 LTS and install the locked dependencies:

sh
npm ci
npm test

npm test builds TypeScript and runs the real HTTP MCP server against an in-memory SilverBullet HTTP fixture. It checks authentication, independent sessions, note reads and writes, resource reads, missing notes, session deletion, and a space URL prefix. The fixture uses disposable notes, random local ports, and test-only tokens; it does not read .env or access your space/ directory. No Docker or live SilverBullet credentials are needed. CI runs this suite on Node.js 22 and 24.

The regression checks for dollar replacements, session recovery, and cache races are included in npm test. To run only those checks:

sh
npm run test:regressions

For a real compatibility check, run:

sh
npm run test:live
# Or with Podman:
CONTAINER_RUNTIME=podman npm run test:live

This pulls the pinned SilverBullet 2.11.0 slim image and creates a temporary local server, accounts, tokens, and spaces. It mounts no host notes and removes its container afterward. Docker or Podman must be available. CI runs both the fixture suite and real-server checks before publishing an image.

Instalação

TypingMind
{
  "mcpServers": {
    "silverbullet-mcp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:4000/mcp",
        "--transport",
        "http-only",
        "--header",
        "Authorization:Bearer {{config.MCP_TOKEN}}"
      ],
      "env": {
        "MCP_TOKEN": "<MCP_TOKEN>"
      }
    }
  }
}

Use o MCP de SilverBullet MCP 服务器 com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar SilverBullet MCP 服务器, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. É possível executar o MCP localmente no seu dispositivo ou se conectar à URL de um servidor MCP remoto.

Opção 1: use o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione SilverBullet MCP 服务器 como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de SilverBullet MCP 服务器.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "silverbullet-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "silverbullet-mcp-server"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de SilverBullet MCP 服务器, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de SilverBullet MCP 服务器.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar SilverBullet MCP 服务器 para me ajudar nesta tarefa?
SilverBullet MCP 服务器
Claro. Já li.
Veja o que encontrei usando SilverBullet MCP 服务器.

Opção 2: Adicione a URL de um servidor MCP

Use esta opção quando SilverBullet MCP 服务器 já estiver hospedado remotamente ou quando sua equipe quiser um conector compartilhado que vários usuários possam acessar.

1

Abra Conectores MCP

No TypingMind, vá até Plugins, abra Conectores MCP e selecione Adicionar URL.

  1. Abra o TypingMind no navegador.
  2. Acesse Plugins.
  3. Abra Conectores MCP.
  4. Clique em Adicionar URL.
Formulário do TypingMind para adicionar a URL de um servidor MCP personalizado
2

Cole a URL do servidor

Insira http://localhost:4000/mcp no campo URL do servidor. Adicione um nome para a conexão, uma descrição, um ícone, cabeçalhos HTTP personalizados ou configurações do cliente OAuth se o servidor exigir.

  1. Cole http://localhost:4000/mcp no campo URL do servidor.
  2. Digite um nome para a conexão de SilverBullet MCP 服务器.
  3. Adicione uma descrição e um ícone para facilitar a identificação.
  4. Adicione cabeçalhos HTTP personalizados ou dados do cliente OAuth se o servidor exigir autenticação.
3

Crie a conexão

Clique em Criar conexão, volte à lista de Plugins e confirme que a nova conexão MCP está ativa.

  1. Clique em Criar conexão.
  2. Volte à lista de conectores MCP.
  3. Confirme que a conexão de SilverBullet MCP 服务器 aparece como ativa.
  4. Atualize a lista de plugins se a conexão não aparecer imediatamente.
4

Troque de modelo sem reconectar

Inicie um chat com seu modelo preferido, ative as ferramentas de SilverBullet MCP 服务器 em Plugins e mude para outro modelo sempre que necessário. A conexão MCP continua disponível no espaço de trabalho do TypingMind.

  1. Inicie um novo chat no TypingMind.
  2. Selecione o modelo de IA que deseja usar.
  3. Ative as ferramentas de SilverBullet MCP 服务器 em Plugins.
  4. Peça ao modelo para usar a ferramenta quando necessário.
  5. Mude para outro modelo de IA e reutilize a mesma conexão MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar SilverBullet MCP 服务器 para me ajudar nesta tarefa?
SilverBullet MCP 服务器
Claro. Já li.
Veja o que encontrei usando SilverBullet MCP 服务器.

Perguntas frequentes

Para que serve o servidor MCP SilverBullet MCP 服务器?

SilverBullet MCP 服务器 é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP SilverBullet MCP 服务器 com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar SilverBullet MCP 服务器 com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP SilverBullet MCP 服务器 com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com SilverBullet MCP 服务器 conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP SilverBullet MCP 服务器 ao TypingMind?

É possível conectar SilverBullet MCP 服务器 ao TypingMind com o conector MCP local ou adicionando a URL de um servidor MCP remoto. Use o conector local quando o servidor precisar acessar arquivos, apps ou recursos privados no seu dispositivo, e use uma URL de servidor quando o servidor MCP estiver hospedado remotamente.

Quais ferramentas o MCP SilverBullet MCP 服务器 oferece no TypingMind?

SilverBullet MCP 服务器 disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP SilverBullet MCP 服务器?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se SilverBullet MCP 服务器 exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇