Files
obsidian-mcp-server/.windsurf/rules/file-organization.md
Bill 08cc6e9ea6 Release v1.0.0 - Initial Release
🎉 Initial release of Obsidian MCP Server plugin

Core Features:
- MCP server implementation with HTTP transport
- JSON-RPC 2.0 message handling
- Protocol version 2024-11-05 support

MCP Tools:
- read_note, create_note, update_note, delete_note
- search_notes, list_notes, get_vault_info

Server Features:
- Configurable HTTP server (default port: 3000)
- Health check and MCP endpoints
- Auto-start option

Security:
- Origin header validation (DNS rebinding protection)
- Optional Bearer token authentication
- CORS configuration

UI:
- Settings panel with full configuration
- Status bar indicator and ribbon icon
- Start/Stop/Restart commands

Documentation:
- Comprehensive README with examples
- Quick Start Guide and Implementation Summary
- Test client script
2025-10-16 20:52:52 -04:00

1.3 KiB

trigger, description
trigger description
always_on File and folder organization conventions

File & Folder Organization

Core Principles

  • Organize code into multiple files: Split functionality across separate modules rather than putting everything in main.ts
  • Keep main.ts minimal: Focus only on plugin lifecycle (onload, onunload, addCommand calls)
  • Split large files: If any file exceeds ~200-300 lines, break it into smaller, focused modules
  • Use clear module boundaries: Each file should have a single, well-defined responsibility
src/
  main.ts           # Plugin entry point, lifecycle management only
  settings.ts       # Settings interface and defaults
  commands/         # Command implementations
    command1.ts
    command2.ts
  ui/              # UI components, modals, views
    modal.ts
    view.ts
  utils/           # Utility functions, helpers
    helpers.ts
    constants.ts
  types.ts         # TypeScript interfaces and types

Best Practices

  • Source lives in src/
  • Keep the plugin small - avoid large dependencies
  • Prefer browser-compatible packages
  • Generated output should be placed at the plugin root or dist/ depending on build setup
  • Release artifacts must end up at the top level of the plugin folder (main.js, manifest.json, styles.css)