MCP server that bridges Obsidian vaults with AI assistants.
mindcache/
├── packages/
│ ├── server/ # MCP server (npm package: mindcache)
│ └── website/ # Landing page (usemindcache.com)
├── package.json # Root workspace config
└── pnpm-workspace.yaml
- Entry:
src/cli.ts— CLI + MCP server startup - Server:
src/server.ts— MCP server creation, tool/resource registration - Obsidian Client:
src/obsidian.ts— Direct filesystem client for Obsidian vaults (no plugin required) - Config:
src/config.ts— Configuration loading from YAML/env vars - Templates:
src/templates.ts— Note template engine - Tools:
src/tools/— 44 MCP tools organized by category (find, read, remember, journal, write, connect, organize, understand, tasks, vault) - Resources:
src/resources/— 4 MCP resources (vault://today, vault://recent, vault://tags, vault://context)
# Build
pnpm build # Build all packages
pnpm --filter server build
# Type check
pnpm --filter server lint
# Test
pnpm --filter server test
# Dev
pnpm --filter server dev # Watch mode
pnpm --filter website dev # Website dev server- TypeScript, ESM-only
- MCP SDK v1.x (
@modelcontextprotocol/sdk) - Zod for schema validation
- tsup for building
- Vitest for testing
- Astro + Tailwind for website
- Logging: Always use
process.stderr.write(), neverconsole.log - Error handling: Return
{ content: [...], isError: true }for tool errors - Tool signatures:
(server: McpServer, client: ObsidianClient, config: MindCacheConfig) => void - Config: Support both YAML file and environment variables
- Templates: Mustache-style
{{variable}}placeholders
@modelcontextprotocol/sdkis imported from subpaths:server/mcp.js,server/stdio.js- All tool files must use
_configprefix for unused config parameters (strict mode) - The server reads the vault directly from the filesystem — no Obsidian plugins required