Skip to main content
Glama
README.md
# docx-mcp

MCP server pro generování profesionálně formátovaných Word dokumentů (.docx).
Podporuje firemní šablony (barvy, fonty, logo), záhlaví/zápatí a převod Markdownu.

## Instalace

```bash
cd docx-mcp
npm install
```

## Přidání do Cursoru

Soubor `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "docx": {
      "command": "node",
      "args": ["/absolutní/cesta/k/docx-mcp/index.js"]
    }
  }
}
```

## Přidání do Claude Code

Soubor `~/.claude/mcp.json`:

```json
{
  "mcpServers": {
    "docx": {
      "command": "node",
      "args": ["/absolutní/cesta/k/docx-mcp/index.js"]
    }
  }
}
```

## Nástroje

### `create_document`

Vytvoří Word dokument z pole bloků.

```json
{
  "title": "Název dokumentu",
  "subtitle": "Podnadpis",
  "author": "Vaše jméno",
  "output_path": "/cesta/soubor.docx",
  "theme_path": "~/.docx-mcp/themes/firma.json",
  "theme": {
    "primaryColor": "CC0000",
    "font": "Calibri",
    "headerText": "Firma s.r.o.",
    "footerText": "Důvěrné",
    "logoPath": "/cesta/k/logo.png"
  },
  "blocks": [
    { "type": "h1", "text": "Nadpis" },
    { "type": "p", "text": "Odstavec textu." },
    { "type": "bullet", "items": ["Bod 1", "Bod 2"] },
    { "type": "table", "headers": ["A", "B"], "rows": [["1", "2"]] },
    { "type": "callout", "title": "Tip", "text": "Text tipu.", "style": "info" }
  ]
}
```

### `convert_markdown`

Převede Markdown text nebo .md soubor na Word dokument.

```json
{
  "markdown": "# Nadpis\n\nText odstavce.\n\n- bod 1\n- bod 2",
  "output_path": "/cesta/soubor.docx",
  "theme_path": "~/.docx-mcp/themes/firma.json"
}
```

Nebo ze souboru:
```json
{
  "markdown_path": "/cesta/k/dokument.md",
  "output_path": "/cesta/soubor.docx"
}
```

### `save_theme`

Uloží šablonu pro opakované použití.

```json
{
  "name": "firma",
  "theme": {
    "primaryColor": "CC0000",
    "accentColor": "FF6600",
    "font": "Calibri",
    "tableHeaderBg": "CC0000",
    "headerText": "Firma s.r.o.",
    "footerText": "Důvěrné",
    "logoPath": "/cesta/k/logo.png"
  }
}
```

Uloží se do `~/.docx-mcp/themes/firma.json`.

### `list_themes`

Zobrazí seznam uložených šablon.

## Šablona (theme) - všechny vlastnosti

| Vlastnost | Výchozí | Popis |
|-----------|---------|-------|
| `primaryColor` | `1F3864` | Barva H1 a titulku |
| `accentColor` | `2E75B6` | Barva H2 a akcentů |
| `h3Color` | `404040` | Barva H3 |
| `textColor` | `000000` | Barva textu |
| `font` | `Arial` | Název fontu |
| `fontSize` | `22` | Velikost písma (half-points, 22=11pt) |
| `tableHeaderBg` | `1F3864` | Pozadí záhlaví tabulek |
| `tableHeaderText` | `FFFFFF` | Text záhlaví tabulek |
| `tableStripe` | `F5F9FF` | Barva sudých řádků |
| `headerText` | | Text v záhlaví stránky |
| `footerText` | | Text v zápatí stránky |
| `logoPath` | | Cesta k logu (PNG/JPG) |

## Typy bloků

| Typ | Popis |
|-----|-------|
| `h1` / `h2` / `h3` | Nadpisy 1-3 |
| `p` | Odstavec (bold, italic, color, align) |
| `bullet` | Odrážkový seznam (víceúrovňový) |
| `numbered` | Číslovaný seznam (víceúrovňový) |
| `table` | Tabulka (headers + rows) |
| `callout` | Barevný rámeček (info/warning/success/danger) |
| `spacer` | Prázdný řádek |
| `pagebreak` | Nová stránka |

TDQS

A3.9/5.0

Scored across 4 tools

Disambiguation4/5

Each tool has a clear purpose: create_document and convert_markdown both produce .docx files but differ in input (structured content vs. Markdown), and save_theme/list_themes handle theme persistence. The only minor ambiguity is choosing between the two document-generation tools, but their descriptions clarify the distinction.

Naming Consistency4/5

Tool names consistently use snake_case with a verb prefix, which is predictable. The slight deviation is convert_markdown, which names the input format rather than the output object, unlike the other verb_noun names.

Tool Count5/5

Four tools is a well-scoped set for a focused docx creation server: two document-generation paths and two theme-management utilities. Each tool earns its place without redundancy or unnecessary bloat.

Completeness4/5

The server covers the core workflow of generating .docx files and managing reusable themes. Minor gaps exist, such as no delete_theme or ability to edit existing documents, but these are workable limitations rather than critical dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues