MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / makeImageMcpServer

Function makeImageMcpServer

packages/plugins/mcp/src/testing/server.ts:426–473  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

424});
425
426export const makeImageMcpServer = () => {
427 const server = new McpServer(
428 { name: "image-test-server", version: "1.0.0" },
429 { capabilities: {} },
430 );
431
432 server.registerTool(
433 "image_fixture",
434 {
435 description: "Returns a deterministic PNG as MCP image content",
436 inputSchema: {},
437 },
438 async () => ({
439 content: [
440 {
441 type: "image" as const,
442 data: TEST_IMAGE_PNG_BASE64,
443 mimeType: TEST_IMAGE_MIME_TYPE,
444 },
445 ],
446 structuredContent: testImageMetadata(),
447 }),
448 );
449
450 server.registerTool(
451 "image_fixture_with_metadata",
452 {
453 description: "Returns text metadata followed by MCP image content",
454 inputSchema: {},
455 },
456 async () => ({
457 content: [
458 {
459 type: "text" as const,
460 text: "Deterministic image fixture: mcp-image-fixture.png (image/png, 70 bytes)",
461 },
462 {
463 type: "image" as const,
464 data: TEST_IMAGE_PNG_BASE64,
465 mimeType: TEST_IMAGE_MIME_TYPE,
466 },
467 ],
468 structuredContent: testImageMetadata(),
469 }),
470 );
471
472 return server;
473};
474
475export const makeEchoMcpServer = (
476 options: {

Callers

nothing calls this directly

Calls 1

testImageMetadataFunction · 0.85

Tested by

no test coverage detected