# API Keg — Office OOXML Template Merge & Markdown Extractor

> API Keg — Office OOXML Template Merge & Markdown Extractor is a paid MCP server for files and documents. MCP server that merges Word/PowerPoint templates and converts Office files to Markdown. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Paid
- **Starting price:** $5 a month
- **Platforms:** API
- **Website:** https://office-template.apikeg.com/llms.txt
- **MCP Registry name:** com.apikeg/office-template
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents)
- **Listing updated:** 2026-12-01

## About

Filling a Word or PowerPoint template by hand, or feeding Office files to a language model, both tend to break down quickly. This server handles the file-level work: it repairs placeholders that Word has split across several XML runs, keeps the typography of the opening run, and duplicates table rows for loop blocks so invoice-style tables fill correctly. Replacements apply across body text, headers, footers and slides, and any placeholders that found no match are returned so nothing disappears silently.

The second tool turns .docx, .pptx and .xlsx files into compact GitHub-flavored Markdown, covering headings, lists, tables, ordered slides, speaker notes and sparse spreadsheet sheets. It reports token-savings figures with each conversion. The service runs as a Cloudflare edge engine and is reachable over streamable HTTP, with pay-per-request x402 payments in USDC on Base or a monthly API key. Requests can be validated first with a dry-run flag at no cost.

## Features

- **Split run repair:** Reassembles {{variable}} placeholders that Word has broken across multiple XML runs before replacing them.
- **Table loop expansion:** Repeats table rows for {{#loop}} blocks so each data item gets its own row.
- **Style-preserving replacement:** Keeps the formatting of the opening run and the styling of cells during substitution.
- **Cross-part variable fill:** Replaces variables in document body, headers, footers and PowerPoint slides.
- **Unmatched placeholder report:** Returns any placeholders that had no matching value so gaps are visible.
- **Office to Markdown extraction:** Converts .docx, .pptx and .xlsx files into token-efficient Markdown with speaker notes included.
- **Dry-run validation:** Checks request payloads at no cost before any paid merge or extraction runs.

## Good for

- Generate invoices or reports in Word from JSON data without breaking formatting
- Produce PowerPoint decks from a branded template and a set of variables
- Feed Office documents to an LLM as compact Markdown instead of raw XML
- Fill repeating table rows in contract or quote templates from structured records

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add --transport http office-template https://office-template.apikeg.com/mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "office-template": {
      "type": "http",
      "url": "https://office-template.apikeg.com/mcp"
    }
  }
}
```

### Claude Desktop (Customize → Connectors → Add → Add custom connector)

```text
https://office-template.apikeg.com/mcp
```

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "office-template": {
      "url": "https://office-template.apikeg.com/mcp"
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "office-template": {
      "type": "http",
      "url": "https://office-template.apikeg.com/mcp"
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### ChatGPT (chatgpt.com → Plugins → + → Add custom MCP server)

```text
https://office-template.apikeg.com/mcp
```

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add office-template --url https://office-template.apikeg.com/mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.office-template]
url = "https://office-template.apikeg.com/mcp"
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "office-template": {
      "httpUrl": "https://office-template.apikeg.com/mcp"
    }
  }
}
```

