personal-mcp

sytone/personal-mcp

3.2

If you are the rightful owner of personal-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

A C# implementation of an MCP server for managing Obsidian vaults using AI assistants.

Tools
8
Resources
0
Prompts
0

Personal MCP Server

A C# implementation of an MCP (Model Context Protocol) server for interacting with Obsidian vaults. Built with the official ModelContextProtocol C# SDK, this server provides comprehensive tools for managing notes, links, tags, and more through AI assistants.

NuGet Version NuGet Downloads

Original Inspiration: https://github.com/that0n3guy/ObsidianPilot

Quick Start

If you have dotnet 10.x or later installed, you can run the MCP server directly using dnx:

dnx Sytone.Personal.Mcp@0.4.0 --yes

If you want to run from source clone this repository.

  • Set OBSIDIAN_VAULT_PATH to your vault directory
  • Run: dotnet run --project src/Personal.Mcp
  • Add to your MCP client as a stdio server command
$env:OBSIDIAN_VAULT_PATH = "C:\path\to\your\vault"
dotnet run --project src/Personal.Mcp

Adding to Visual Studio Code

To use this MCP server with GitHub Copilot in VS Code:

  1. Build the project (optional, for better performance):

    dotnet build src/Personal.Mcp/Personal.Mcp.csproj
    
  2. Add to VS Code settings:

    • Open VS Code settings (File → Preferences → Settings or Ctrl+,)
    • Search for "MCP" or navigate to Extensions → GitHub Copilot → Model Context Protocol Servers
    • Click "Edit in settings.json"
  3. Add the server configuration:

    {
      "github.copilot.chat.mcp.servers": {
        "personal-mcp": {
          "command": "dotnet",
          "args": [
            "run",
            "--project",
            "${workspaceFolder}\\src\\Personal.Mcp\\Personal.Mcp.csproj"
          ],
          "env": {
            "OBSIDIAN_VAULT_PATH": "C:\\path\\to\\your\\vault"
          }
        }
      }
    }
    

    Or if you built the project, use the compiled executable for faster startup:

    {
      "github.copilot.chat.mcp.servers": {
        "personal-mcp": {
          "command": "dotnet",
          "args": [
            "${workspaceFolder}\\src\\Personal.Mcp\\bin\\Debug\\net9.0\\Personal.Mcp.dll"
          ],
          "env": {
            "OBSIDIAN_VAULT_PATH": "C:\\path\\to\\your\\vault"
          }
        }
      }
    }
    
  4. Restart VS Code to load the MCP server if you have issues.

  5. Verify: Open GitHub Copilot Chat and try using Obsidian-related commands. The server tools should now be available.

Note: Replace the paths with your actual repository and vault locations.

Available Tools

  • Notes: read_note, create_note (with template support), update_note, edit_note_content, edit_note_section, delete_note
  • Journal: read_journal_entries, add_journal_entry (with automatic templating), add_journal_task
  • Organization: list_notes, list_folders, create_folder
  • Move/Rename: move_note (basic wiki link update), rename_note (basic wiki link update), move_folder
  • Tags: list_tags, add_tags, update_tags, remove_tags
  • Search: search_notes (FTS5), search_by_regex, search_by_date
  • Links: get_outgoing_links, get_backlinks, find_broken_links
  • Images: read_image, view_note_images
  • Properties: get_note_info, get_frontmatter, set_property, set_property_list, remove_property, search_by_property
  • Date Utilities: calculate_relative_date, get_date_info, get_week_dates
  • Templates: Full Liquid template support for dynamic note and journal creation

Features

Templating Support

Create standardized notes and journal entries using Liquid template syntax:

  • Dynamic Variables: Pass context data for variable substitution
  • Conditionals & Loops: Use {% if %} and {% for %} for complex templates
  • Default Templates: Pre-configured templates for journals and notes
  • Custom Templates: Create your own templates with full Liquid syntax support

Example:

---
title: {{title}}
created: {{created_date}}
tags: [{{tags}}]
---

# {{title}}

{% if description %}
{{description}}
{% endif %}

{% for task in tasks %}
- [ ] {{task}}
{% endfor %}

See for comprehensive documentation and examples.

Implementation Notes

  • Link rewrite currently updates [[Title]] links by filename only; it does not rewrite path links or handle aliases comprehensively.
  • YAML writing uses a simple serializer; quoting/multi-line/ordering/comments are not preserved.
  • Backlink and broken link detection are heuristic and filename-based.
  • Index updates happen when search is invoked; not yet reactive to file edits/moves.