AgentHubAgentHub

obsidian-mcp-server

MCP ServerMCP Registry官方收录

io.github.cyanheads/obsidian-mcp-server · v3.2.4

MCP server for Obsidian — read, write, search, and surgically edit notes, tags, and frontmatter.

概览

obsidian-mcp-server 是一个MCP Server,收录自 官方 MCP Registry。支持 stdio、streamable-http 传输。本页提供 Cursor、Claude Code 等客户端的安装配置片段。

安装

选择你的平台查看安装方式

{
  "mcpServers": {
    "obsidian-mcp-server": {
      "command": "node",
      "args": [
        "-y",
        "obsidian-mcp-server"
      ],
      "env": {
        "OBSIDIAN_API_KEY": "<OBSIDIAN_API_KEY>"
      }
    }
  }
}

环境变量

OBSIDIAN_API_KEY必填

Bearer token for the Obsidian Local REST API plugin (Settings → Community Plugins → Local REST API).

OBSIDIAN_BASE_URL可选

Base URL of the Obsidian Local REST API. Default: http://127.0.0.1:27123 (enable "Non-encrypted (HTTP) Server" in plugin settings). Use https://127.0.0.1:27124 for the always-on HTTPS port (self-signed cert; pair with OBSIDIAN_VERIFY_SSL=false).

OBSIDIAN_VERIFY_SSL可选

Whether to verify the TLS certificate on the Obsidian endpoint. Default false because the plugin uses a self-signed cert.

OBSIDIAN_REQUEST_TIMEOUT_MS可选

Per-request timeout in milliseconds.

OBSIDIAN_ENABLE_COMMANDS可选

Opt-in flag for the command-palette pair (obsidian_list_commands + obsidian_execute_command). Off by default — Obsidian commands are opaque and can be destructive.

OBSIDIAN_READ_PATHS可选

Optional comma-separated vault-relative folder allowlist for reads. Prefix-based with implicit recursion; case-insensitive; trailing slashes normalized. Unset = full vault. Write paths are implicitly readable. Example: 'public/,projects/'.

OBSIDIAN_WRITE_PATHS可选

Optional comma-separated vault-relative folder allowlist for writes. Same syntax as OBSIDIAN_READ_PATHS. Unset = full vault. Example: 'projects/,scratch/'.

OBSIDIAN_READ_ONLY可选

Global read-only kill switch. When true, every write is denied regardless of OBSIDIAN_WRITE_PATHS, and the command-palette pair is suppressed (commands can mutate). Useful for shared or public-facing deployments.

MCP_LOG_LEVEL可选

Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

OBSIDIAN_API_KEY必填

Bearer token for the Obsidian Local REST API plugin (Settings → Community Plugins → Local REST API).

OBSIDIAN_BASE_URL可选

Base URL of the Obsidian Local REST API. Default: http://127.0.0.1:27123 (enable "Non-encrypted (HTTP) Server" in plugin settings). Use https://127.0.0.1:27124 for the always-on HTTPS port (self-signed cert; pair with OBSIDIAN_VERIFY_SSL=false).

OBSIDIAN_VERIFY_SSL可选

Whether to verify the TLS certificate on the Obsidian endpoint. Default false because the plugin uses a self-signed cert.

OBSIDIAN_REQUEST_TIMEOUT_MS可选

Per-request timeout in milliseconds.

OBSIDIAN_ENABLE_COMMANDS可选

Opt-in flag for the command-palette pair (obsidian_list_commands + obsidian_execute_command). Off by default — Obsidian commands are opaque and can be destructive.

OBSIDIAN_READ_PATHS可选

Optional comma-separated vault-relative folder allowlist for reads. Prefix-based with implicit recursion; case-insensitive; trailing slashes normalized. Unset = full vault. Write paths are implicitly readable. Example: 'public/,projects/'.

OBSIDIAN_WRITE_PATHS可选

Optional comma-separated vault-relative folder allowlist for writes. Same syntax as OBSIDIAN_READ_PATHS. Unset = full vault. Example: 'projects/,scratch/'.

OBSIDIAN_READ_ONLY可选

Global read-only kill switch. When true, every write is denied regardless of OBSIDIAN_WRITE_PATHS, and the command-palette pair is suppressed (commands can mutate). Useful for shared or public-facing deployments.

MCP_HTTP_HOST可选

The hostname for the HTTP server.

MCP_HTTP_PORT可选

The port to run the HTTP server on.

MCP_HTTP_ENDPOINT_PATH可选

The endpoint path for the MCP server.

MCP_AUTH_MODE可选

Authentication mode to use: 'none', 'jwt', or 'oauth'.

MCP_LOG_LEVEL可选

Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

相关资源

统一 Manifest

