New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@hiveforge/hivemind-mcp

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hiveforge/hivemind-mcp

MCP server for Obsidian worldbuilding vaults - provides AI tools with consistent canonical context

Source
npmnpm
Version
3.3.1
Version published
Weekly downloads
15
-61.54%
Maintainers
1
Weekly downloads
 
Created
Source

Hivemind

Hivemind MCP Server

NPM Version Build Status Release codecov License: MIT GitHub issues GitHub stars

A domain-agnostic MCP (Model Context Protocol) server for Obsidian vaults that provides AI tools with consistent, structured context from your knowledge base.

The AI Memory Firewall: Hivemind's core value isn't just better answers — it's preventing AI from inventing context. Your knowledge graph becomes a truth anchor that keeps AI grounded in facts you control.

What is Hivemind?

Hivemind bridges your Obsidian vault and AI tools (Claude, ComfyUI, etc.) via the Model Context Protocol. With pluggable templates, it supports multiple domains out of the box:

  • Worldbuilding — Characters, Locations, Events, Factions, Lore, Assets
  • Research — Papers, Citations, Concepts, Notes
  • People Management — People, Goals, Teams, 1:1 Meetings
  • Software Architecture — Systems, Components, ADRs, Constraints (community)
  • UX Research — Interviews, Insights, Hypotheses, Personas (community)

Or define your own custom entity types via config.json — no code required.

Features

  • Pluggable Templates: Built-in templates for worldbuilding, research, people management, and software architecture — or define your own
  • HybridRAG Search: Combines vector, graph, and keyword search for accurate context retrieval
  • Obsidian Native: Works with standard markdown, YAML frontmatter, and wikilinks
  • Custom Relationships: Define relationship types per template with bidirectionality and validation
  • Asset Provenance: Track AI-generated images and their generation settings
  • Local-First: Your data stays on your machine — critical for sensitive domains like people management and architecture decisions
  • Canon Management: Draft → Pending → Canon approval workflow with consistency validation
  • High Performance: <300ms query latency, supports 1000+ note vaults

Canon Workflow: Not Just for Fiction

The canon workflow applies far beyond worldbuilding:

DomainWhat Gets Canon Status
WorldbuildingApproved lore, character facts, timeline events
ArchitectureAccepted ADRs, design decisions, constraints
BrandVoice guidelines, approved messaging, visual identity
SecurityApproved policies, access controls, compliance rules
People ManagementFinalized goals, approved team structures

AI that references non-canon content gets flagged. AI that violates canon constraints gets corrected. This is governance without meetings.

Quick Start

Installation

# Install globally
npm install -g @hiveforge/hivemind-mcp

# Or use with npx (no installation needed)
npx @hiveforge/hivemind-mcp init

Setup

# Interactive setup - creates config.json
npx @hiveforge/hivemind-mcp init

# Validate your configuration
npx @hiveforge/hivemind-mcp validate

# Start the server
npx @hiveforge/hivemind-mcp start

# Or start with a specific vault path (no config needed)
npx @hiveforge/hivemind-mcp --vault /path/to/vault
npx @hiveforge/hivemind-mcp --vault .  # Use current directory

Configuration for MCP Clients

Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "hivemind": {
      "command": "npx",
      "args": ["-y", "@hiveforge/hivemind-mcp", "start"]
    }
  }
}

Claude Desktop with vault override:

{
  "mcpServers": {
    "hivemind": {
      "command": "npx",
      "args": ["-y", "@hiveforge/hivemind-mcp", "--vault", "C:\\Path\\To\\Your\\Vault"]
    }
  }
}

GitHub Copilot (~/.copilot/mcp-config.json):

{
  "mcpServers": {
    "hivemind": {
      "type": "local",
      "command": "npx",
      "args": ["-y", "@hiveforge/hivemind-mcp", "start"],
      "tools": ["*"]
    }
  }
}

Manual Configuration

If you prefer to configure manually, create a config.json:

{
  "vault": {
    "path": "/path/to/your/obsidian/vault",
    "watchForChanges": true,
    "debounceMs": 100
  },
  "server": {
    "transport": "stdio"
  },
  "template": {
    "activeTemplate": "worldbuilding"
  },
  "indexing": {
    "strategy": "incremental",
    "batchSize": 100,
    "enableVectorSearch": false,
    "enableFullTextSearch": true
  }
}

Choosing a Template

Set activeTemplate to one of the built-in or community templates:

TemplateUse CaseEntity Types
worldbuildingFiction writers, game mastersCharacters, Locations, Events, Factions, Lore, Assets, References
researchAcademics, knowledge workersPapers, Citations, Concepts, Notes
people-managementManagers, team leadsPeople, Goals, Teams, 1:1 Meetings
software-architectureEngineers, architectsSystems, Components, Decisions (ADRs), Constraints, Interfaces
ux-researchUX researchers, product teamsInterviews, Insights, Hypotheses, Personas, Experiments

Custom Templates

Define custom entity types directly in your config.json:

