()
| 424 | }); |
| 425 | |
| 426 | export 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 | |
| 475 | export const makeEchoMcpServer = ( |
| 476 | options: { |
nothing calls this directly
no test coverage detected