Hi Obsidian Community!
https://github.com/PublikPrinciple/obsidian-mcp-rest
I’m working on implementing an MCP (Model Context Protocol) server that integrates with Obsidian’s Local REST API plugin. The goal is to allow AI assistants like Claude to interact directly with Obsidian vaults in a secure, local manner.
Project Overview
- GitHub Repository: GitHub - PublikPrinciple/obsidian-mcp-rest: An MCP server implementation for accessing Obsidian via local REST API
- Purpose: Enable AI assistants to read/write/search Obsidian notes through standardized MCP interface
- Current Status: Basic implementation with TypeScript compilation issues
Technical Details
The implementation uses:
- Node.js/TypeScript
- Obsidian Local REST API Plugin
- Standard MCP communication via stdin/stdout
Current Features:
- List vault notes
- Read note contents
- Write/update notes
- Search functionality
- Get note metadata
Current Issues
- TypeScript compilation errors relating to MCP type definitions
- Need guidance on best practices for Obsidian REST API integration
- Looking for input on security considerations when interfacing with Obsidian
Questions for the Community
- Has anyone implemented something similar using the Local REST API plugin?
- Are there specific Obsidian API considerations I should be aware of?
- Any recommendations for handling vault permissions safely?
- Looking for code review and security audit from experienced Obsidian plugin developers
How You Can Help
- Review the current implementation on GitHub
- Share experiences with Local REST API plugin
- Suggest improvements or best practices
- Help with TypeScript/Node.js implementation
Implementation Details
// Example of current tool implementation
export class ReadNoteTool extends BaseTool {
constructor(api: ObsidianAPI) {
super(
api,
'readNote',
'Read the contents of a specific note',
{
type: 'object',
required: ['path'],
properties: {
path: {
type: 'string',
description: 'Path to the note to read'
}
}
}
);
}
async execute(args: { path: string }): Promise<ToolResponse> {
const note = await this.api.readNote(args.path);
return {
content: [{
type: 'text',
text: note.content
}]
};
}
}