Skip to main content
SoMark MCP Server is a Model Context Protocol (MCP) server that gives any MCP-compatible AI client — Claude Desktop, VS Code, Cursor, and more — direct access to SoMark’s document parsing capabilities, no code required.

Quick Start

Step 1: Get your API Key

Visit somark.tech/workbench/apikey to get your API key.

Step 2: Configure your MCP client

Add the following to your MCP client’s configuration file:
{
  "mcpServers": {
    "somark": {
      "command": "npx",
      "args": ["-y", "github:SoMarkAI/somark_mcp"],
      "env": {
        "SOMARK_API_KEY": "your-api-key-here"
      }
    }
  }
}
Config file location:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
Find the MCP configuration in VS Code settings, or edit .vscode/mcp.json.
Search for MCP in Cursor settings and add the configuration to the corresponding JSON file.

Step 3: Start parsing

Once configured, just ask your AI assistant:
“Parse this PDF for me” “Extract the key clauses from this contract” “Convert this image to Markdown”

Available Tools

The MCP Server exposes three tools:

check_api_key

Check whether the SoMark API key is configured and ready to use. No parameters required.

set_api_key

Set or update the API key at runtime — useful when the environment variable is not set.
ParameterTypeRequiredDescription
api_keystringYour SoMark API key

extract_document

Parse PDF or image files into Markdown or JSON format.
ParameterTypeRequiredDefaultDescription
file_pathstringAbsolute path to the file
output_format"markdown" | "json""markdown"Output format
extract_imagesbooleanfalseWhether to extract images from the document
languagestringauto-detectLanguage code, e.g. en, zh, ja
Example calls:
// Parse a PDF to Markdown
{
  "file_path": "/path/to/document.pdf",
  "output_format": "markdown"
}

// Parse an image to JSON with image extraction
{
  "file_path": "/path/to/image.png",
  "output_format": "json",
  "extract_images": true,
  "language": "en"
}

Supported File Formats

Documents: pdf doc docx ppt pptx Images: png jpg jpeg bmp tiff jp2 dib ppm pgm pbm gif heic heif webp xpm tga dds xbm

Troubleshooting

ProblemSolution
”API key not configured”Check env.SOMARK_API_KEY in your MCP config, or use the set_api_key tool to set it manually
Connection issuesVerify your API key is valid and somark.tech is accessible
Unsupported file formatRefer to the supported formats list above