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
This commit is contained in:
63
src/types/mcp-types.ts
Normal file
63
src/types/mcp-types.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
// MCP Protocol Types
|
||||
export interface JSONRPCRequest {
|
||||
jsonrpc: "2.0";
|
||||
id?: string | number;
|
||||
method: string;
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface JSONRPCResponse {
|
||||
jsonrpc: "2.0";
|
||||
id: string | number | null;
|
||||
result?: any;
|
||||
error?: JSONRPCError;
|
||||
}
|
||||
|
||||
export interface JSONRPCError {
|
||||
code: number;
|
||||
message: string;
|
||||
data?: any;
|
||||
}
|
||||
|
||||
export enum ErrorCodes {
|
||||
ParseError = -32700,
|
||||
InvalidRequest = -32600,
|
||||
MethodNotFound = -32601,
|
||||
InvalidParams = -32602,
|
||||
InternalError = -32603
|
||||
}
|
||||
|
||||
export interface InitializeResult {
|
||||
protocolVersion: string;
|
||||
capabilities: {
|
||||
tools?: {};
|
||||
};
|
||||
serverInfo: {
|
||||
name: string;
|
||||
version: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface Tool {
|
||||
name: string;
|
||||
description: string;
|
||||
inputSchema: {
|
||||
type: string;
|
||||
properties: Record<string, any>;
|
||||
required?: string[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface ListToolsResult {
|
||||
tools: Tool[];
|
||||
}
|
||||
|
||||
export interface ContentBlock {
|
||||
type: "text";
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface CallToolResult {
|
||||
content: ContentBlock[];
|
||||
isError?: boolean;
|
||||
}
|
||||
21
src/types/settings-types.ts
Normal file
21
src/types/settings-types.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
// Settings Types
|
||||
export interface MCPServerSettings {
|
||||
port: number;
|
||||
enableCORS: boolean;
|
||||
allowedOrigins: string[];
|
||||
apiKey?: string;
|
||||
enableAuth: boolean;
|
||||
}
|
||||
|
||||
export interface MCPPluginSettings extends MCPServerSettings {
|
||||
autoStart: boolean;
|
||||
}
|
||||
|
||||
export const DEFAULT_SETTINGS: MCPPluginSettings = {
|
||||
port: 3000,
|
||||
enableCORS: true,
|
||||
allowedOrigins: ['*'],
|
||||
apiKey: '',
|
||||
enableAuth: false,
|
||||
autoStart: false
|
||||
};
|
||||
Reference in New Issue
Block a user