### Install Dependencies and Run Development Build Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/obsidian-plugin/README.md Commands to install project dependencies and start a development build with watch mode. ```bash bun install bun run dev ``` -------------------------------- ### Clone and Setup Project Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/CONTRIBUTING.md Clone the repository and install project dependencies using Bun. Ensure you have Bun and Git installed. ```bash git clone https://github.com/jacksteamdev/obsidian-mcp-tools.git cd obsidian-mcp-tools bun install ``` -------------------------------- ### Start Svelte Development Server Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/test-site/README.md Run 'npm run dev' to start the development server after installing dependencies. Use '-- --open' to automatically open the app in a new browser tab. ```bash npm run dev # or start the server and open the app in a new browser tab npm run dev -- --open ``` -------------------------------- ### Install and Build MCP Server Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/mcp-server/README.md Install dependencies and build the server using bun. ```bash bun install bun run build ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/shared/README.md Use this command to install project dependencies. Ensure Bun is installed on your system. ```bash bun install ``` -------------------------------- ### Run Project with Bun Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/shared/README.md Execute the main script of the project using Bun. This command starts the application. ```bash bun run index.ts ``` -------------------------------- ### Run Development and Build Commands Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/CONTRIBUTING.md Commands to run the development server with watch mode, create a production build, or execute tests. Requires Bun to be installed. ```bash bun run dev # Development mode with watch bun run build # Production build bun test # Run tests ``` -------------------------------- ### Run Development Server with Bun Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/README.md Starts the development server using Bun. This is typically used for active development and hot-reloading. ```bash bun run dev ``` -------------------------------- ### Feature Setup Function Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/docs/project-architecture.md Each feature exports an asynchronous setup function that takes the plugin instance, handles dependency checks, initializes services, and registers event handlers. It returns a success status or an error reason. ```typescript export async function setup(plugin: Plugin): Promise { // Check dependencies // Initialize services // Register event handlers return { success: true } || { success: false, error: "reason" }; } ``` -------------------------------- ### Install GitHub CLI Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/README.md Installs the GitHub CLI tool, which is required for verifying MCP server binaries. Choose the command appropriate for your operating system. ```bash # macOS (Homebrew) brew install gh ``` ```bash # Windows (Scoop) scoop install gh ``` ```bash # Linux sudo apt install gh # Debian/Ubuntu ``` -------------------------------- ### Run Unit and Integration Tests Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/CONTRIBUTING.md Execute unit tests using `bun test`. For integration testing, set up a local Obsidian vault, install the plugin locally, and test the MCP server connection with Claude Desktop to verify end-to-end functionality. ```bash # Unit tests bun test # Integration testing with local vault # 1. Set up test Obsidian vault # 2. Install plugin locally: `bun run build:plugin` # 3. Test MCP server connection with Claude Desktop # 4. Verify all features work end-to-end ``` -------------------------------- ### Svelte Component Structure for Settings UI Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/docs/features/mcp-server-install.md This Svelte component structure sets up the basic layout for the plugin's settings tab, including script imports for state management and placeholders for dynamic content related to installation status, dependencies, and external links. ```svelte
``` -------------------------------- ### Create a New Svelte Project Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/test-site/README.md Use 'npx sv create' to initialize a new Svelte project. Specify a directory name to create the project in a subdirectory. ```bash npx sv create # create a new project in my-app npx sv create my-app ``` -------------------------------- ### Project Structure Overview Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/obsidian-plugin/README.md Illustrates the directory structure of the Obsidian plugin project, highlighting feature modules and entry points. ```bash src/ ├── features/ # Feature modules │ ├── core/ # Plugin initialization │ ├── mcp-server/ # Server management │ └── shared/ # Common utilities ├── main.ts # Plugin entry point └── shared/ # Shared types and utilities ``` -------------------------------- ### Create Production Build and Link Plugin Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/obsidian-plugin/README.md Commands to create a production build of the plugin and link it to a local Obsidian vault for testing. ```bash bun run build bun run link ``` -------------------------------- ### Build Svelte Project for Production Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/test-site/README.md Execute 'npm run build' to generate a production-ready version of your Svelte application. ```bash npm run build ``` -------------------------------- ### Build All Packages with Bun Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/README.md Builds all packages within the monorepo using the Bun runtime. This command compiles the project for distribution. ```bash bun run build ``` -------------------------------- ### Development Commands for MCP Server Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/mcp-server/README.md Commands for running the development server, tests, building for all platforms, and using the MCP Inspector for debugging. ```bash # Start development server with auto-reload bun run dev # Run tests bun test # Build for all platforms bun run build:all # Use MCP Inspector for debugging bun run inspector ``` -------------------------------- ### Verify MCP Server Binary with SLSA Provenance Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/mcp-server/README.md Verify the integrity and origin of a server binary using the GitHub CLI's attestation verification command. ```bash gh attestation verify --owner jacksteamdev ``` -------------------------------- ### Run Tests with Bun Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/README.md Executes all project tests using the Bun test runner. This command should be run before submitting changes. ```bash bun test ``` -------------------------------- ### Verify Binary Authenticity with GH Attestation Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/SECURITY.md Use this command to verify the authenticity of downloaded binaries using GitHub's attestation tools. Ensure you replace `` with the actual path to the binary file. ```bash gh attestation verify --owner jacksteamdev ``` -------------------------------- ### Configure MCP Server in Claude Desktop Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/packages/mcp-server/README.md Configure the MCP server in Claude Desktop's config file, specifying the command path and environment variables like the API key. ```json // ~/Library/Application Support/Claude/claude_desktop_config.json { "mcpServers": { "obsidian-mcp-tools": { "command": "/path/to/mcp-server", "env": { "OBSIDIAN_API_KEY": "your-api-key" } } } } ``` -------------------------------- ### Version Bumping for Releases Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/CONTRIBUTING.md Command to bump the project version, which automatically updates package.json, manifest.json, and versions.json. This also creates a git commit and tag, and pushes to GitHub. Requires Bun. ```bash bun run version [patch|minor|major] ``` -------------------------------- ### Verify MCP Server Binary Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/README.md Verifies the integrity and provenance of an MCP server binary using the GitHub CLI and SLSA Provenance attestations. Replace `` with the actual path or URL of the binary. ```bash gh attestation verify --owner jacksteamdev ``` -------------------------------- ### Feature File Structure Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/docs/features/mcp-server-install.md The feature follows a modular structure with distinct directories for components, services, stores, and utilities. ```tree src/features/mcp-server-install/ ├── components/ # Svelte components │ └── SettingsTab.svelte ├── services/ # Core functionality │ ├── config.ts # Claude config management │ ├── download.ts # Binary download │ ├── status.ts # Installation status │ └── uninstall.ts # Cleanup operations ├── stores/ # Svelte stores │ ├── status.ts # Installation status store │ └── dependencies.ts # Dependencies status store ├── utils/ # Shared utilities │ └── openFolder.ts ├── constants.ts # Configuration ├── types.ts # Type definitions └── index.ts # Feature setup & component export ``` -------------------------------- ### Add Prompt Execution Endpoint to Obsidian Plugin Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/docs/features/prompt-requirements.md Adds a new POST route to the local REST API for executing prompts. Ensure Templater API is loaded if needed for prompt execution. ```typescript export const loadTemplaterAPI = loadPluginAPI( () => app.plugins.plugins["templater-obsidian"]?.templater ); // Add to main.ts this.localRestApi .addRoute("/prompts/execute") .post(this.handlePromptExecution.bind(this)); ``` -------------------------------- ### Plugin Structure Reorganization Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/docs/migration-plan.md Outlines the new directory structure for the Obsidian plugin package, organizing features into distinct modules. ```tree packages/obsidian-plugin/ ├── src/ │ ├── features/ │ │ ├── core/ │ │ │ ├── components/ │ │ │ ├── services/ │ │ │ ├── types.ts │ │ │ └── index.ts │ │ ├── mcp-server-install/ │ │ │ ├── components/ │ │ │ ├── services/ │ │ │ │ └── download.ts │ │ │ ├── types.ts │ │ │ └── index.ts │ │ ├── mcp-server-prompts/ │ │ │ ├── components/ │ │ │ ├── services/ │ │ │ ├── types.ts │ │ │ └── index.ts │ │ └── smart-search/ │ │ ├── components/ │ │ ├── services/ │ │ ├── types.ts │ │ └── index.ts │ └── main.ts ``` -------------------------------- ### Update OpenAPI Specification for Prompt Execution Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/docs/features/prompt-requirements.md Documents the new `/prompts/execute` POST endpoint in the OpenAPI specification. This includes request body schema and response descriptions. ```yaml /prompts/execute: post: summary: Execute a prompt template requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ExecutePromptParams" responses: 200: description: Prompt executed successfully content: text/plain: schema: type: string ``` -------------------------------- ### Define Prompt Metadata and Execution Schemas Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/docs/features/prompt-requirements.md Defines the TypeScript interfaces for prompt metadata and execution parameters. Use these to structure prompt data and API requests. ```typescript interface PromptMetadata { name: string; description?: string; arguments?: { name: string; description?: string; required?: boolean; }[]; } interface ExecutePromptParams { name: string; arguments: Record; createFile?: boolean; targetPath?: string; } ``` -------------------------------- ### Shared Package Structure Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/docs/migration-plan.md Defines the directory structure for the shared package, including types, utilities, and constants. ```tree packages/shared/ ├── src/ │ ├── types/ │ │ ├── settings.ts # Base settings interface │ │ ├── plugin.ts # Plugin-related types │ │ └── server.ts # Server-related types │ ├── utils/ │ │ ├── logger.ts # Shared logging utilities │ │ └── version.ts # Version management utilities │ └── constants/ └── config.ts # Shared configuration constants ``` -------------------------------- ### Claude Configuration JSON Structure Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/docs/features/mcp-server-install.md This JSON structure defines how the MCP server is configured within the Claude Desktop application. It specifies the command to run the executable and environment variables, including the Obsidian API key. ```json { "mcpServers": { "obsidian-mcp-tools": { "command": "(absolute path to executable)", "env": { "OBSIDIAN_API_KEY": "(stored api key)" } } } } ``` -------------------------------- ### Server Structure Reorganization Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/docs/migration-plan.md Defines the reorganized directory structure for the MCP server package, categorizing functionalities into features. ```tree packages/mcp-server/ ├── src/ │ ├── features/ │ │ ├── core/ │ │ │ ├── services/ │ │ │ │ └── server.ts │ │ │ ├── types.ts │ │ │ └── index.ts │ │ ├── prompts/ │ │ │ ├── services/ │ │ │ ├── types.ts │ │ │ └── index.ts │ │ └── tools/ │ │ ├── services/ │ │ ├── types.ts │ │ └── index.ts │ └── index.ts ``` -------------------------------- ### Extend Obsidian Plugin Settings Interface Source: https://github.com/jacksteamdev/obsidian-mcp-tools/blob/main/docs/project-architecture.md Use TypeScript module augmentation to extend the McpToolsPluginSettings interface for type-safe access to feature-specific settings via loadData() and saveData(). ```typescript // packages/obsidian-plugin/src/types.ts declare module "obsidian" { interface McpToolsPluginSettings { version?: string; } interface Plugin { loadData(): Promise; saveData(data: McpToolsPluginSettings): Promise; } } ``` ```typescript // packages/obsidian-plugin/src/features/some-feature/types.ts declare module "obsidian" { interface McpToolsPluginSettings { featureName?: { setting1?: string; setting2?: boolean; }; } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.