sampleimg
Stateless, keyless image URLs: placeholder, banner, OG, avatar, chart, QR, pixel art.
我该使用它吗
质量与安全性
发现(6)
- HIGH
- MEDIUM在 generate_placeholder_image_url 中
- MEDIUM在 generate_product_placeholder_url 中
- LOW在 generate_product_placeholder_url 中
- INFO在 generate_placeholder_image_url 中
- INFO在 generate_product_placeholder_url 中
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"sampleimg": {
"url": "https://sampleimg.com/mcp"
}
}
}远程端点
https://sampleimg.com/mcpstreamable-http它能做什么
工具清单
工具(10)
⚪generate_placeholder_image_url(width, height, text, bg, fg, ...)
Build a sampleimg.com placeholder or deterministic mock image URL. Supports size, text, background/foreground colors, a seed with a deterministic style, and output format.
输入模式
{
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 1,
"maximum": 4096,
"description": "Image width in pixels (1-4096)."
},
"height": {
"type": "integer",
"minimum": 1,
"maximum": 4096,
"description": "Image height in pixels (1-4096). The width x height area must not exceed 4,194,304 pixels."
},
"text": {
"type": "string",
"maxLength": 100,
"description": "Text rendered on the image (1-100 characters). Defaults to the dimensions."
},
"bg": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Background color as 3- or 6-digit hex, with or without #."
},
"fg": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Text/foreground color as 3- or 6-digit hex, with or without #."
},
"seed": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Deterministic background seed (1-200 characters)."
},
"style": {
"type": "string",
"enum": [
"gradient",
"mesh",
"geometric",
"waves"
],
"description": "Deterministic background style. Requires seed."
},
"format": {
"type": "string",
"enum": [
"svg",
"png",
"jpeg",
"webp"
],
"default": "png",
"description": "Output format. jpeg/webp are accepted but currently return PNG."
}
},
"required": [
"width",
"height"
],
"additionalProperties": false
}⚪generate_product_placeholder_url(seed, format)
Build a sampleimg.com 1200x1200 product placeholder URL with a deterministic design derived from a seed.
输入模式
{
"type": "object",
"properties": {
"seed": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Product seed used to derive the deterministic design (1-200 characters)."
},
"format": {
"type": "string",
"enum": [
"svg",
"png",
"jpeg",
"webp"
],
"default": "png",
"description": "Output format. jpeg/webp are accepted but currently return PNG."
}
},
"required": [
"seed"
],
"additionalProperties": false
}⚪generate_og_image_url(title, description, text, bg, fg, ...)
Build a sampleimg.com 1200x630 OG image URL. Use title/description for the legacy OG template, or text for the preset-style OG image.
输入模式
{
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Title for the legacy OG template (1-100 characters)."
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Description for the legacy OG template. Requires title."
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Text for the 1200x630 preset-style OG image (1-100 characters). Cannot be combined with title."
},
"bg": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Background color as 3- or 6-digit hex, with or without #."
},
"fg": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Text/foreground color as 3- or 6-digit hex, with or without #."
},
"format": {
"type": "string",
"enum": [
"svg",
"png"
],
"description": "Output format."
}
},
"additionalProperties": false
}⚪generate_avatar_url(seed, size, format)
Build a sampleimg.com deterministic identicon avatar URL from a seed.
输入模式
{
"type": "object",
"properties": {
"seed": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Avatar seed (1-200 characters). The same seed always produces the same avatar."
},
"size": {
"type": "integer",
"minimum": 16,
"maximum": 1024,
"default": 512,
"description": "Avatar size in pixels (16-1024). Defaults to 512."
},
"format": {
"type": "string",
"enum": [
"svg",
"png"
],
"description": "Output format."
}
},
"required": [
"seed"
],
"additionalProperties": false
}⚪generate_chart_url(type, data, labels, format)
Build a sampleimg.com bar or line chart URL from numeric data and optional labels.
输入模式
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"bar",
"line"
],
"default": "bar",
"description": "Chart type. Defaults to bar."
},
"data": {
"type": "string",
"description": "Comma-separated numeric values (2-50 values), for example \"10,20,15\"."
},
"labels": {
"type": "string",
"description": "Comma-separated labels; the label count must match the data count."
},
"format": {
"type": "string",
"enum": [
"svg",
"png"
],
"description": "Output format."
}
},
"required": [
"data"
],
"additionalProperties": false
}⚪generate_qr_code_url(data, size, format)
Build a sampleimg.com QR code URL for arbitrary text or a URL.
输入模式
{
"type": "object",
"properties": {
"data": {
"type": "string",
"minLength": 1,
"maxLength": 1024,
"description": "Text or URL encoded in the QR code (1-1024 characters)."
},
"size": {
"type": "integer",
"minimum": 64,
"maximum": 1024,
"default": 256,
"description": "QR code size in pixels (64-1024). Defaults to 256."
},
"format": {
"type": "string",
"enum": [
"svg",
"png"
],
"description": "Output format."
}
},
"required": [
"data"
],
"additionalProperties": false
}⚪generate_pixel_art_url(preset, data, size, fg, bg, ...)
Build a sampleimg.com pixel art URL from a preset or a custom comma-separated 0/1 grid.
输入模式
{
"type": "object",
"properties": {
"preset": {
"type": "string",
"enum": [
"heart",
"smiley",
"check",
"arrow",
"star",
"x"
],
"description": "Built-in pixel art preset. Defaults to heart when data is omitted."
},
"data": {
"type": "string",
"description": "Comma-separated rows of 0 and 1 characters (at most 16x16, square). Cannot be combined with preset."
},
"size": {
"type": "integer",
"minimum": 64,
"maximum": 2048,
"default": 256,
"description": "Output size in pixels (64-2048). Defaults to 256."
},
"fg": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Foreground color as 3- or 6-digit hex, with or without #."
},
"bg": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Background color as 3- or 6-digit hex, with or without #."
},
"format": {
"type": "string",
"enum": [
"svg",
"png"
],
"default": "svg",
"description": "Output format. Defaults to svg."
}
},
"additionalProperties": false
}⚪generate_banner_url(template, title, subtitle, cta, image, ...)
Build a sampleimg.com banner URL from structured props (template, title, subtitle, cta, image, colors, decoration). Supports the center, split, and hero layouts; the same props always render the same image.
输入模式
{
"type": "object",
"properties": {
"template": {
"type": "string",
"enum": [
"center",
"split",
"hero"
],
"default": "center",
"description": "Layout template. split and hero require image."
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Main headline (1-100 characters)."
},
"subtitle": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Optional supporting line (1-200 characters)."
},
"cta": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"description": "Optional call-to-action pill label (1-40 characters) drawn with the accent color."
},
"image": {
"type": "string",
"pattern": "^https?://",
"maxLength": 2048,
"description": "Public http(s) image used by split (right column) and hero (full bleed). Required for those templates and rejected for center. Max 2 MB, 5-second fetch, no redirects, private hosts rejected."
},
"logo": {
"type": "string",
"pattern": "^https?://",
"maxLength": 2048,
"description": "Optional public http(s) logo rendered in the top-left corner."
},
"bg": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})(?:,#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}))?$",
"description": "Background hex color, or two comma-separated hex colors for a top-to-bottom gradient (default 111827)."
},
"fg": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Text color as 3- or 6-digit hex (default ffffff)."
},
"accent": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Accent color for the CTA pill, decorations, and border (default f59e0b)."
},
"decoration": {
"type": "string",
"enum": [
"none",
"dots",
"grid",
"diagonal",
"border"
],
"default": "none",
"description": "Background decoration. split and hero accept only none or border."
},
"align": {
"type": "string",
"enum": [
"left",
"center"
],
"description": "Text alignment. Defaults to center (left for split)."
},
"format": {
"type": "string",
"enum": [
"svg",
"png"
],
"default": "png",
"description": "Output format."
},
"preset": {
"type": "string",
"enum": [
"og",
"x",
"square",
"story"
],
"default": "og",
"description": "Size preset (og 1200x630, x 1600x900, square 1080x1080, story 1080x1920). Cannot be combined with width/height."
},
"width": {
"type": "integer",
"minimum": 320,
"maximum": 4096,
"description": "Banner width in pixels (320-4096). Requires height."
},
"height": {
"type": "integer",
"minimum": 200,
"maximum": 4096,
"description": "Banner height in pixels (200-4096). Requires width. The width x height area must not exceed 4,194,304 pixels."
}
},
"required": [
"title"
],
"additionalProperties": false
}🟡generate_banner_set(template, title, subtitle, cta, image, ...)
Build a consistent set of sampleimg.com banner URLs across social size presets (og 1200x630, x 1600x900, square 1080x1080, story 1080x1920) from shared props. Returns one dimensioned URL per preset; the same props always render the same images.
输入模式
{
"type": "object",
"properties": {
"template": {
"type": "string",
"enum": [
"center",
"split",
"hero"
],
"default": "center",
"description": "Layout template. split and hero require image."
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Main headline (1-100 characters)."
},
"subtitle": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Optional supporting line (1-200 characters)."
},
"cta": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"description": "Optional call-to-action pill label (1-40 characters) drawn with the accent color."
},
"image": {
"type": "string",
"pattern": "^https?://",
"maxLength": 2048,
"description": "Public http(s) image used by split (right column) and hero (full bleed). Required for those templates and rejected for center. Max 2 MB, 5-second fetch, no redirects, private hosts rejected."
},
"logo": {
"type": "string",
"pattern": "^https?://",
"maxLength": 2048,
"description": "Optional public http(s) logo rendered in the top-left corner."
},
"bg": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})(?:,#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}))?$",
"description": "Background hex color, or two comma-separated hex colors for a top-to-bottom gradient (default 111827)."
},
"fg": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Text color as 3- or 6-digit hex (default ffffff)."
},
"accent": {
"type": "string",
"pattern": "^#?(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Accent color for the CTA pill, decorations, and border (default f59e0b)."
},
"decoration": {
"type": "string",
"enum": [
"none",
"dots",
"grid",
"diagonal",
"border"
],
"default": "none",
"description": "Background decoration. split and hero accept only none or border."
},
"align": {
"type": "string",
"enum": [
"left",
"center"
],
"description": "Text alignment. Defaults to center (left for split)."
},
"format": {
"type": "string",
"enum": [
"svg",
"png"
],
"default": "png",
"description": "Output format."
},
"presets": {
"type": "array",
"items": {
"type": "string",
"enum": [
"og",
"x",
"square",
"story"
]
},
"minItems": 1,
"maxItems": 4,
"uniqueItems": true,
"description": "Size presets to include, in order. Defaults to all four: og, x, square, story."
}
},
"required": [
"title"
],
"additionalProperties": false
}🟢get_api_documentation
Return sampleimg.com documentation links for agents: llms.txt, OpenAPI, and the MCP endpoint.
输入模式
{
"type": "object",
"properties": {},
"additionalProperties": false
}社区
证据