Skip to main content
Glama

devbook-mcp

Version MCP Server TypeScript Node.js Devbook Engine License: MIT

Official TypeScript-based Model Context Protocol (MCP) server for Devbook, the distraction-free desktop prompt engineering workbench and studio.

This server enables AI assistants and agents (Claude Desktop, Antigravity, Cursor, and custom MCP clients) to seamlessly query, author, manage, and execute prompt templates, inspect projects, upload file attachments, and render GitHub Flavored Markdown directly through the Devbook REST API.


Features

  • Full MCP Capabilities Suite:

    • 17 Comprehensive Tools: Full CRUD, full-text search, pin management, attachments, and markdown rendering.

    • MCP Resources: Direct URI inspection via devbook://stats, devbook://projects, devbook://prompts, and parameterized templates.

    • Dynamic MCP Prompts: Exposes Devbook prompt templates as native MCP prompt commands with automatic parsing and dynamic substitution of {{variable}} placeholders.

  • Stdio Transport: Ultra-fast JSON-RPC 2.0 communication over standard input/output.

  • Resilient Attachment Handling: Upload prompt context files via local filesystem paths or base64-encoded strings streamed as multipart/form-data.

  • OpenAPI 3.1 Contract: Strongly typed client generated directly against Devbook's OpenAPI 3.1.0 specification with runtime Zod validation.

  • Zero Friction Setup: Works out of the box with your local Devbook Rails server.


Related MCP server: Paperclip MCP server

Architecture Overview

flowchart LR
    Client["AI Agent / Desktop Client<br/>(Claude, Antigravity, Cursor)"]
    Stdio["Stdio Transport<br/>(JSON-RPC 2.0)"]
    MCPServer["Devbook MCP Server<br/>(@modelcontextprotocol/sdk)"]
    APIClient["Typed DevbookClient<br/>(Node native fetch)"]
    DevbookAPI["Devbook Rails API<br/>(http://localhost:3000/api/v1)"]

    Client <-->|MCP Protocol| Stdio
    Stdio <--> MCPServer
    MCPServer -->|Tools / Resources / Prompts| APIClient
    APIClient <-->|REST JSON & Multipart| DevbookAPI

Quickstart

Prerequisites

  • Node.js: v18.0.0 or higher (recommended: Node 20+)

  • Devbook: Running locally (default: http://localhost:3000)

Installation & Build

# Clone repository
git clone https://github.com/leouofa/devbook-mcp.git
cd devbook-mcp

# Install dependencies
npm install

# Build the TypeScript distribution
npm run build

Configuration

The server can be configured via environment variables or command-line arguments:

Option

Environment Variable

CLI Flag

Default

Description

API URL

DEVBOOK_API_URL

-u, --url <url>

http://localhost:3000

Devbook API base URL

API Key

DEVBOOK_API_KEY

-k, --api-key <key>

(none)

Optional Bearer token for authentication

Timeout

DEVBOOK_TIMEOUT_MS

-t, --timeout <ms>

30000

HTTP request timeout in milliseconds

Prompt Sync

—

--no-sync

true

Eagerly register saved Devbook prompts at startup


Client Integration Guides

1. Claude Desktop

Add devbook to your claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "devbook": {
      "command": "node",
      "args": ["/absolute/path/to/devbook-mcp/dist/index.js"],
      "env": {
        "DEVBOOK_API_URL": "http://localhost:3000"
      }
    }
  }
}

2. Antigravity IDE

Add to your local MCP server configuration in Antigravity (~/.gemini/antigravity/mcp.json or project settings):

{
  "mcpServers": {
    "devbook": {
      "command": "node",
      "args": ["/Users/leonid/src/devbook-mcp/dist/index.js"],
      "env": {
        "DEVBOOK_API_URL": "http://localhost:3000"
      }
    }
  }
}

3. Cursor

Add to your .cursor/mcp.json:

{
  "mcpServers": {
    "devbook": {
      "command": "node",
      "args": ["/absolute/path/to/devbook-mcp/dist/index.js"],
      "env": {
        "DEVBOOK_API_URL": "http://localhost:3000"
      }
    }
  }
}

Available MCP Primitives

MCP Tools

Tool

Description

Key Parameters

devbook_list_projects

Search and list project workspaces

q (query), limit, offset

devbook_get_project

Get project details and prompt index

id

devbook_create_project

Create a new project workspace

name, description

devbook_update_project

Update project name or description

id, name, description

devbook_delete_project

Delete a project

id

devbook_list_prompts

Search & filter prompts across scopes

q, project_id, scope (standalone), pinned, limit, offset

devbook_get_prompt

Retrieve prompt Markdown body & metadata

id, render_markdown

devbook_create_prompt

Create a prompt (in a project or standalone)

title, body, project_id, pinned, pinned_position

devbook_update_prompt

Edit prompt content, project, or pin

id, title, body, project_id, pinned, pinned_position

devbook_delete_prompt

Delete a prompt permanently

id

devbook_toggle_pin

Toggle sidebar pin status for a prompt

id