{
  "template": {
    "activeTemplate": "my-template",
    "templates": [{
      "id": "my-template",
      "name": "My Custom Template",
      "version": "1.0.0",
      "entityTypes": [{
        "name": "project",
        "displayName": "Project",
        "pluralName": "Projects",
        "fields": [
          { "name": "title", "type": "string", "required": true },
          { "name": "deadline", "type": "date" },
          { "name": "priority", "type": "enum", "enumValues": ["low", "medium", "high"] }
        ]
      }],
      "relationshipTypes": [{
        "id": "depends_on",
        "displayName": "Depends On",
        "sourceTypes": ["project"],
        "targetTypes": ["project"],
        "bidirectional": true,
        "reverseId": "blocks"
      }]
    }]
  }
}

See samples/ for complete example vaults for each template.

CLI Template Tools

Create, manage, and validate templates using the command line:

# List available templates (built-in + community)
npx @hiveforge/hivemind-mcp list-templates

# Add a template from the registry, URL, or local file
npx @hiveforge/hivemind-mcp add-template software-architecture
npx @hiveforge/hivemind-mcp add-template https://example.com/template.json
npx @hiveforge/hivemind-mcp add-template ./my-template.json

# Interactive template creation wizard
npx @hiveforge/hivemind-mcp create-template

# Validate a template file
npx @hiveforge/hivemind-mcp validate-template template.json

# Check template compatibility with your Hivemind version
npx @hiveforge/hivemind-mcp check-compatibility
npx @hiveforge/hivemind-mcp check-compatibility software-architecture

# Generate template catalog JSON (for documentation sites)
npx @hiveforge/hivemind-mcp generate-catalog

Want to contribute a template? See CONTRIBUTING_TEMPLATES.md.

Architecture

Obsidian Vault → File Watcher → Markdown Parser → Knowledge Graph
                                                         ↓
                                     ┌───────────────────┴─────────────────┐
                                     │                                     │
                              Full-Text Index                      Vector Index
                                 (SQLite)                            (FAISS)
                                     │                                     │
                                     └───────────────────┬─────────────────┘
                                                         ↓
                                                  HybridRAG Router
                                                         ↓
                                                    MCP Server
                                                         ↓
                                              AI Clients (Claude, etc.)

Development Status

Current: v2.1 Community Templates Complete ✅

v2.1 — Community Templates (Complete)

  • CLI tools: create-template, validate-template, add-template, list-templates
  • Community templates: software-architecture, ux-research
  • Enhanced metadata: category, tags, author, repository, license
  • Template catalog generation for docs sites
  • Version compatibility checking with minHivemindVersion
  • Template contribution guide

v2.0 — Template System (Complete)

Hivemind is now domain-agnostic with pluggable templates:

  • Template registry with config-driven entity definitions
  • Dynamic Zod schema generation from config
  • Auto-generated MCP tools per entity type (query_<type>, list_<type>)
  • Worldbuilding template extraction (backwards compatible)
  • Custom relationship types per template with validation
  • Built-in templates: worldbuilding, research, people-management
  • Sample vaults for each template

v1.0 — MVP + Core Features (Shipped)

  • MCP server with hybrid search (vector, graph, keyword)
  • Vault templates for all entity types (Character, Location, Event, Faction, Lore, Asset)
  • Canon workflow tools (status management, consistency validation)
  • Asset management with full provenance tracking
  • ComfyUI integration with workflow management
  • Obsidian plugin with image generation
  • CI/CD with semantic-release and CodeQL scanning

Coming Soon

  • Obsidian community plugin submission
  • Timeline queries with date range filtering
  • Web-based template builder

MCP Tools

Dynamic Entity Tools (Auto-Generated)

Tools are automatically generated for each entity type defined in the active template:

Tool PatternDescription
query_<type>Get entity by ID/name with relationships and content
list_<type>List all entities of type with optional filters

Built-in and community template tools:

TemplateGenerated Tools
worldbuildingquery_character, query_location, query_event, query_faction, query_lore, query_asset, query_reference + list variants
researchquery_paper, query_citation, query_concept, query_note + list variants
people-managementquery_person, query_goal, query_team, query_one_on_one + list variants
software-architecturequery_system, query_component, query_decision, query_constraint, query_interface + list variants
ux-researchquery_interview, query_insight, query_hypothesis, query_persona, query_experiment + list variants
ToolDescription
search_vaultHybrid search across all content with type/status filters

Asset Management

ToolDescription
store_assetStore generated image with provenance metadata
query_assetGet asset with generation settings
list_assetsFilter assets by entity, type, status, workflow

Canon Workflow

ToolDescription
get_canon_statusList entities grouped by status (draft/pending/canon)
submit_for_reviewMove entity from draft to pending review
validate_consistencyCheck for broken links, duplicates, conflicts

ComfyUI Integration (when enabled)

ToolDescription
store_workflowSave ComfyUI workflow to vault
list_workflowsBrowse saved workflows
get_workflowRetrieve workflow by ID
generate_imageGenerate image with vault context injection

Utility

ToolDescription
rebuild_indexForce complete re-index of vault
get_vault_statsVault statistics and token savings metrics

Documentation

License

MIT

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Important: This project uses Conventional Commits. Commit messages must follow the format:

<type>: <description>

[optional body]

[optional footer]

Common types: feat, fix, docs, style, refactor, test, chore

Example: feat: add pagination support to search results

Keywords

mcp

FAQs

Package last updated on 28 Jan 2026

Related posts