Add it to Claude Code
claude mcp add -e "IMG_SRC_API_KEY=${IMG_SRC_API_KEY}" img-src -- npx @img-src/mcp-serverIMG_SRC_API_KEY+ 1 optionalMake your agent remember this setup
img-src's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- Upload images from local files, URLs, or base64 data
- Organize images using target paths
- List and manage existing images in your img-src.io account
- Generate CDN URLs for hosted images
Tools 2
upload_imageUpload an image from a local file, URL, or base64 data to your img-src.io account.list_imagesList images in your account.Environment Variables
IMG_SRC_API_KEYrequiredYour img-src.io API key (starts with imgsrc_)IMG_SRC_API_URLAPI base URL (default: https://api.img-src.io)Try it
Original README from img-src-io/mcp
img-src MCP Server
Model Context Protocol (MCP) server for img-src.io image hosting API.
This server enables AI assistants like Claude to interact with your img-src.io account - uploading, searching, listing, and managing images directly through natural language.
Installation
pnpm add -g @img-src/mcp-server
Or run directly with pnpm dlx:
pnpm dlx @img-src/mcp-server
Configuration
Environment Variables
| Variable | Required | Description |
|---|---|---|
IMG_SRC_API_KEY |
Yes | Your img-src.io API key (starts with imgsrc_) |
IMG_SRC_API_URL |
No | API base URL (default: https://api.img-src.io) |
Getting an API Key
- Log in to img-src.io
- Go to Settings > API Keys
- Create a new API key
- Copy the key (it starts with
imgsrc_)
Usage with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"img-src": {
"command": "npx",
"args": ["@img-src/mcp-server"],
"env": {
"IMG_SRC_API_KEY": "imgsrc_your_api_key_here"
}
}
}
}
Usage with Claude Code
Add to your project's .mcp.json (project-scoped) or ~/.claude/mcp.json (global):
{
"mcpServers": {
"img-src": {
"command": "npx",
"args": ["@img-src/mcp-server"],
"env": {
"IMG_SRC_API_KEY": "imgsrc_your_api_key_here"
}
}
}
}
Or add it via the CLI:
claude mcp add img-src -- npx @img-src/mcp-server
Then set the API key in your environment or .env file:
export IMG_SRC_API_KEY=imgsrc_your_api_key_here
Usage with Cursor
Open Cursor Settings (
Cmd+,on macOS /Ctrl+,on Windows/Linux)Navigate to Features > MCP Servers
Click "Add new MCP server"
Enter the following configuration:
- Name:
img-src - Type:
command - Command:
npx @img-src/mcp-server
- Name:
Add the environment variable
IMG_SRC_API_KEYwith your API key.
Alternatively, create or edit .cursor/mcp.json in your project root:
{
"mcpServers": {
"img-src": {
"command": "npx",
"args": ["@img-src/mcp-server"],
"env": {
"IMG_SRC_API_KEY": "imgsrc_your_api_key_here"
}
}
}
}
Usage with VS Code (GitHub Copilot)
Create .vscode/mcp.json in your workspace:
{
"servers": {
"img-src": {
"type": "stdio",
"command": "npx",
"args": ["@img-src/mcp-server"],
"env": {
"IMG_SRC_API_KEY": "imgsrc_your_api_key_here"
}
}
}
}
Or add via CLI:
code --add-mcp '{"name":"img-src","command":"npx","args":["@img-src/mcp-server"],"env":{"IMG_SRC_API_KEY":"imgsrc_your_api_key_here"}}'
Note: VS Code uses
"servers"(not"mcpServers") and requires"type": "stdio".
Usage with Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"img-src": {
"command": "npx",
"args": ["@img-src/mcp-server"],
"env": {
"IMG_SRC_API_KEY": "imgsrc_your_api_key_here"
}
}
}
}
Usage with Cline
Open the Cline extension in VS Code, click the MCP Servers icon > Configure MCP Servers, then add:
{
"mcpServers": {
"img-src": {
"command": "npx",
"args": ["@img-src/mcp-server"],
"env": {
"IMG_SRC_API_KEY": "imgsrc_your_api_key_here"
}
}
}
}
Usage with Zed
Add to your Zed settings (~/.config/zed/settings.json):
{
"context_servers": {
"img-src": {
"command": "npx",
"args": ["@img-src/mcp-server"],
"env": {
"IMG_SRC_API_KEY": "imgsrc_your_api_key_here"
}
}
}
}
Note: Zed uses
"context_servers"as the key, embedded within the mainsettings.json.
Usage with JetBrains IDEs
In IntelliJ IDEA, WebStorm, PyCharm, or other JetBrains IDEs:
- Go to Settings > Tools > AI Assistant > Model Context Protocol (MCP)
- Click + (Add) and paste:
{
"mcpServers": {
"img-src": {
"command": "npx",
"args": ["@img-src/mcp-server"],
"env": {
"IMG_SRC_API_KEY": "imgsrc_your_api_key_here"
}
}
}
}
Available Tools
upload_image
Upload an image from a local file, URL, or base64 data to your img-src.io account.
Upload ~/Photos/sunset.jpg to img-src as photos/vacation/sunset.jpg
Parameters:
file_path(optional): Local file path to upload (recommended for large files)url(optional): URL of the image to uploaddata(optional): Base64-encoded image datamimeType(optional): MIME type of the image (required when usingdata)target_path(optional): Target path for organizing the image
Note: One of file_path, url, or data must be provided.
list_images
List images in your account, optionally wi