MCP & API Integration Guide
Integrate SnipMe with Cursor AI and use our REST API
MCP Integration - Cursor AI
What is MCP?
Model Context Protocol (MCP) allows AI assistants in Cursor and other tools to use external services. With SnipMe's MCP server, AI can create beautiful code snippet images directly in your editor.
Setup for Cursor
Also works with Claude Desktop
You can also use SnipMe with Claude Desktop. Configuration:
{
"mcpServers": {
"snipme": {
"type": "streamablehttp",
"url": "https://snapi.aniruddhadev.in/api/mcp"
}
}
}Config file locations:
• macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
• Windows: %APPDATA%\Claude\claude_desktop_config.json
• Linux: ~/.config/Claude/claude_desktop_config.json
Example Prompts:
Troubleshooting:
REST API Guide
Base URL
https://snapi.aniruddhadev.inEndpoint: POST /api/snippet
Generate beautiful code snippet images with customizable themes and templates.
Request Body:
{
"code": "const hello = 'world';",
"language": "javascript",
"theme": "monokai",
"templateName": "fire",
"editorStyle": "classic",
"format": "png"
}Parameters:
| Parameter | Required | Default | Description |
|---|---|---|---|
| code | ✅ Yes | - | The code to render |
| language | ❌ No | javascript | Programming language |
| theme | ❌ No | monokai | Color theme |
| templateName | ❌ No | fire | Background template |
| editorStyle | ❌ No | classic | Editor window style |
| format | ❌ No | png | Output format (png/jpeg/base64) |
Quick Example:
curl -X POST https://snapi.aniruddhadev.in/api/snippet \
-H "Content-Type: application/json" \
-d '{"code": "console.log(\"Hello!\");", "language": "javascript"}' \
--output snippet.pngAvailable Themes:
Available Templates:
Need more help? Check out our GitHub repository