{
  "markdown": "# img-src MCP Server\n\nModel Context Protocol (MCP) server for [img-src.io](https://img-src.io) image hosting API.\n\nThis server enables AI assistants like Claude to interact with your img-src.io account - uploading, searching, listing, and managing images directly through natural language.\n\n## Installation\n\n```bash\npnpm add -g @img-src/mcp-server\n```\n\nOr run directly with pnpm dlx:\n\n```bash\npnpm dlx @img-src/mcp-server\n```\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `IMG_SRC_API_KEY` | Yes | Your img-src.io API key (starts with `imgsrc_`) |\n| `IMG_SRC_API_URL` | No | API base URL (default: `https://api.img-src.io`) |\n\n### Getting an API Key\n\n1. Log in to [img-src.io](https://img-src.io)\n2. Go to Settings > API Keys\n3. Create a new API key\n4. Copy the key (it starts with `imgsrc_`)\n\n## Usage with Claude Desktop\n\nAdd to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"img-src\": {\n      \"command\": \"npx\",\n      \"args\": [\"@img-src/mcp-server\"],\n      \"env\": {\n        \"IMG_SRC_API_KEY\": \"imgsrc_your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n## Usage with Claude Code\n\nAdd to your project's `.mcp.json` (project-scoped) or `~/.claude/mcp.json` (global):\n\n```json\n{\n  \"mcpServers\": {\n    \"img-src\": {\n      \"command\": \"npx\",\n      \"args\": [\"@img-src/mcp-server\"],\n      \"env\": {\n        \"IMG_SRC_API_KEY\": \"imgsrc_your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\nOr add it via the CLI:\n\n```bash\nclaude mcp add img-src -- npx @img-src/mcp-server\n```\n\nThen set the API key in your environment or `.env` file:\n\n```bash\nexport IMG_SRC_API_KEY=imgsrc_your_api_key_here\n```\n\n## Usage with Cursor\n\n1. Open Cursor Settings (`Cmd+,` on macOS / `Ctrl+,` on Windows/Linux)\n2. Navigate to **Features > MCP Servers**\n3. Click **\"Add new MCP server\"**\n4. Enter the following configuration:\n   - **Name**: `img-src`\n   - **Type**: `command`\n   - **Command**: `npx @img-src/mcp-server`\n\n5. Add the environment variable `IMG_SRC_API_KEY` with your API key.\n\nAlternatively, create or edit `.cursor/mcp.json` in your project root:\n\n```json\n{\n  \"mcpServers\": {\n    \"img-src\": {\n      \"command\": \"npx\",\n      \"args\": [\"@img-src/mcp-server\"],\n      \"env\": {\n        \"IMG_SRC_API_KEY\": \"imgsrc_your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n## Usage with VS Code (GitHub Copilot)\n\nCreate `.vscode/mcp.json` in your workspace:\n\n```json\n{\n  \"servers\": {\n    \"img-src\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"@img-src/mcp-server\"],\n      \"env\": {\n        \"IMG_SRC_API_KEY\": \"imgsrc_your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\nOr add via CLI:\n\n```bash\ncode --add-mcp '{\"name\":\"img-src\",\"command\":\"npx\",\"args\":[\"@img-src/mcp-server\"],\"env\":{\"IMG_SRC_API_KEY\":\"imgsrc_your_api_key_here\"}}'\n```\n\n> **Note:** VS Code uses `\"servers\"` (not `\"mcpServers\"`) and requires `\"type\": \"stdio\"`.\n\n## Usage with Windsurf\n\nAdd to `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"img-src\": {\n      \"command\": \"npx\",\n      \"args\": [\"@img-src/mcp-server\"],\n      \"env\": {\n        \"IMG_SRC_API_KEY\": \"imgsrc_your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n## Usage with Cline\n\nOpen the Cline extension in VS Code, click the **MCP Servers** icon > **Configure MCP Servers**, then add:\n\n```json\n{\n  \"mcpServers\": {\n    \"img-src\": {\n      \"command\": \"npx\",\n      \"args\": [\"@img-src/mcp-server\"],\n      \"env\": {\n        \"IMG_SRC_API_KEY\": \"imgsrc_your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n## Usage with Zed\n\nAdd to your Zed settings (`~/.config/zed/settings.json`):\n\n```json\n{\n  \"context_servers\": {\n    \"img-src\": {\n      \"command\": \"npx\",\n      \"args\": [\"@img-src/mcp-server\"],\n      \"env\": {\n        \"IMG_SRC_API_KEY\": \"imgsrc_your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n> **Note:** Zed uses `\"context_servers\"` as the key, embedded within the main `settings.json`.\n\n## Usage with JetBrains IDEs\n\nIn IntelliJ IDEA, WebStorm, PyCharm, or other JetBrains IDEs:\n\n1. Go to **Settings > Tools > AI Assistant > Model Context Protocol (MCP)**\n2. Click **+** (Add) and paste:\n\n```json\n{\n  \"mcpServers\": {\n    \"img-src\": {\n      \"command\": \"npx\",\n      \"args\": [\"@img-src/mcp-server\"],\n      \"env\": {\n        \"IMG_SRC_API_KEY\": \"imgsrc_your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n## Available Tools\n\n### upload_image\n\nUpload an image from a local file, URL, or base64 data to your img-src.io account.\n\n```\nUpload ~/Photos/sunset.jpg to img-src as photos/vacation/sunset.jpg\n```\n\n**Parameters:**\n- `file_path` (optional): Local file path to upload (recommended for large files)\n- `url` (optional): URL of the image to upload\n- `data` (optional): Base64-encoded image data\n- `mimeType` (optional): MIME type of the image (required when using `data`)\n- `target_path` (optional): Target path for organizing the image\n\nNote: One of `file_path`, `url`, or `data` must be provided.\n\n### list_images\n\nList images in your account, optionally within a specific folder.\n\n```\nList my img-src images in the photos/vacation folder\n```\n\n**Parameters:**\n- `folder` (optional): Folder path to list\n- `limit` (optional): Max items to return (default: 50)\n- `offset` (optional): Items to skip for pagination\n\n### search_images\n\nSearch for images by filename or path.\n\n```\nSearch for img-src images containing \"beach\"\n```\n\n**Parameters:**\n- `query` (required): Search query\n- `limit` (optional): Max results (default: 20)\n- `offset` (optional): Results to skip\n\n### get_image\n\nGet detailed metadata for a specific image.\n\n```\nGet details for my img-src image at photos/vacation/sunset.jpg\n```\n\n**Parameters:**\n- `id` (required): Image ID (UUID) or filepath\n\n### delete_image\n\nPermanently delete an image.\n\n```\nDelete my img-src image at photos/old/unused.jpg\n```\n\n**Parameters:**\n- `id` (required): Image ID (UUID) or filepath to delete\n\n### get_usage\n\nView your current usage statistics.\n\n```\nShow my img-src usage stats\n```\n\n### get_settings\n\nGet your account settings and configuration.\n\n```\nWhat are my img-src account settings?\n```\n\n### get_cdn_url\n\nGenerate a CDN URL with optional image transformations.\n\n```\nGenerate an img-src CDN URL for john/photos/beach.jpg resized to 800x600\n```\n\n**Parameters:**\n- `username` (required): Image owner's username\n- `filepath` (required): Image path\n- `width` (optional): Resize width\n- `height` (optional): Resize height\n- `fit` (optional): cover, contain, fill, scale-down\n- `quality` (optional): 1-100 (default: 80)\n- `format` (optional): webp, avif, jpeg, png, jxl\n\n## Resources\n\nThe MCP server exposes your images as resources that Claude can access directly:\n\n- **URI format**: `imgsrc://images/{imageId}`\n- **Content**: JSON metadata including dimensions, formats, and CDN URLs\n\nClaude can list and read these resources to understand what images you have and their properties.\n\n## Prompts\n\nPre-built prompts for common workflows:\n\n### upload-and-share\nUpload an image and get shareable CDN URLs.\n- Arguments: `imageUrl` (required), `width` (optional)\n\n### check-usage\nCheck account usage and storage status.\n- No arguments required\n\n### find-images\nSearch for images by keyword.\n- Arguments: `query` (required)\n\n## Example Conversations\n\n### Upload and share an image\n\n> User: Upload ~/Photos/sunset.jpg to img-src and give me a resized URL\n\n> Claude: I'll upload that image and generate a CDN URL for you.\n>\n> [Uses upload_image tool]\n>\n> Image uploaded successfully! Here's a resized CDN URL:\n> https://img-src.io/i/yourname/sunset.webp?w=1200&q=85\n\n### Search and organize\n\n> User: Find all my beach photos\n\n> Claude: [Uses search_images with query \"beach\"]\n>\n> Found 5 beach photos:\n> 1. photos/vacation/beach-sunset.jpg\n> 2. photos/summer/beach-party.png\n> ...\n\n### Check usage\n\n> User: How much storage am I using?\n\n> Claude: [Uses get_usage tool]\n>\n> Your img-src.io usage:\n> - Storage: 245 MB / 500 MB (49%)\n> - Uploads: 67 / 100 this month\n> - Bandwidth: 1.2 GB / 1 GB (120% - consider upgrading!)\n\n## Development\n\n```bash\n# Install dependencies\npnpm install\n\n# Build\npnpm build\n\n# Run locally\nIMG_SRC_API_KEY=imgsrc_xxx pnpm start\n\n# Type check\npnpm type-check\n\n# Run tests\npnpm test\n```\n\n## License\n\nMIT\n",
  "bytes": 8211,
  "sha": "442ba58b793e3cf73a0107e27ced8c4417ba385a0486d09c4a8b531e7ae821bf",
  "repo_slug": "img-src-io/mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_img_src_io_mcp_42d762b2/readme"
}