{
  "id": "io.github.cyanheads/obsidian-mcp-server",
  "type": "mcp-server",
  "version": "3.2.4",
  "displayName": "obsidian-mcp-server",
  "description": "MCP server for Obsidian — read, write, search, and surgically edit notes, tags, and frontmatter.",
  "repository": {
    "url": "https://github.com/cyanheads/obsidian-mcp-server",
    "source": "github"
  },
  "distribution": {
    "packages": [
      {
        "registryType": "npm",
        "identifier": "obsidian-mcp-server",
        "version": "3.2.4",
        "runtimeHint": "node",
        "transport": "stdio",
        "environmentVariables": [
          {
            "name": "OBSIDIAN_API_KEY",
            "description": "Bearer token for the Obsidian Local REST API plugin (Settings → Community Plugins → Local REST API).",
            "isRequired": true
          },
          {
            "name": "OBSIDIAN_BASE_URL",
            "description": "Base URL of the Obsidian Local REST API. Default: http://127.0.0.1:27123 (enable \"Non-encrypted (HTTP) Server\" in plugin settings). Use https://127.0.0.1:27124 for the always-on HTTPS port (self-signed cert; pair with OBSIDIAN_VERIFY_SSL=false)."
          },
          {
            "name": "OBSIDIAN_VERIFY_SSL",
            "description": "Whether to verify the TLS certificate on the Obsidian endpoint. Default false because the plugin uses a self-signed cert."
          },
          {
            "name": "OBSIDIAN_REQUEST_TIMEOUT_MS",
            "description": "Per-request timeout in milliseconds."
          },
          {
            "name": "OBSIDIAN_ENABLE_COMMANDS",
            "description": "Opt-in flag for the command-palette pair (obsidian_list_commands + obsidian_execute_command). Off by default — Obsidian commands are opaque and can be destructive."
          },
          {
            "name": "OBSIDIAN_READ_PATHS",
            "description": "Optional comma-separated vault-relative folder allowlist for reads. Prefix-based with implicit recursion; case-insensitive; trailing slashes normalized. Unset = full vault. Write paths are implicitly readable. Example: 'public/,projects/'."
          },
          {
            "name": "OBSIDIAN_WRITE_PATHS",
            "description": "Optional comma-separated vault-relative folder allowlist for writes. Same syntax as OBSIDIAN_READ_PATHS. Unset = full vault. Example: 'projects/,scratch/'."
          },
          {
            "name": "OBSIDIAN_READ_ONLY",
            "description": "Global read-only kill switch. When true, every write is denied regardless of OBSIDIAN_WRITE_PATHS, and the command-palette pair is suppressed (commands can mutate). Useful for shared or public-facing deployments."
          },
          {
            "name": "MCP_LOG_LEVEL",
            "description": "Sets the minimum log level for output (e.g., 'debug', 'info', 'warn')."
          }
        ]
      },
      {
        "registryType": "npm",
        "identifier": "obsidian-mcp-server",
        "version": "3.2.4",
        "runtimeHint": "node",
        "transport": "streamable-http",
        "environmentVariables": [
          {
            "name": "OBSIDIAN_API_KEY",
            "description": "Bearer token for the Obsidian Local REST API plugin (Settings → Community Plugins → Local REST API).",
            "isRequired": true
          },
          {
            "name": "OBSIDIAN_BASE_URL",
            "description": "Base URL of the Obsidian Local REST API. Default: http://127.0.0.1:27123 (enable \"Non-encrypted (HTTP) Server\" in plugin settings). Use https://127.0.0.1:27124 for the always-on HTTPS port (self-signed cert; pair with OBSIDIAN_VERIFY_SSL=false)."
          },
          {
            "name": "OBSIDIAN_VERIFY_SSL",
            "description": "Whether to verify the TLS certificate on the Obsidian endpoint. Default false because the plugin uses a self-signed cert."
          },
          {
            "name": "OBSIDIAN_REQUEST_TIMEOUT_MS",
            "description": "Per-request timeout in milliseconds."
          },
          {
            "name": "OBSIDIAN_ENABLE_COMMANDS",
            "description": "Opt-in flag for the command-palette pair (obsidian_list_commands + obsidian_execute_command). Off by default — Obsidian commands are opaque and can be destructive."
          },
          {
            "name": "OBSIDIAN_READ_PATHS",
            "description": "Optional comma-separated vault-relative folder allowlist for reads. Prefix-based with implicit recursion; case-insensitive; trailing slashes normalized. Unset = full vault. Write paths are implicitly readable. Example: 'public/,projects/'."
          },
          {
            "name": "OBSIDIAN_WRITE_PATHS",
            "description": "Optional comma-separated vault-relative folder allowlist for writes. Same syntax as OBSIDIAN_READ_PATHS. Unset = full vault. Example: 'projects/,scratch/'."
          },
          {
            "name": "OBSIDIAN_READ_ONLY",
            "description": "Global read-only kill switch. When true, every write is denied regardless of OBSIDIAN_WRITE_PATHS, and the command-palette pair is suppressed (commands can mutate). Useful for shared or public-facing deployments."
          },
          {
            "name": "MCP_HTTP_HOST",
            "description": "The hostname for the HTTP server."
          },
          {
            "name": "MCP_HTTP_PORT",
            "description": "The port to run the HTTP server on."
          },
          {
            "name": "MCP_HTTP_ENDPOINT_PATH",
            "description": "The endpoint path for the MCP server."
          },
          {
            "name": "MCP_AUTH_MODE",
            "description": "Authentication mode to use: 'none', 'jwt', or 'oauth'."
          },
          {
            "name": "MCP_LOG_LEVEL",
            "description": "Sets the minimum log level for output (e.g., 'debug', 'info', 'warn')."
          }
        ]
      }
    ],
    "remotes": []
  },
  "dependencies": [],
  "installTargets": [
    "claude-code",
    "claude-desktop",
    "cursor",
    "vscode"
  ],
  "keywords": [],
  "provenance": {
    "origin": "official-mcp-registry",
    "originalId": "io.github.cyanheads/obsidian-mcp-server",
    "originalUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/io.github.cyanheads%2Fobsidian-mcp-server/versions/latest",
    "isOfficial": true,
    "status": "active"
  }
}
obsidian-mcp-server — MCP Server 安装与配置 · AgentHub