# MD-MCP Usage Guide

## Overview

**md-mcp** is a markdown processing MCP server that provides 8 powerful tools for document analysis, conversion, and multimodal processing.

## 8 Available Tools

### 1. `weave_spells`
**Purpose**: Transform and analyze text through processing rituals

**Parameters:**
- `arcane_text` (string, required): The text to transform
- `reveal_secrets` (boolean): Unveil hidden patterns in the transformation

**Use Case**: Text analysis and transformation

### 2. `summon_knowledge`
**Purpose**: Extract and decipher code from documents

**Parameters:**
- `ethereal_code` (string, required): The code to decipher
- `preserve_essence` (boolean): Maintain code structure integrity

**Use Case**: Code extraction and analysis from markdown

### 3. `read_fate`
**Purpose**: Read and analyze document content

**Parameters:**
- `cosmic_scroll` (string, required): The document content to analyze

**Use Case**: Document reading and parsing

### 4. `see_destiny`
**Purpose**: Interpret and analyze content for patterns

**Parameters:**
- `prophetic_visions` (string, required): The content to interpret

**Use Case**: Pattern analysis and content interpretation

### 5. `divine_truth`
**Purpose**: Validate and verify document content

**Parameters:**
- `sacred_text` (string, required): The text to examine
- `test_connections` (boolean): Verify internal links
- `examine_symbols` (boolean): Inspect markdown symbols

**Use Case**: Markdown validation and link checking

### 6. `forge_reality`
**Purpose**: Create new markdown documents from templates

**Parameters:**
- `divine_title` (string, required): Document title
- `primal_essence` (string, required): Document content
- `mystical_properties` (object): Additional attributes
- `creation_ritual` (enum): Template type
  - `basic`: Simple markdown
  - `article`: Article format
  - `readme`: README format
  - `api`: API documentation

**Use Case**: Document generation from templates

### 7. `process_multimodal`
**Purpose**: Process documents across multiple modalities

**Parameters:**
- `content` (string, required): Content to process
- `modality` (enum, required): Content type
  - `text`: Text content
  - `vision`: Image content
  - `audio`: Audio content
  - `multimodal`: Mixed media
- `format` (enum, required): Output format
  - `markdown`
  - `html`
  - `json`
  - `xml`
- `processingOptions` (object):
  - `extractEntities` (boolean): Extract named entities
  - `generateSummary` (boolean): Generate summary
  - `optimizeForSearch` (boolean): SEO optimization
  - `enableCaching` (boolean): Cache results

**Use Case**: Convert and process multimodal content

### 8. `high_performance_processing`
**Purpose**: High-performance document processing with optimization

**Parameters:**
- `content` (string, required): Content to process
- `operation` (enum, required):
  - `convert`: Format conversion
  - `validate`: Content validation
  - `analyze`: Content analysis
  - `optimize`: Performance optimization
- `optimizationLevel` (enum):
  - `low`, `medium`, `high`, `extreme`
- `parallelProcessing` (boolean): Enable parallel processing
- `maxConcurrency` (number): Max concurrent operations (1-16, default: 4)

**Use Case**: Batch processing large documents with performance optimization

## Usage Examples

### Example 1: Create README from Template
```json
{
  "tool": "forge_reality",
  "arguments": {
    "divine_title": "My Project",
    "primal_essence": "This is a project about AI",
    "creation_ritual": "readme"
  }
}
```

### Example 2: Validate Markdown with Link Checking
```json
{
  "tool": "divine_truth",
  "arguments": {
    "sacred_text": "# Title\n[Link](./file.md)",
    "test_connections": true,
    "examine_symbols": true
  }
}
```

### Example 3: Convert HTML to Markdown
```json
{
  "tool": "process_multimodal",
  "arguments": {
    "content": "<h1>Title</h1><p>Content</p>",
    "modality": "text",
    "format": "markdown",
    "processingOptions": {
      "extractEntities": true,
      "generateSummary": false
    }
  }
}
```

### Example 4: High-Performance Batch Processing
```json
{
  "tool": "high_performance_processing",
  "arguments": {
    "content": "[large document content]",
    "operation": "analyze",
    "optimizationLevel": "high",
    "parallelProcessing": true,
    "maxConcurrency": 8
  }
}
```

## Integration with fr3ksik

md-mcp is automatically configured when you run:

```bash
npx fr3ksik init
```

It will be available in your AI CLI tools:
- Claude Code
- Gemini CLI
- OpenCode
- Copilot CLI

## Use Cases

1. **Document Conversion**: Convert between markdown, HTML, JSON, XML
2. **Content Validation**: Verify markdown syntax and links
3. **Template Generation**: Create documents from predefined templates
4. **Multimodal Processing**: Handle text, images, and mixed media
5. **Batch Operations**: Process large document sets with parallelization
6. **Content Analysis**: Extract entities, generate summaries, optimize for search

## Configuration

The md-mcp server runs via npx with no additional configuration needed:

```json
{
  "md-mcp": {
    "command": "npx",
    "args": ["-y", "md-mcp"]
  }
}
```

## Notes

- All tools use mystical/arcane naming for thematic consistency
- Tools support both simple text processing and advanced multimodal operations
- Performance optimization available through `high_performance_processing`
- Template-based document generation available through `forge_reality`

---

**Part of the FR3KSIK Universal AI CLI framework**