devbook_reorder_pinned

Reorder sequential pinned prompts

prompt_ids (array of numbers)

devbook_list_attachments

List files attached to a prompt

prompt_id

devbook_upload_attachment

Attach files (paths or base64) to prompt

prompt_id, files (path or content_base64 + filename)

devbook_delete_attachment

Purge an attachment from a prompt

prompt_id, attachment_id

devbook_render_markdown

Render GFM into sanitized HTML

text

devbook_get_stats

Inspect platform counts & metrics

(none)

MCP Resources

URI Pattern

MIME Type

Description

devbook://stats

application/json

Workbench metrics (total prompts, pinned prompts, projects, attachments)

devbook://projects

application/json

Index list of all project workspaces

devbook://projects/{id}

application/json

Project detail including its prompt list

devbook://prompts

application/json

Index list of all prompt scratchpads and templates

devbook://prompts/{id}

text/markdown

Full prompt Markdown body with metadata YAML frontmatter

MCP Prompts (Prompt Templates)

  • devbook_execute_prompt: Dynamically loads any Devbook prompt by ID and populates {{variable}} placeholders from a variables JSON dictionary.

  • devbook_author_prompt: Interactive guide that assists agents and users in authoring structured prompts with dynamic placeholders.

  • Dynamic Prompts (devbook_<id>_<slug>): On startup, saved Devbook prompts are automatically discovered, variables are extracted from the template body, and exposed as first-class typed MCP prompts (e.g., devbook_5_project_bootstrap).


Development & Testing

# Regenerate TypeScript types from openapi.json
npm run typegen

# Typecheck with TypeScript
npm run typecheck

# Run unit and integration tests (Vitest)
npm test

# Build production bundle
npm run build

License

MIT © Leonid Medovyy

Available Tools

17 tools
devbook_create_projectC

Create a new prompt project workspace in Devbook

Inputs: name (required), description.

devbook_create_promptB

Create a new prompt template in Devbook (under a project or as a standalone scratchpad prompt)

Inputs: title (required), body, pinned, project_id, +1 more.

devbook_delete_attachmentC

Purge and delete an attachment from a prompt

Inputs: prompt_id (required), attachment_id (required).

devbook_delete_projectB

Delete a project from Devbook (prompts in the project become standalone or are deleted depending on cascade)

Inputs: id (required).

devbook_delete_promptB

Permanently delete a prompt and its attachments from Devbook

Inputs: id (required).

devbook_get_projectB

Get full project details including its prompt list index and metadata

Inputs: id (required).

devbook_get_promptA

Retrieve a prompt's full Markdown template content, metadata, attachments, and optional rendered HTML

Inputs: id (required), render_markdown.

devbook_get_statsA

Get system statistics from Devbook (total prompts, projects, attachments, pinned prompts, standalone prompts)

Inputs: no named parameters.

devbook_list_attachmentsB

List file attachments associated with a prompt

Inputs: prompt_id (required).

devbook_list_projectsB

List and search prompt projects / workspaces in Devbook with prompt count metrics and pagination

Inputs: q, limit, offset.

devbook_list_promptsB

List, filter, and search prompts in Devbook by full-text search, project, standalone scope, or pinned status

Inputs: q, limit, scope, offset, +2 more.

devbook_render_markdownA

Render Markdown text to sanitized HTML using Devbook's GitHub-flavored markdown pipeline

Inputs: text (required).

devbook_reorder_pinnedC

Update the sequential order of pinned prompts displayed in the Devbook sidebar

Inputs: prompt_ids (required).

devbook_toggle_pinB

Toggle the pinned status of a prompt on the Devbook sidebar

Inputs: id (required).

devbook_update_projectC

Update an existing project's name or description

Inputs: id (required), name, description.

devbook_update_promptB

Update a prompt template's title, Markdown body, project assignment, or pinned status

Inputs: id (required), body, title, pinned, +3 more.

devbook_upload_attachmentB

Upload one or more files to attach to a prompt in Devbook (accepts local file paths or base64 data)

Inputs: files (required), prompt_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools map cleanly to a resource+action (projects and prompts each have full CRUD, attachments have their own trio). The only overlap is that devbook_update_prompt can also change pinned status while devbook_toggle_pin does the same thing, and devbook_reorder_pinned is closely related to pinning, which could cause minor misselection.

    Naming Consistency5/5

    All 17 tools use a uniform devbook_ prefix followed by a clear verb_noun pattern (list_projects, get_prompt, create_attachment, delete_attachment, render_markdown, get_stats). Minor omissions of the resource noun in toggle_pin/reorder_pinned are still unambiguous.

    Tool Count4/5

    17 tools is slightly on the heavy side but justified by three sub-domains (projects, prompts, attachments) plus utilities. Each tool earns its place with no obvious filler.

    Completeness4/5

    Full CRUD is covered for both projects and prompts, plus pinning, ordering, attachments, rendering, and stats. Minor gaps: no way to download/retrieve an attachment's content or update an existing attachment, and no prompt duplication/versioning, but core workflows are fully covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers