Plugin Development
Plugins extend OpenWriter with custom MCP tools, HTTP routes, context menu items, and sidebar actions.
Plugin Interface
interface OpenWriterPlugin {
name: string;
version: string;
description: string;
category: 'writing' | 'social-media' | 'image-generation';
configSchema?: JSONSchemaObject;
registerRoutes?: (app, config) => void;
mcpTools?: ToolDefinition[];
contextMenuItems?: ContextMenuItem[];
sidebarMenuItems?: SidebarMenuItem[];
}
Extension Points
1. MCP Tools
Register tools that any MCP agent can call. Define with JSON Schema for input validation.
2. HTTP Routes
Add custom API endpoints to the local server. Access editor state and document data.
3. Context Menu Items
Add right-click actions on text selection. Three conditions:
has-selection— only when text is selectedempty-node— only on empty nodesalways— always visible
4. Sidebar Menu Items
Add right-click actions on documents in the sidebar.
Bundled Plugins
| Plugin | Category | What It Does |
|---|---|---|
| Author’s Voice | Writing | Voice profiling + rewrite in your voice |
| Image Generator | Image Generation | AI image generation via Gemini |
| X API | Social Media | Tweet/article posting and threading |
| Publish | Social Media | Newsletter, scheduler, subscriber management |
Configuration
Plugins define a configSchema (JSON Schema) for user-configurable settings. Users set values through the plugin settings panel.
Distribution
- First-party:
@openwriter/plugin-* - Community:
openwriter-plugin-*