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:Claude Desktop
Claude Desktop
Config file location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
VS Code
VS Code
Find the MCP configuration in VS Code settings, or edit
.vscode/mcp.json.Cursor
Cursor
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | ✅ | Your SoMark API key |
extract_document
Parse PDF or image files into Markdown or JSON format.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_path | string | ✅ | — | Absolute path to the file |
output_format | "markdown" | "json" | ❌ | "markdown" | Output format |
extract_images | boolean | ❌ | false | Whether to extract images from the document |
language | string | ❌ | auto-detect | Language code, e.g. en, zh, ja |
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
| Problem | Solution |
|---|---|
| ”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 issues | Verify your API key is valid and somark.tech is accessible |
| Unsupported file format | Refer to the supported formats list above |

