Obsidian MCP Server
Servidor MCP de Obsidian
Un servidor MCP (Protocolo de contexto de modelo) que permite a los agentes de IA realizar análisis y descubrimientos de conocimiento sofisticados en su bóveda de Obsidian mediante el complemento API REST local.
Por qué esto es importante
Este servidor transforma su bóveda de Obsidian en una poderosa base de conocimiento para agentes de IA, lo que permite flujos de trabajo complejos de varios pasos como:
Recuperar notas de mi carpeta "Proyectos/Planificación" que contengan "hoja de ruta" o "cronograma" en los títulos, creadas después del 1 de abril, analizarlas para detectar posibles obstáculos o dependencias y presentar una evaluación de riesgos consolidada con referencias a las notas originales.
Encuentre todas las notas etiquetadas con 'investigación' o 'análisis' del último mes, analice su contenido en busca de secciones incompletas o preguntas abiertas y luego compárelas con mis notas de 'Equipo/Experiencia' para sugerir qué colegas podrían ayudar a abordar cada deficiencia.
Obtenga el contenido completo de las notas de las reuniones de 'Liderazgo/Trimestral' que contienen 'presupuesto' o 'número de empleados', analícelas para identificar las acciones asignadas a mi departamento y cree un cronograma con las referencias de las notas originales.
El filtrado avanzado del servidor, la compatibilidad con expresiones regulares y las capacidades completas de recuperación de contenido permiten a los agentes realizar un trabajo de conocimiento matizado que manualmente llevaría horas.
Related MCP server: Obsidian Local REST API MCP Server
Prerrequisitos
Instale el complemento Obsidian Local REST API en su bóveda de Obsidian
Configurar y habilitar el complemento en la configuración de Obsidian
Tenga en cuenta la URL de la API (predeterminada:
https://localhost:27124) y la clave de API si ha configurado una
Instalación
De PyPI (recomendado)
# Install from PyPI
pip install obsidian-api-mcp-server
# Or with uv
uv pip install obsidian-api-mcp-serverAgregar a la configuración de MCP
Agregue a su configuración de cliente MCP (por ejemplo, Claude Desktop):
{
"mcpServers": {
"obsidian-api-mcp-server": {
"command": "uvx",
"args": [
"--from",
"obsidian-api-mcp-server>=1.0.1",
"obsidian-api-mcp"
],
"env": {
"OBSIDIAN_API_URL": "https://localhost:27124",
"OBSIDIAN_API_KEY": "your-api-key-here"
}
}
}
}Desde la fuente (Desarrollo)
# Clone the repository
git clone https://github.com/pmmvr/obsidian-api-mcp-server
cd obsidian-api-mcp-server
# Install with uv
uv pip install -e .
# Or with pip
pip install -e .Configuración
Establecer variables de entorno para la API de Obsidian:
# Required: Obsidian API URL (HTTPS by default)
export OBSIDIAN_API_URL="https://localhost:27124" # Default
# Optional: API key if you've configured authentication
export OBSIDIAN_API_KEY="your-api-key-here"Nota importante de seguridad : Evite codificar su OBSIDIAN_API_KEY directamente en scripts o enviarla al control de versiones. Considere usar un archivo .env (incluido en el .gitignore de este proyecto) y una biblioteca como python-dotenv para administrar su clave API, o usar variables de entorno administradas por su sistema operativo o shell.
Nota : El servidor usa HTTPS de forma predeterminada y deshabilita la verificación de certificados SSL para los certificados autofirmados que se usan comúnmente con instancias locales de Obsidian. Para conexiones HTTP, configure OBSIDIAN_API_URL="http://localhost:27123" .
Uso
Ejecute el servidor MCP:
obsidian-mcpHerramientas disponibles
El servidor proporciona tres herramientas potentes:
search_vault- Búsqueda avanzada con filtros flexibles y recuperación completa de contenido:query: búsqueda de texto o expresiones regulares en el contenido de la nota (opcional)query_type- Tipo de búsqueda: "texto" (predeterminado) o "expresión regular"search_in_path- Limitar la búsqueda a una ruta de carpeta específicatitle_contains- Filtrar por texto en títulos de notas (cadena, matriz o cadena JSON)title_match_mode- Cómo hacer coincidir varios términos: "cualquiera" (OR) o "todos" (AND)tag- Filtrar por etiqueta (cadena, matriz o cadena JSON - busca en frontmatter y en línea #tags)tag_match_mode- Cómo hacer coincidir varias etiquetas: "cualquiera" (OR) o "todas" (AND)context_length- Cantidad de contenido a devolver (establecer alta para contenido completo)include_content- Booleano para recuperar el contenido completo de todas las notas coincidentescreated_since/until- Filtrar por fecha de creaciónmodified_since/until- Filtrar por fecha de modificaciónpage_size- Resultados por páginamax_matches_per_file- Limitar coincidencias por nota
Características principales :
Cuando no se proporciona ninguna
query, devuelve automáticamente el contenido completo para búsquedas de solo filtroinclude_content=Truefuerza la recuperación completa del contenido para cualquier búsquedaAdmite patrones de expresiones regulares para coincidencia de texto complejo (condiciones OR, búsqueda sin distinción entre mayúsculas y minúsculas, etc.)
get_note_content- Recupera el contenido completo y los metadatos de una nota específica por rutabrowse_vault_structure- Navegue por la estructura del directorio de la bóveda de manera eficiente:path: directorio para explorar (predeterminado a la raíz del almacén)include_files: valor booleano para incluir archivos (valor predeterminado: Falso, solo carpetas para mayor velocidad)recursive- Booleano para explorar todos los directorios anidados
Ejemplos de casos de uso
Búsquedas básicas
Buscar notas por título en una carpeta específica:
search_vault( search_in_path="Work/Projects/", title_contains="meeting" )Buscar notas con múltiples términos de título (lógica OR):
search_vault( title_contains=["foo", "bar", "fizz", "buzz"], title_match_mode="any" # Default )Encuentre notas con TODOS los términos del título (Y lógica):
search_vault( title_contains=["project", "2024"], title_match_mode="all" )Obtenga todas las notas recientes con contenido completo:
search_vault( modified_since="2025-05-20", include_content=True )Búsqueda de texto con contexto:
search_vault( query="API documentation", search_in_path="Engineering/", context_length=500 )Buscar por etiqueta:
search_vault( tag="project" )Búsqueda de expresiones regulares para condiciones OR:
search_vault( query="foo|bar", query_type="regex", search_in_path="Projects/" )Búsqueda de expresiones regulares para tareas asignadas a personas específicas:
search_vault( query="(TODO|FIXME|ACTION).*@(alice|bob)", query_type="regex", search_in_path="Work/Meetings/" )
Flujos de trabajo avanzados de varios pasos
Estos ejemplos demuestran cómo los agentes pueden encadenar tareas sofisticadas de descubrimiento de conocimiento:
Análisis estratégico del proyecto:
# Step 1: Get all project documentation search_vault( search_in_path="Projects/Infrastructure/", title_contains=["planning", "requirements", "architecture"], title_match_mode="any", include_content=True ) # Step 2: Find related technical discussions search_vault( tag=["infrastructure", "technical-debt"], tag_match_mode="any", modified_since="2025-04-01", include_content=True )El agente puede luego analizar dependencias, identificar riesgos y recomendar la asignación de recursos.
Minería de elementos de acción de la reunión:
# Get all recent meeting notes with full content
search_vault(
search_in_path="Meetings/",
title_contains=["standup", "planning", "retrospective"],
title_match_mode="any",
created_since="2025-05-01",
include_content=True
)El agente escanea el contenido en busca de elementos de acción, extrae asignaciones y crea un seguimiento cronológico.
Análisis de brechas de investigación:
# Find research notes with questions or gaps
search_vault(
query="(TODO|QUESTION|INVESTIGATE|UNCLEAR)",
query_type="regex",
tag=["research", "analysis"],
tag_match_mode="any",
include_content=True
)
# Cross-reference with team expertise
search_vault(
search_in_path="Team/",
tag=["expertise", "skills"],
tag_match_mode="any",
include_content=True
)El agente identifica las brechas de conocimiento y sugiere miembros del equipo que podrían ayudar
Exploración de la estructura de la bóveda:
# Quick organizational overview
browse_vault_structure(recursive=True)
# Deep dive into specific areas
browse_vault_structure(
path="Projects/CurrentSprint/",
include_files=True,
recursive=True
)Mapeo de conocimiento basado en etiquetas:
# Find notes with multiple tags (AND logic)
search_vault(
tag=["project", "urgent"],
tag_match_mode="all",
include_content=True
)
# Find notes with any relevant tags (OR logic)
search_vault(
tag=["architecture", "design", "implementation"],
tag_match_mode="any",
modified_since="2025-04-15"
)Desarrollo
# Install with test dependencies
uv pip install -e ".[test]"
# Run the server
python -m obsidian_mcp.server
# Run tests
uv run behave features/blackbox_tests.feature
# Or use the test runner
python run_tests.pyLicencia
Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.
Available Tools
3 toolsbrowse_vault_structureARead-only
Browse vault directory structure.
Args:
path: Path to browse from (defaults to vault root)
include_files: Include files in listing (default: False, folders only)
recursive: List nested contents recursively
| Name | Required | Description | Default |
|---|---|---|---|
| include_files | No | ||
| path | No | ||
| recursive | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint=true and openWorldHint=false, indicating this is a safe read operation with deterministic results. The description adds valuable context about default behaviors (browsing from vault root, folders-only by default) and the recursive option, which goes beyond what annotations provide. No contradictions with annotations exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly structured: a clear purpose statement followed by a bullet-point style explanation of each parameter. Every sentence earns its place, with no wasted words. The information is front-loaded with the core purpose first.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a directory browsing tool with 3 parameters, no output schema, and good annotations, the description covers the essential behavior and parameters adequately. However, it doesn't describe the return format (e.g., what structure is returned, error conditions), which would be helpful given the lack of output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description carries full burden for parameter meaning. It successfully explains all three parameters: 'path' (starting location with default), 'include_files' (files inclusion toggle with default), and 'recursive' (nested listing). This compensates well for the schema's lack of descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Browse') and resource ('vault directory structure'), making the purpose immediately understandable. It distinguishes from sibling tools like 'get_note_content' (which retrieves content) and 'search_vault' (which searches), but doesn't explicitly mention these distinctions in the description itself.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for exploring directory structure rather than retrieving content or searching, but doesn't provide explicit guidance on when to use this tool versus alternatives like 'search_vault'. The parameter descriptions suggest default behaviors (folders only, non-recursive), which gives some contextual hints.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_note_contentARead-only
Get the full content and metadata of a specific note by path.
Args:
path: Full path to the note within the vault
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations provide readOnlyHint=true and openWorldHint=false, indicating a safe, read-only operation with a closed world. The description adds context by specifying 'full content and metadata,' which hints at the return format, but doesn't detail aspects like error handling, rate limits, or auth needs. No contradiction with annotations exists.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose in the first sentence, followed by a concise parameter explanation. Every sentence earns its place with no wasted words, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (1 parameter, no output schema), annotations cover safety, and the description adds parameter semantics and purpose. However, it lacks details on return values, error cases, or how it differs from siblings, leaving some gaps for an AI agent to infer usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage and 1 parameter, the description compensates by explaining 'path: Full path to the note within the vault,' adding meaning beyond the bare schema. It clarifies the parameter's purpose and format, though it could provide more examples or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get the full content and metadata of a specific note by path.' It specifies the verb ('Get'), resource ('note'), and scope ('full content and metadata'), though it doesn't explicitly differentiate from sibling tools like 'browse_vault_structure' or 'search_vault' beyond the 'specific note by path' aspect.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by specifying 'by path,' suggesting it's for retrieving a known note, but it doesn't provide explicit guidance on when to use this tool versus alternatives like 'search_vault' for unknown notes or 'browse_vault_structure' for exploring. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_vaultARead-only
Search Obsidian vault for notes matching criteria.
Args:
query: Text or regex pattern to search for
query_type: "text" or "regex"
search_in_path: Limit search to specific folder
title_contains: Filter by title (string or array)
title_match_mode: "any" or "all" for multiple title terms
tag: Filter by tag (string, array, or JSON string like title_contains)
tag_match_mode: "any" or "all" for multiple tag terms
context_length: Characters of context around matches
include_content: Return full note content
modified_since/until: Filter by modification date (YYYY-MM-DD)
created_since/until: Filter by creation date (YYYY-MM-DD)
page_size/page: Pagination controls
max_matches_per_file: Limit matches per file
| Name | Required | Description | Default |
|---|---|---|---|
| context_length | No | ||
| created_since | No | ||
| created_until | No | ||
| include_content | No | ||
| max_matches_per_file | No | ||
| modified_since | No | ||
| modified_until | No | ||
| page | No | ||
| page_size | No | ||
| query | No | ||
| query_type | No | text | |
| search_in_path | No | ||
| tag | No | ||
| tag_match_mode | No | any | |
| title_contains | No | ||
| title_match_mode | No | any |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=false, indicating this is a safe read operation with limited scope. The description adds useful context about what gets searched ('notes') and the types of criteria available, but doesn't disclose behavioral aspects like performance characteristics, rate limits, or error conditions. With annotations covering the safety profile, this earns a baseline score.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear purpose statement followed by a comprehensive parameter list. Every sentence earns its place by providing essential information. It could be slightly more concise by grouping related parameters, but overall it's efficient and front-loaded with the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex search tool with 16 parameters and no output schema, the description does a good job explaining inputs but has gaps. It doesn't describe the return format (what the search results look like), error conditions, or performance considerations. The parameter explanations are excellent, but without output information or behavioral context, completeness is limited.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage (titles only, no descriptions), the description carries the full burden of explaining parameters. It provides detailed semantic information for all 16 parameters, including data types, formats, and usage examples (e.g., 'YYYY-MM-DD' for dates, 'text' or 'regex' for query_type). This fully compensates for the schema's lack of descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Search Obsidian vault for notes matching criteria.' This specifies the verb ('search'), resource ('Obsidian vault'), and target ('notes matching criteria'). However, it doesn't explicitly differentiate from sibling tools like 'browse_vault_structure' or 'get_note_content', which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There's no mention of sibling tools like 'browse_vault_structure' (for exploring structure) or 'get_note_content' (for retrieving specific note content), nor any context about when search is appropriate versus other approaches.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.0- First observed
browse_vault_structure - First observed
get_note_content - First observed
search_vault
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: browse_vault_structure is for exploring the file hierarchy, get_note_content retrieves a specific note's details, and search_vault performs complex queries across the vault. There is no overlap in functionality, making it easy for an agent to select the right tool.
All tool names follow a consistent verb_noun pattern with snake_case: browse_vault_structure, get_note_content, and search_vault. The naming is predictable and readable, with no deviations in style or convention.
With only 3 tools, the server feels thin for managing an Obsidian vault, which typically involves operations like creating, updating, or deleting notes. While the tools cover browsing, reading, and searching, the lack of write operations limits the scope, making it borderline for the domain.
The tool set is severely incomplete for an Obsidian vault management server. There are no tools for creating, updating, or deleting notes, which are core CRUD operations. This creates significant gaps that will likely cause agent failures when trying to perform basic note management tasks.
Maintenance
Related MCP Connectors
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Search your Obsidian vault to quickly find notes by title or keyword, summarize related content, a…
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Related MCP Servers
- AlicenseBqualityFmaintenanceA server that consolidates 21+ Obsidian tools into 5 intelligent operations (vault, edit, view, workflow, system) with contextual workflow hints to help AI agents effectively interact with Obsidian.526 npm36MIT
- AlicenseAqualityBmaintenanceA bridge server that allows LLM tools to interact with an Obsidian vault through a local REST API, enabling file operations, note management, and metadata access through natural language.1313 npm9MIT
- AlicenseAqualityDmaintenanceEmpowers AI agents to deeply understand and interact with Obsidian vaults through the Local REST API, enabling advanced features like vault structure discovery, graph analysis, command execution, and batch file operations.1618MIT
- AlicenseNot gradedqualityDmaintenanceA high-performance TypeScript server that enables interaction with Obsidian vaults through the Local REST API community plugin. It provides comprehensive tool discovery, intelligent resource caching, and unified access to both markdown notes and binary vault files like images and PDFs.5MIT