Or run: gemini mcp add -s user --transport http office-template https://office-template.apikeg.com/mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "office-template": {
      "serverUrl": "https://office-template.apikeg.com/mcp"
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "office-template": {
      "url": "https://office-template.apikeg.com/mcp",
      "transport": "http"
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "office-template": {
      "type": "streamableHttp",
      "url": "https://office-template.apikeg.com/mcp"
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "office-template": {
      "url": "https://office-template.apikeg.com/mcp"
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "office-template": {
      "url": "https://office-template.apikeg.com/mcp"
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "office-template": {
      "url": "https://office-template.apikeg.com/mcp"
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "office-template": {
      "url": "https://office-template.apikeg.com/mcp"
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://office-template.apikeg.com/mcp
```

Enter a Name (for example "API Keg — Office OOXML Template Merge & Markdown Extractor"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "office-template": {
      "type": "http",
      "url": "https://office-template.apikeg.com/mcp"
    }
  }
}
```

## Tools

The server marks 1 of 6 tools as able to delete data and 3 as able to change data. From the server's own tool labels and tool names; not verified by us.

- `merge_office_template` (says read-only): Populates {{variable}} placeholders and {{#loop}}...{{/loop}} table rows across .docx and .pptx body text, headers, footers, and slides while preserving template styling, returning the merged Base64 document and any unmatchedPlaceholders. Pricing: $0.004 USD per Office template merge (.docx or .pptx) (x402 instant micropayment). Defaults to HTTP 402 (x402); if your client lacks 402 support, sign i
- `extract_office_markdown` (says read-only): Auto-detects .docx, .pptx, or .xlsx from OOXML structure and converts headings, lists, Word/PowerPoint tables, numerically ordered slides, speaker notes, and sparse Excel worksheets into compact GitHub-Flavored Markdown with token-savings telemetry. Pricing: $0.002 USD per Office document extraction (.docx, .pptx, or .xlsx) (x402 instant micropayment). Defaults to HTTP 402 (x402); if your client l
- `account_send_verification_code` (says it can change data): Free ($0.00). Sends a 9-character verification code (AAA-AAA-AAA) to the user's email address to register, sign in, or view their current ak_live_... API key without rotating it. Ask for the email and resulting code using your built-in interactive question tool (AskUserQuestion / ask_question).
- `account_verify_and_checkout` (says it can change data): Free ($0.00). Verifies the 9-character email code from account_send_verification_code, returns the user's current ak_live_... API key on the first call (even if already registered, without rotating their key!), and optionally creates a direct Stripe Checkout URL for "office-template" ($5, $20, or $50/mo).
- `account_create_checkout` (says it can change data): Free ($0.00). Generates a direct Stripe Checkout URL (https://checkout.stripe.com/...) for "office-template" ($5, $20, or $50/mo) using either the connected Authorization header or an apiKey.
- `account_rotate_api_key` (says it can change data): Free ($0.00). Rotates the user's ak_live_... API key immediately without requiring an email verification code, authenticating with either the connected Authorization header or the current apiKey.

## FAQ

### How is the server connected to an AI client?

It exposes a streamable HTTP MCP endpoint at https://office-template.apikeg.com/mcp, and a ready-made JSON configuration block is provided for MCP clients.

### How is API Keg — Office OOXML Template Merge & Markdown Extractor paid for?

Requests can be paid per call at $0.004 for a template merge and $0.002 for an extraction using x402 USDC on Base, or through a monthly API key with plans at $5, $20 or $50 per product.

### Can I test a request without being charged?

Yes. Adding ?dry_run=true to the URL or sending an X-Dry-Run header validates the payload at no cost.

### Which file types can be extracted to Markdown?

The extraction tool detects .docx, .pptx and .xlsx files automatically from their OOXML structure.

### How do I add API Keg — Office OOXML Template Merge & Markdown Extractor to Claude Code?

Run this command in your terminal: claude mcp add --transport http office-template https://office-template.apikeg.com/mcp

### What are the best alternatives to API Keg — Office OOXML Template Merge & Markdown Extractor?

The closest alternatives to API Keg — Office OOXML Template Merge & Markdown Extractor are OfficeCTRL, Aigroup Mdtoword MCP, Mdmagic MCP Server, PDF & DOCX to Markdown and Document to Markdown for AI Agents.

## Where this comes from

- Description: written from the project's website and its MCP Registry entry.
- Status and tools: checked automatically by AIPoweredBot on 3 December 2026.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [OfficeCTRL](https://ai-powered.com/mcp/officectrl): OfficeCTRL is an open-source MCP server for files and documents.
- [Aigroup Mdtoword MCP](https://ai-powered.com/mcp/aigroup-mdtoword-mcp): Aigroup Mdtoword MCP is an open-source MCP server for files and documents.
- [Mdmagic MCP Server](https://ai-powered.com/mcp/mdmagic-mcp-server): Mdmagic MCP Server is a freemium MCP server for files and documents.
- [PDF & DOCX to Markdown](https://ai-powered.com/mcp/pdf-and-docx-to-markdown): PDF & DOCX to Markdown is a paid MCP server for files and documents.
- [Document to Markdown for AI Agents](https://ai-powered.com/mcp/document-to-markdown-for-ai-agents): Document to Markdown for AI Agents is an MCP server for files and documents.
- [DOCX to Markdown — Word, Excel, Slides & Document Tables](https://ai-powered.com/mcp/docx-to-markdown-word-excel-slides-and-document-tables): DOCX to Markdown — Word, Excel, Slides & Document Tables is a paid MCP server for files and documents.
- [PDF Table & Document to JSON + Markdown MCP](https://ai-powered.com/mcp/pdf-table-and-document-to-json-markdown-mcp): PDF Table & Document to JSON + Markdown MCP is a freemium MCP server for files and documents.
- [Docx Forge](https://ai-powered.com/mcp/docx-forge): Docx Forge is an open-source MCP server for files and documents.

---
Source: https://ai-powered.com/mcp/api-keg-office-ooxml-template-merge-and-markdown-extractor
