Snagit
A Model Context Protocol server for Snagit screen capture integration
Ask AI about Snagit
Powered by Claude Β· Grounded in docs
I know everything about Snagit. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
MCP.Snagit - Model Context Protocol Server for Snagit
A .NET 9 MCP (Model Context Protocol) server that provides AI assistants with access to Snagit screen captures stored in iCloud.
β PROVEN SOLUTION - File Path Mode
This implementation successfully solves the MCP image token limit problem by extracting images to temporary files and returning file paths that Claude can read directly. No more token limit errors for any image size!
Overview
MCP.Snagit enables AI assistants like Claude Desktop to access and analyze your Snagit captures directly. It automatically handles:
- Discovery of Snagit captures in iCloud Documents
- Extraction of images from .snagx archive files
- Image resizing to meet AI model constraints
- Client-aware formatting (Claude Desktop, VS Code, etc.)
Features
Core Tools
-
list_captures - List available Snagit captures
- Returns metadata about recent captures
- Supports filtering by date range
- Includes file size and timestamp information
-
get_last_capture - Retrieve the most recent capture
- Automatically finds the newest .snagx file
- Extracts and returns the image
- Resizes to fit client constraints
-
get_capture - Get a specific capture by filename
- Supports partial filename matching
- Returns the full image data
-
get_captures - Get multiple captures
- Accepts an array of filenames
- Batch processing for efficiency
Image Processing
- Automatic resizing to meet Claude's limits (5MB, 8000x8000 pixels)
- Format optimization based on detected client
- Metadata preservation for capture context
Installation
Prerequisites
- .NET 9.0 SDK or later
- Snagit installed (any platform)
- Access to Snagit capture files (.snagx format)
Build from Source
# Clone the repository
git clone https://github.com/Bisiar/mcp-snagit.git
cd mcp-snagit
# Restore dependencies
dotnet restore
# Build the project
dotnet build --configuration Release
# Publish as self-contained
dotnet publish -c Release -o published
Configuration
β οΈ Important:
- Update Paths: Replace
/path/to/your/mcp-snagit/with the actual directory where you cloned this repository.- Snagit Path: Set the
SNAGIT_PATHto where your Snagit captures are stored (defaults to macOS iCloud location).- Cross-Platform: Works with any Snagit installation - just point
SNAGIT_PATHto your capture directory.
Claude Desktop Setup
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"snagit": {
"command": "/usr/local/share/dotnet/dotnet",
"args": [
"/path/to/your/mcp-snagit/published/MCP.Snagit.dll"
],
"env": {
"SNAGIT_PATH": "~/Library/Mobile Documents/iCloud~com~TechSmith~Snagit/Documents",
"MAX_IMAGE_WIDTH": "2048",
"MAX_IMAGE_HEIGHT": "2048",
"MCP_CLIENT_TYPE": "claude-desktop"
}
}
}
}
Note:
- Replace
/path/to/your/mcp-snagit/with the actual path where you cloned this repository. - macOS: The default
SNAGIT_PATHabove works for iCloud-synced Snagit captures. - Windows: Set
SNAGIT_PATHto your Snagit captures folder (e.g.,C:\\Users\\YourName\\Documents\\Snagitor similar). - Custom: Set
SNAGIT_PATHto any folder containing.snagxfiles.
Environment Variables
SNAGIT_PATH- Path to Snagit documents folder (optional, defaults to macOS iCloud location)MAX_IMAGE_WIDTH- Maximum image width in pixels (default: 2048)MAX_IMAGE_HEIGHT- Maximum image height in pixels (default: 2048)MCP_CLIENT_TYPE- Client type for format optimization (claude-desktop, vscode, etc.)CACHE_DURATION_MINUTES- How long to cache extracted images (default: 15)
Usage Examples
In Claude Desktop
Once configured, you can use natural language:
"Show me my last Snagit capture"
"List my recent screenshots from today"
"Get the capture named 'login-screen'"
"Show me all captures from this morning"
Direct Tool Usage
// List recent captures
{
"tool": "list_captures",
"arguments": {
"count": 10,
"startDate": "2025-06-07"
}
}
// Get specific capture - File path mode (default, most efficient)
{
"tool": "get_capture",
"arguments": {
"filename": "2025-06-07_09-52-32.snagx",
"maxWidth": 1920
}
}
// Get specific capture - Reference mode (lightweight)
{
"tool": "get_capture",
"arguments": {
"filename": "2025-06-07_09-52-32.snagx",
"mode": "reference"
}
}
// Get specific capture - Base64 mode (for remote servers)
{
"tool": "get_capture",
"arguments": {
"filename": "2025-06-07_09-52-32.snagx",
"maxWidth": 1920,
"mode": "base64"
}
}
Image Return Modes
The MCP supports three modes for returning images:
-
File Path Mode (default) β RECOMMENDED - Extracts image to temp file and returns path
- Most efficient: No token usage for image data (only ~20 tokens for metadata)
- Works with any image size: No more "exceeds maximum tokens" errors
- Direct access: Claude reads the file directly using the Read tool
- Automatic cleanup: Temp files stored in project directory
- Full quality: Supports image resizing while maintaining quality
-
Reference Mode - Returns a lightweight reference to the image
- Moderate efficiency (~100 tokens for reference)
- Returns resource URI for programmatic access
- Good for building MCP resource chains
-
Base64 Mode - Returns the full image as base64 data
- Token heavy: ~40,000+ tokens, hits limits with normal screenshots
- Compatible with remote MCP servers
- Use only when file path mode isn't available
Success Story
After implementing file path mode, images that previously failed with "response exceeds maximum allowed tokens (25000)" now work perfectly, regardless of size. The solution is elegant, efficient, and leverages Claude's existing file reading capabilities.
Technical Details
File Path Implementation
The breakthrough solution stores extracted images in a temp_captures directory within the MCP project:
/path/to/your/mcp-snagit/
βββ published/ # MCP server binaries
βββ temp_captures/ # Extracted images for Claude
β βββ snagit_capture_20250608_105234_abc123.png
β βββ snagit_capture_20250608_105445_xyz789.png
βββ ...
Process Flow:
- MCP extracts image from .snagx ZIP file
- Applies any requested resizing using SixLabors.ImageSharp
- Saves to temp_captures/ with unique filename
- Returns file path to Claude (~20 tokens)
- Claude uses Read tool to access image directly (0 additional tokens for image data)
File Format
Snagit .snagx files are ZIP archives containing:
thumbnail.png- Preview image{GUID}.json- Capture metadata{GUID}.snagt- Additional capture datametadata.json- File metadata
Image Processing Pipeline
- Discovery - Scan Snagit directory for .snagx files
- Extraction - Unzip and extract thumbnail.png
- Analysis - Check image dimensions and size
- Resizing - Scale down if exceeds limits using high-quality algorithms
- Encoding - Convert to base64 for transport
- Caching - Store processed images temporarily
Client Detection
The server attempts to detect the client through:
- MCP context headers (if available)
MCP_CLIENT_TYPEenvironment variable- Process name inspection
- Default to Claude-compatible format
Development
Project Structure
/MCP.Snagit
βββ Program.cs # Entry point and MCP server setup
βββ Tools/
β βββ SnagitTools.cs # Tool implementations
βββ Services/
β βββ SnagitService.cs # Core capture handling logic
β βββ ImageProcessor.cs # Image resizing and optimization
βββ Models/
β βββ SnagitCapture.cs # Data models
βββ MCP.Snagit.csproj # Project configuration
Key Dependencies
ModelContextProtocol- MCP server implementationSixLabors.ImageSharp- Image processingSystem.IO.Compression- ZIP file handling
Adding New Tools
- Add method to
SnagitToolsclass with[McpServerTool]attribute - Implement logic using
SnagitService - Return JSON-serialized results
- Update README documentation
Troubleshooting
Common Issues
-
"No captures found"
- Verify Snagit is saving to iCloud Documents
- Check
SNAGIT_PATHenvironment variable - Ensure proper file permissions
-
"Image too large"
- Automatic resizing should handle this
- Check
MAX_IMAGE_WIDTH/HEIGHTsettings - Verify ImageSharp is properly installed
-
"Server not responding"
- Check Claude Desktop logs:
~/Library/Logs/Claude/ - Verify .NET runtime is installed
- Test server manually (see below)
- Check Claude Desktop logs:
Manual Testing
# Test server initialization
echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"1.0.0","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":1}' | dotnet run
# Test tool discovery
echo '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":2}' | dotnet run
Debug Mode
Set environment variable for verbose logging:
export MCP_DEBUG=true
Security Considerations
- Only accesses files in designated Snagit directory
- No network requests or external API calls
- Images are processed in memory (no temp files)
- Respects system file permissions
License
[Your License Here]
Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
Reference Implementation
This MCP server serves as a proven reference for handling large binary data in MCP servers. The file path approach solves a fundamental limitation in current MCP implementations and can be adapted for:
- PDF document servers
- Audio/video file servers
- CAD file servers
- Any MCP dealing with large binary assets
The pattern is simple: extract β save to temp location β return file path β let Claude read directly.
Roadmap
- Solve token limit issues - β COMPLETED with file path mode
- Cross-platform support - β
COMPLETED - Works on any platform with custom
SNAGIT_PATH - Video capture support (.mp4 from Snagit)
- Advanced search filters (by content, tags)
- Batch export functionality
- Integration with Snagit's annotation data
