Skip to main content
Glama

A Model Context Protocol server for Obsidian integration

This is a TypeScript-based MCP server that implements integration with Obsidian. It demonstrates core MCP concepts by providing:

  • Resources representing Obsidian vault contents

  • Tools for accessing vault data

  • API integration with Obsidian

Project Statistics

  • Total lines of code: 345

  • Main files:

    • src/tool-handlers.ts (76 lines)

    • src/resource-handlers.ts (45 lines)

    • src/server.ts (32 lines)

    • src/api-client.ts (25 lines)

Directory Structure

obsidian-mcp/ ├── .codegpt/ │ └── head ├── src/ │ ├── api-client.ts │ ├── index.ts │ ├── resource-handlers.ts │ ├── server.ts │ └── tool-handlers.ts ├── .SourceSageignore ├── package.json ├── README.md └── tsconfig.json

Features

Resources

  • Access Obsidian server info via obsidian://server-info URI

  • Get vault contents with metadata

  • JSON format for easy integration

Tools

  • get_vault_contents - Retrieve contents of Obsidian vault

    • Takes path as optional parameter (default: root directory)

    • Returns structured JSON response

API Integration

  • Secure HTTPS connection with Obsidian API

  • Custom axios client with error handling

  • Windows path normalization support

Development

Prerequisites

  • Node.js v18+

  • TypeScript 5.3+

  • Obsidian API key (set as OBSIDIAN_API_KEY environment variable)

Setup

# Install dependencies npm install # Build the server npm run build # Start development server with auto-rebuild npm run watch

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "obsidian-mcp": { "command": "/path/to/obsidian-mcp/build/index.js", "env": { "OBSIDIAN_API_KEY": "your-api-key-here" } } } }

Debugging

We recommend using the MCP Inspector:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Dependencies

Runtime

  • @modelcontextprotocol/sdk: MCP server implementation

  • axios: HTTP client for API communication

Development

  • @types/node: TypeScript definitions for Node.js

  • typescript: TypeScript compiler

Deploy Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    This TypeScript-based MCP server enables users to manage a simple notes system with capabilities to create and summarize notes through structured prompts and resources.
    Last updated -
    2
    MIT License
    • Apple
  • -
    security
    -
    license
    -
    quality
    A TypeScript-based MCP server that implements a simple notes system, enabling users to manage text notes with creation and summarization functionalities through structured prompts.
  • A
    security
    F
    license
    A
    quality
    A TypeScript-based MCP server that implements a simple notes system, allowing users to create, access, and generate summaries of text notes.
    Last updated -
    12
    3
    • Apple
  • A
    security
    F
    license
    A
    quality
    A TypeScript-based MCP server that implements a simple notes system, allowing users to create, access, and generate summaries of text notes.
    Last updated -
    2
    2
    • Apple

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sunwood-ai-labs/obsidian-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server