Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added desktop-commander-v0.2.24-release-notes.pdf
Binary file not shown.
25 changes: 3 additions & 22 deletions scripts/build-mcpb.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ filesToCopy.forEach(file => {
}
});

// Step 6: Create package.json in bundle with production dependencies
// Step 6: Create package.json in bundle with production dependencies from main package.json
// This ensures MCPB bundle always has the same dependencies as the npm package
const bundlePackageJson = {
name: manifest.name,
version: manifest.version,
Expand All @@ -115,27 +116,7 @@ const bundlePackageJson = {
author: manifest.author,
license: manifest.license,
repository: manifest.repository,
dependencies: {
"@modelcontextprotocol/sdk": "^1.9.0",
"@opendocsg/pdf2md": "^0.2.2",
"@vscode/ripgrep": "^1.15.9",
"cross-fetch": "^4.1.0",
"exceljs": "^4.4.0",
"fastest-levenshtein": "^1.0.16",
"file-type": "^21.1.1",
"glob": "^10.3.10",
"isbinaryfile": "^5.0.4",
"md-to-pdf": "^5.2.5",
"pdf-lib": "^1.17.1",
"remark": "^15.0.1",
"remark-gfm": "^4.0.1",
"remark-parse": "^11.0.0",
"sharp": "^0.34.5",
"unified": "^11.0.5",
"unpdf": "^1.4.0",
"zod": "^3.24.1",
"zod-to-json-schema": "^3.23.5"
}
dependencies: packageJson.dependencies // Use dependencies directly from package.json
};

fs.writeFileSync(
Expand Down
17 changes: 15 additions & 2 deletions src/data/onboarding-prompts.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
{
"version": "2.0.0",
"description": "Desktop Commander onboarding prompts - V2 simplified (5 prompts only)",
"version": "2.1.0",
"description": "Desktop Commander prompts - onboarding and best practices",
"prompts": [
{
"id": "bp_pdf_styling",
"title": "PDF Styling Best Practices",
"description": "Best practices for creating well-styled PDFs with write_pdf tool",
"prompt": "# PDF Styling Best Practices for write_pdf\n\n## Layout - Use Tables, Not Flexbox\nCSS flexbox often breaks in PDF rendering. Use HTML tables for multi-column layouts:\n```html\n<table style=\"width: 100%; border-collapse: separate; border-spacing: 12px 0;\">\n<tr>\n<td style=\"width: 50%; vertical-align: top;\">Column 1</td>\n<td style=\"width: 50%; vertical-align: top;\">Column 2</td>\n</tr>\n</table>\n```\n\n## Page Breaks\n- Content splits unpredictably at page boundaries\n- Group related content in single containers\n- Use explicit page breaks: `<div style=\"page-break-before: always;\"></div>`\n- Design for single page when possible, or use explicit breaks\n\n## Rounded Corners on Headers\nNegative margins break border-radius. Use a container:\n```html\n<div style=\"padding: 10px;\">\n <div style=\"border-radius: 20px; background: #0f172a; padding: 40px;\">\n Header content\n </div>\n</div>\n```\n\n## Background Colors\n- Full-page backgrounds get cut at page boundaries\n- Apply backgrounds to contained elements, not page wrapper\n- Cards work well with light backgrounds (#f8fafc)\n\n## Reliable Card Pattern\n```html\n<td style=\"background: #f8fafc; border-radius: 12px; padding: 16px; border-top: 3px solid #6366f1;\">\n <div style=\"font-size: 24px;\">📄</div>\n <div style=\"font-size: 14px; font-weight: 700;\">Title</div>\n <div style=\"font-size: 10px; color: #64748b;\">Description</div>\n</td>\n```\n\n## Dark Section with Footer\nKeep it simple - avoid nested tables in dark containers:\n```html\n<div style=\"background: linear-gradient(135deg, #0f172a, #1e293b); color: white; padding: 20px; border-radius: 14px;\">\n <div style=\"margin-bottom: 15px;\">\n <span style=\"font-weight: 700;\">Title</span>\n <span style=\"display: inline-block; width: 36px; height: 36px; border-radius: 50%; background: #6366f1; text-align: center; line-height: 36px;\">A</span>\n </div>\n <div style=\"border-top: 1px solid rgba(255,255,255,0.15); padding-top: 12px; font-size: 10px; opacity: 0.6;\">\n Footer text • More text • Even more\n </div>\n</div>\n```\n\n## Colors That Work Well Together\n- Header gradient: `linear-gradient(135deg, #0f172a, #1e293b)`\n- Card backgrounds: `#f8fafc` (light gray) or `#fef2f2` (light red for warnings)\n- Accent colors: `#6366f1` (indigo), `#10b981` (green), `#8b5cf6` (purple), `#f59e0b` (amber), `#ef4444` (red)\n- Text: `#0f172a` (dark), `#64748b` (muted), `#475569` (body)\n\nApply these patterns for professional, well-rendered PDFs!",
"categories": ["best-practices"],
"secondaryTag": "PDF",
"votes": 0,
"gaClicks": 0,
"icon": "FileText",
"author": "DC team",
"verified": true
},
{
"id": "onb2_01",
"title": "Organize my Downloads folder",
Expand Down
4 changes: 4 additions & 0 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {

Supports standard markdown features including headers, lists, code blocks, tables, and basic formatting.

STYLED PDF BEST PRACTICES:
For complex styled PDFs, use get_prompts(action='get_prompt', promptId='bp_pdf_styling')
to get detailed best practices for layouts, colors, and avoiding common rendering issues.

Only works within allowed directories.

${PATH_GUIDANCE}
Expand Down
13 changes: 13 additions & 0 deletions test/samples/01_sample_simple.pdf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Hello World

This is a test PDF created from markdown.

## Features

Simple text Bold text Italic text Link

## Code

console.log('Hello World');


37 changes: 37 additions & 0 deletions test/samples/02_sample_invoice.pdf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## POWERED BY

#### 1

Sub Total 20,000.00 Total Rs.20,000.00

### Balance Due Rs.20,000.00

Authorized Signature

Total In Words Indian Rupee Twenty Thousand Only

Notes

Thanks for your business.

Payment Options

Terms & Conditions GST not applicable

## Tattva Trails Private Limited

Some street 12 Panjim Goa 999888 India 12344321 tattva.trails.official@gmail.com

# TAX INVOICE

#### # : INV-000007

Invoice Date : 20/11/2025 Terms : Due on Receipt Due Date : 20/11/2025

Bill To

### Shanti Spa Ayurveda

# Item & Description Qty Rate Amount 1 Referral Fee – Panchakarma Treatment Package (14 Days) 1.00 20,000.00 20,000.00


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading