Obsidian Local REST API▌

by j-shelfwood
Connect and manage Obsidian vaults with the Obsidian Local REST API for smarter note handling, semantic search, and seam
Bridges Obsidian vaults through the Local REST API, enabling intelligent note management, knowledge discovery, and conversational access to personal knowledge bases with semantic search, daily note handling, and task-oriented operations designed for knowledge workers.
best for
- / Knowledge workers managing large Obsidian vaults
- / Researchers analyzing notes and finding knowledge gaps
- / Project managers tracking action items across meeting notes
- / Anyone needing AI-powered analysis of their Obsidian knowledge base
capabilities
- / Search notes with flexible filters by date, tags, folders, and content
- / Retrieve complete note content and metadata
- / Browse vault folder structure and note organization
- / Filter notes using regex patterns and complex queries
- / Analyze notes for incomplete sections and cross-references
- / Extract and consolidate information across multiple notes
what it does
Connects AI agents to your Obsidian vault through the Local REST API plugin for advanced note searching, content retrieval, and knowledge analysis workflows.
about
Obsidian Local REST API is a community-built MCP server published by j-shelfwood that provides AI assistants with tools and capabilities via the Model Context Protocol. Connect and manage Obsidian vaults with the Obsidian Local REST API for smarter note handling, semantic search, and seam It is categorized under productivity.
how to install
You can install Obsidian Local REST API in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
MIT
Obsidian Local REST API is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
readme
Obsidian Local REST API MCP Server
An AI-Native MCP (Model Context Protocol) server that provides intelligent, task-oriented tools for interacting with Obsidian vaults through a local REST API.
🧠 AI-Native Design Philosophy
This MCP server has been redesigned following AI-Native principles rather than simple API-to-tool mapping. Instead of exposing low-level CRUD operations, it provides high-level, task-oriented tools that LLMs can reason about more effectively.
Before vs After: The Transformation
| Old Approach (CRUD-Based) | New Approach (AI-Native) | Why Better |
|---|---|---|
list_files (returns everything) | list_directory(path, limit, offset) | Prevents context overflow with pagination |
create_file + update_file | write_file(path, content, mode) | Single tool handles create/update/append |
create_note + update_note | create_or_update_note(path, content, frontmatter) | Intelligent upsert removes decision complexity |
search_notes(query) | search_vault(query, scope, path_filter) | Precise, scopeable search with advanced filtering |
| (no equivalent) | get_daily_note(date) | High-level abstraction for common workflow |
| (no equivalent) | get_recent_notes(limit) | Task-oriented recent file access |
| (no equivalent) | find_related_notes(path, on) | Conceptual relationship discovery |
🛠 Available Tools
Directory & File Operations
list_directory
Purpose: List directory contents with pagination to prevent context overflow
{
"path": "Projects/",
"recursive": false,
"limit": 20,
"offset": 0
}
AI Benefit: LLM can explore vault structure incrementally without overwhelming context
read_file
Purpose: Read content of any file in the vault
{"path": "notes/meeting-notes.md"}
write_file
Purpose: Write file with multiple modes - replaces separate create/update operations
{
"path": "notes/summary.md",
"content": "# Meeting Summary
...",
"mode": "append" // "overwrite", "append", "prepend"
}
AI Benefit: Single tool handles all write scenarios, removes ambiguity
delete_item
Purpose: Delete any file or directory
{"path": "old-notes/"}
AI-Native Note Operations
create_or_update_note
Purpose: Intelligent upsert - creates if missing, updates if exists
{
"path": "daily/2024-12-26",
"content": "## Tasks
- Review AI-native MCP design",
"frontmatter": {"tags": ["daily", "tasks"]}
}
AI Benefit: Eliminates "does this note exist?" decision tree
get_daily_note
Purpose: Smart daily note retrieval with common naming patterns
{"date": "today"} // or "yesterday", "2024-12-26"
AI Benefit: Abstracts file system details and naming conventions
get_recent_notes
Purpose: Get recently modified notes
{"limit": 5}
AI Benefit: Matches natural "what did I work on recently?" queries
Advanced Search & Discovery
search_vault
Purpose: Multi-scope search with advanced filtering
{
"query": "machine learning",
"scope": ["content", "filename", "tags"],
"path_filter": "research/"
}
AI Benefit: Precise, targeted search reduces noise
find_related_notes
Purpose: Discover conceptual relationships between notes
{
"path": "ai-research.md",
"on": ["tags", "links"]
}
AI Benefit: Enables relationship-based workflows and serendipitous discovery
Legacy Tools (Backward Compatibility)
The server maintains backward compatibility with existing tools like get_note, list_notes, get_metadata_keys, etc.
Prerequisites
- Node.js 18+ or Bun runtime
- Obsidian Local REST API running locally (default: http://obsidian-local-rest-api.test)
Installation
Using npx (Recommended)
npx obsidian-local-rest-api-mcp
From Source
# Clone the repository
git clone https://github.com/j-shelfwood/obsidian-local-rest-api-mcp.git
cd obsidian-local-rest-api-mcp
# Install dependencies with bun
bun install
# Build the project
bun run build
Configuration
Set environment variables for API connection:
export OBSIDIAN_API_URL="http://obsidian-local-rest-api.test" # Default URL (or http://localhost:8000 for non-Valet setups)
export OBSIDIAN_API_KEY="your-api-key" # Optional bearer token
Usage
Running the Server
# Development mode with auto-reload
bun run dev
# Production mode
bun run start
# Or run directly
node build/index.js
MCP Client Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"obsidian-vault": {
"command": "npx",
"args": ["obsidian-local-rest-api-mcp"],
"env": {
"OBSIDIAN_API_URL": "http://obsidian-local-rest-api.test",
"OBSIDIAN_API_KEY": "your-api-key-if-needed"
}
}
}
}
VS Code with MCP Extension
Use the included .vscode/mcp.json configuration file.
Development
# Watch mode for development
bun run dev
# Build TypeScript
bun run build
# Type checking
bun run tsc --noEmit
Architecture
- ObsidianApiClient - HTTP client wrapper for REST API endpoints
- ObsidianMcpServer - MCP server implementation with tool handlers
- Configuration - Environment-based configuration with validation
Error Handling
The server includes comprehensive error handling:
- API connection failures
- Invalid tool parameters
- Network timeouts
- Authentication errors
Errors are returned as MCP tool call responses with descriptive messages.
Debugging
Enable debug logging by setting environment variables:
export DEBUG=1
export NODE_ENV=development
Server logs are written to stderr to avoid interfering with MCP protocol communication on stdout.
Troubleshooting
MCP Server Fails to Start
If your MCP client shows "Start Failed" or similar errors:
-
Test the server directly:
npx obsidian-local-rest-api-mcp --versionShould output the version number.
-
Test MCP protocol:
# Run our test script node -e " const { spawn } = require('child_process'); const child = spawn('npx', ['obsidian-local-rest-api-mcp'], { stdio: ['pipe', 'pipe', 'pipe'] }); child.stdout.on('data', d => console.log('OUT:', d.toString())); child.stderr.on('data', d => console.log('ERR:', d.toString())); setTimeout(() => { child.stdin.write(JSON.stringify({jsonrpc:'2.0',id:1,method:'initialize',params:{protocolVersion:'2024-11-05',capabilities:{},clientInfo:{name:'test',version:'1.0.0'}}})+'
'); setTimeout(() => child.kill(), 2000); }, 500); "
Should show initialization response.
3. **Check Environment Variables**:
- Ensure `OBSIDIAN_API_URL` points to a running Obsidian Local REST API
- Test the API directly: `curl http://obsidian-local-rest-api.test/api/files` (or your configured API URL)
4. **Verify Obsidian Local REST API**:
- Install and run [Obsidian Local REST API](https://github.com/j-shelfwood/obsidian-local-rest-api)
- Confirm it's accessible on the configured port
- Check if authentication is required
### Common Issues
**"Command not found"**: Make sure Node.js/npm is installed and npx is available
**"Connection refused"**: Obsidian Local REST API is not running or wrong URL
**Laravel Valet .test domains**: If using Laravel Valet, ensure your project directory name matches the .test domain (e.g., `obsidian-local-rest-api.test` for a project in `/obsidian-local-rest-api/`)
**"Unauthorized"**: Check if API key is required and properly configured
**"Timeout"**: Increase timeout in client configuration or check network connectivity
### Cherry Studio Configuration
For Cherry Studio, use these exact settings:
- **Name**: `obsidian-vault` (or any name you prefer)
- **Type**: `Standard Input/Output (stdio)`
- **Command**: `npx`
- **Arguments**: `obsidian-local-rest-api-mcp`
- **Environment Variables**:
- `OBSIDIAN_API_URL`: Your API URL (e.g., `http://obsidian-local-rest-api.test` for Laravel Valet)
- `OBSIDIAN_API_KEY`: Optional API key if authentication is required
- **Environment Variables**:
- `OBSIDIAN_API_URL`: `http://obsidian-local-rest-api.test` (or your API URL)
- `OBSIDIAN_API_KEY`: `your-api-key` (if required)
## Contributing
1. Fork the repository
2. Create a feature branch
3. Make changes with proper TypeScript types
4. Test with your Obsidian vault
5. Submit a pull request
## License
MIT
FAQ
- What is the Obsidian Local REST API MCP server?
- Obsidian Local REST API is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for Obsidian Local REST API?
- This profile displays 10 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
Ratings
4.5★★★★★10 reviews- ★★★★★Shikha Mishra· Oct 10, 2024
Obsidian Local REST API is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
- ★★★★★Piyush G· Sep 9, 2024
We evaluated Obsidian Local REST API against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Chaitanya Patil· Aug 8, 2024
Useful MCP listing: Obsidian Local REST API is the kind of server we cite when onboarding engineers to host + tool permissions.
- ★★★★★Sakshi Patil· Jul 7, 2024
Obsidian Local REST API reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Ganesh Mohane· Jun 6, 2024
I recommend Obsidian Local REST API for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
- ★★★★★Oshnikdeep· May 5, 2024
Strong directory entry: Obsidian Local REST API surfaces stars and publisher context so we could sanity-check maintenance before adopting.
- ★★★★★Dhruvi Jain· Apr 4, 2024
Obsidian Local REST API has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
- ★★★★★Rahul Santra· Mar 3, 2024
According to our notes, Obsidian Local REST API benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Pratham Ware· Feb 2, 2024
We wired Obsidian Local REST API into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Yash Thakker· Jan 1, 2024
Obsidian Local REST API is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.