Updated 2026-10-28
Give Claude access to images with MCP
Claude does not receive image bytes from Pixeltable Cloud MCP. get_table_rows returns JSON: at most 25 rows per call, and each string is clipped at 2000 characters. An Image column shows up as JSON (typically a URI or metadata), not pixels. If you need Claude to reason about a still, run a vision model as a computed column, then let Claude read that text.
The hosted endpoint is https://www.pixeltable.com/mcp/cloud. Claude Code is the documented client; other Claude MCP clients use the same URL. Setup overview: Pixeltable Cloud MCP.
1. Connect Cloud MCP
claude mcp add --transport http pixeltable-cloud --scope user https://www.pixeltable.com/mcp/cloudRun /mcp, select pixeltable-cloud, and complete browser sign-in. If you have no organization, ask Claude to create one. The other tools act in it at once, on the same connection, with no new sign-in.
2. Store stills and run a vision column
generate_content accepts a prompt, or a list of images and text, as contents. The caption is stored on the row. Cloud MCP never sees the pixels. Deploy the table to the hosted database, since Cloud MCP reads only that:
import pixeltable as pxt
from pixeltable.functions.gemini import generate_content
TableModel = pxt.model_base()
class Stills(TableModel, name='stills'):
image: pxt.Image
prompt: pxt.String
output = generate_content(
[prompt, image],
model='gemini-2.5-flash',
)
caption = output['candidates'][0]['content']['parts'][0]['text']
# In a project from pxt init, with google-genai in requirements.txt:
# pxt db diff pxt://myorg:main --add-config-entry
# pxt db update pxt://myorg:main -f
# pxt schema update app.py pxt://myorg:main -f
# pxt secret set pxt://myorg:main GEMINI_API_KEY=your-key
# pxt db restart pxt://myorg:mainThe hosted database reads GEMINI_API_KEY from its secrets, not from your shell, and reads secrets when it starts. Then insert a still:
import pixeltable as pxt
stills = pxt.get_table('pxt://myorg:main/stills')
stills.insert([{
'image': 'https://raw.githubusercontent.com/pixeltable/pixeltable/release/docs/resources/images/000000000009.jpg',
'prompt': 'Describe this photo in one sentence.',
}])OpenAI chat_completions with an image part is the same idea on a different UDF.
3. Ask Claude to read the caption
Claude should call get_table_schema then get_table_rows on that table and use the caption (or other text) column. It cannot open the image file through this server. It cannot run arbitrary queries or invoke a service.
Parameters: db (required; main here), path (slash-separated; stills here), optional limit (1 to 25) and offset. Full signatures: Cloud MCP tools.
What this server does not do
- It does not send image bytes, audio bytes, or video bytes to Claude.
- It does not raise Pixeltable's row clip above 2000 characters.