REST API, MCP Tools, and CLI Reference
Technical reference for integrating NeuronPrompter via REST API, MCP protocol, or command-line interface.
Installation
NeuronPrompter ships as a single binary for Windows, macOS, and Linux. No installer is required — place the binary in a directory included in your system PATH and it is ready to use.
- Download the binary for your platform from GitHub Releases
- Place it in a directory on your PATH
Quick Start
Double-click the binary or run neuronprompter web to launch
the GUI. The application opens a native window (WebView2 on Windows,
WebKit on macOS) or falls back to your default browser on Linux. The HTTP
server attempts ports 3030 through 3049 with automatic fallback if a port
is occupied.
# Launch the GUI (native window or browser)
neuronprompter web
# Start headless API server
neuronprompter serve --port 3030
# Start MCP server for Claude Code
neuronprompter mcp serve
Data Storage
All data is stored in a local SQLite database. The database file location depends on the operating system:
- Windows:
%APPDATA%\NeuronPrompter\neuronprompter.db - macOS:
~/Documents/NeuronPrompter/neuronprompter.db - Linux:
$XDG_DATA_HOME/NeuronPrompter/neuronprompter.db(default:~/.local/share/NeuronPrompter/neuronprompter.db, fallback:~/Documents/NeuronPrompter/neuronprompter.db)
Authentication
Session-based authentication using 256-bit tokens delivered via HttpOnly cookies. Rate limiting is applied per IP address (120 requests per 60 seconds). Sessions expire after 24 hours. The session store supports up to 1024 concurrent sessions with automatic cleanup every 5 minutes. Use the Sessions endpoints to create, switch, and destroy sessions.
Sessions
Endpoints for session lifecycle management: creation, switching, logout, and session introspection.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/sessions |
Create session |
| PUT | /api/v1/sessions/switch |
Switch session |
| DELETE | /api/v1/sessions |
Logout |
| GET | /api/v1/sessions/me |
Current session info |
System
Endpoints for health monitoring and graceful shutdown.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/health |
Health check |
| POST | /api/v1/shutdown |
Graceful shutdown |
Users
Endpoints for user account management: listing, creation, update, switching, and deletion.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/users |
List all users |
| POST | /api/v1/users |
Create a user |
| PUT | /api/v1/users/{user_id} |
Update a user |
| PUT | /api/v1/users/{user_id}/switch |
Switch active user |
| DELETE | /api/v1/users/{user_id} |
Delete a user |
Prompts
Endpoints for creating, reading, updating, deleting, duplicating, and toggling prompt state.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/prompts/search |
Search and list prompts |
| POST | /api/v1/prompts |
Create a prompt |
| GET | /api/v1/prompts/{prompt_id} |
Get prompt by ID |
| PUT | /api/v1/prompts/{prompt_id} |
Update a prompt |
| DELETE | /api/v1/prompts/{prompt_id} |
Delete a prompt |
| POST | /api/v1/prompts/{prompt_id}/duplicate |
Duplicate a prompt |
| PATCH | /api/v1/prompts/{prompt_id}/favorite |
Toggle favorite |
| PATCH | /api/v1/prompts/{prompt_id}/archive |
Toggle archive |
| POST | /api/v1/prompts/bulk-update |
Bulk update prompts |
| GET | /api/v1/prompts/count |
Count prompts for the current session user |
| GET | /api/v1/prompts/languages |
List languages for the current session user |
Scripts
Endpoints for managing scripts, including filesystem synchronization and file imports.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/scripts/search |
Search and list scripts |
| POST | /api/v1/scripts |
Create a script |
| POST | /api/v1/scripts/sync |
Sync scripts with filesystem |
| POST | /api/v1/scripts/import-file |
Import script from file |
| GET | /api/v1/scripts/{script_id} |
Get script by ID |
| PUT | /api/v1/scripts/{script_id} |
Update a script |
| DELETE | /api/v1/scripts/{script_id} |
Delete a script |
| POST | /api/v1/scripts/{script_id}/duplicate |
Duplicate a script |
| PATCH | /api/v1/scripts/{script_id}/favorite |
Toggle favorite |
| PATCH | /api/v1/scripts/{script_id}/archive |
Toggle archive |
| POST | /api/v1/scripts/bulk-update |
Bulk update scripts |
| GET | /api/v1/scripts/count |
Count scripts for the current session user |
| GET | /api/v1/scripts/languages |
List languages for the current session user |
Chains
Endpoints for chain management, content resolution, template variables, and prompt cross-referencing.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/chains/search |
Search and list chains |
| POST | /api/v1/chains |
Create a chain |
| GET | /api/v1/chains/{chain_id} |
Get chain by ID |
| PUT | /api/v1/chains/{chain_id} |
Update a chain |
| DELETE | /api/v1/chains/{chain_id} |
Delete a chain |
| POST | /api/v1/chains/{chain_id}/duplicate |
Duplicate a chain |
| PATCH | /api/v1/chains/{chain_id}/favorite |
Toggle favorite |
| PATCH | /api/v1/chains/{chain_id}/archive |
Toggle archive |
| GET | /api/v1/chains/{chain_id}/content |
Resolve composed content |
| GET | /api/v1/chains/{chain_id}/variables |
List template variables |
| GET | /api/v1/chains/by-prompt/{prompt_id} |
List chains referencing a prompt |
| POST | /api/v1/chains/bulk-update |
Bulk update chains |
| GET | /api/v1/chains/count |
Count chains for the current session user |
Copy
Endpoints for copying prompts, scripts, and chains between users.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/prompts/{prompt_id}/copy-to-user |
Copy prompt to another user |
| POST | /api/v1/scripts/{script_id}/copy-to-user |
Copy script to another user |
| POST | /api/v1/chains/{chain_id}/copy-to-user |
Copy chain to another user |
| POST | /api/v1/users/bulk-copy |
Bulk copy all content to another user |
Taxonomy
Endpoints for managing tags, categories, and collections.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/tags/user/{user_id} |
List tags for a user |
| POST | /api/v1/tags |
Create a tag |
| PUT | /api/v1/tags/{tag_id} |
Rename a tag |
| DELETE | /api/v1/tags/{tag_id} |
Delete a tag |
| GET | /api/v1/categories/user/{user_id} |
List categories for a user |
| POST | /api/v1/categories |
Create a category |
| PUT | /api/v1/categories/{category_id} |
Rename a category |
| DELETE | /api/v1/categories/{category_id} |
Delete a category |
| GET | /api/v1/collections/user/{user_id} |
List collections for a user |
| POST | /api/v1/collections |
Create a collection |
| PUT | /api/v1/collections/{collection_id} |
Rename a collection |
| DELETE | /api/v1/collections/{collection_id} |
Delete a collection |
Versions
Endpoints for prompt version history, restoration, and comparison.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/versions/prompt/{prompt_id} |
List prompt versions |
| GET | /api/v1/versions/{version_id} |
Get a specific prompt version |
| POST | /api/v1/versions/prompt/{prompt_id}/restore |
Restore a prompt version |
| GET | /api/v1/versions/compare |
Compare two prompt versions |
Script Versions
Endpoints for script version history, restoration, and comparison.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/script-versions/script/{script_id} |
List script versions |
| GET | /api/v1/script-versions/{version_id} |
Get a specific script version |
| POST | /api/v1/script-versions/script/{script_id}/restore |
Restore a script version |
| GET | /api/v1/script-versions/compare |
Compare two script versions |
Import / Export
Endpoints for data exchange in JSON and Markdown formats, plus database backup.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/io/export/json |
Export data as JSON |
| POST | /api/v1/io/import/json |
Import data from JSON |
| POST | /api/v1/io/export/markdown |
Export data as Markdown |
| POST | /api/v1/io/import/markdown |
Import data from Markdown |
| POST | /api/v1/io/backup |
Database backup |
Clipboard
Endpoints for clipboard operations and history management.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/clipboard/copy |
Copy to clipboard |
| POST | /api/v1/clipboard/copy-substituted |
Copy with variable substitution |
| GET | /api/v1/clipboard/history |
Get clipboard history |
| DELETE | /api/v1/clipboard/history |
Clear clipboard history |
Search
Full-text search endpoints across prompts, scripts, and chains.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/search/prompts |
Full-text prompt search |
| POST | /api/v1/search/scripts |
Full-text script search |
| POST | /api/v1/search/chains |
Full-text chain search |
Ollama
Endpoints for Ollama LLM integration: status, prompt refinement, translation, and metadata derivation.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/ollama/status |
Ollama status check |
| POST | /api/v1/ollama/improve |
Refine prompt text via LLM |
| POST | /api/v1/ollama/translate |
Translate prompt text via LLM |
| POST | /api/v1/ollama/autofill |
Auto-derive metadata via LLM |
Settings
Endpoints for application and user settings.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/settings/db-path |
Returns the absolute path to the SQLite database file |
| GET | /api/v1/settings/app/{key} |
Get an app setting |
| PUT | /api/v1/settings/app/{key} |
Set an app setting |
| GET | /api/v1/settings/user/{user_id} |
Get user settings |
| PUT | /api/v1/settings/user |
Replace user settings |
| PATCH | /api/v1/settings/user |
Partial update user settings |
MCP Setup — Claude Code
NeuronPrompter includes built-in commands for registering the MCP server
in Claude Code. The install command writes the configuration to
~/.claude.json.
# Automatic registration
neuronprompter mcp install
# Check status
neuronprompter mcp status
# Manual removal
neuronprompter mcp uninstall
MCP Setup — Claude Desktop
NeuronPrompter supports automatic registration for Claude Desktop. The install command writes the configuration to the platform-specific Claude Desktop settings file.
# Automatic registration
neuronprompter mcp install --target claude-desktop
# Check status
neuronprompter mcp status
# Manual removal
neuronprompter mcp uninstall --target claude-desktop
Alternatively, add the server configuration manually to the Claude Desktop settings file.
{
"mcpServers": {
"neuronprompter": {
"command": "neuronprompter",
"args": ["mcp", "serve"]
}
}
}
- The MCP server communicates via JSON-RPC 2.0 over stdio
- 23 tools are registered automatically on connection
- All operations are scoped to a dedicated mcp_agent user
- No delete operations are exposed via MCP
- See the MCP Integration page for the full tool reference
neuronprompter web
Starts the GUI. Opens a native window (WebView2 on Windows, WebKit on macOS) or the default browser on Linux. Serves the embedded SolidJS frontend via the Axum HTTP server.
neuronprompter web [--port 3030] [--bind 127.0.0.1]
--port— HTTP port (default: 3030, tries ports 3030-3049)--bind— Bind address (default: 127.0.0.1)
neuronprompter serve
Starts the headless API server without opening a browser or native window. Suitable for server deployments and automated pipelines.
neuronprompter serve [--port 3030] [--bind 127.0.0.1]
--port— HTTP port (default: 3030)--bind— Bind address (default: 127.0.0.1)
neuronprompter mcp
MCP server management commands for starting the stdio server, registering in Claude Code or Claude Desktop, and checking registration status.
neuronprompter mcp serve
neuronprompter mcp install
neuronprompter mcp uninstall
neuronprompter mcp status
serve— Start the MCP stdio server for AI agent communicationinstall— Register the MCP server in Claude Code settingsuninstall— Remove the MCP server registrationstatus— Display the current registration status
neuronprompter version
Prints the application version.
neuronprompter version
Ready to Organize Your Prompts?
NeuronPrompter is free, open source, and runs entirely on your machine.
Get Started on GitHub