trackmcp
Back to directory
larryhudson

mcp-server-example-image-block

View on GitHub

An example MCP server that sends image blocks

1 stars JavaScriptServers & Infrastructure Updated May 24, 2025

Documentation

Example MCP Server with image blocks

Overview

An example MCP server that returns a random image from the Lorem Picsum API. This is just an example to show how MCP servers can return image blocks.

See also: Image Content in the Model Context Protocol specification

Usage

Using with VS Code

Add this to your settings JSON file:

json
{
  "mcp": {
    "servers": {
      "random_image": {
        "command": "npx",
        "args": [
          "-y",
          "@larryhudson/mcp-server-example-image-block"
        ],
      }
    }
  }
}

Using with Claude or other MCP-compatible applications

Add this to your MCP configuration JSON file:

json
{
  "mcpServers": {
    "random_image": {
      "command": "npx",
      "args": ["-y", "@larryhudson/mcp-server-example-image-block"],
    }
  }
}

Available Tools

  • `get_random_image` - get a random image using the Lorem Picsum API.

Technical Details

Built with:

  • Model Context Protocol (MCP): Framework for allowing AI assistants to interact with external tools
  • TypeScript: For type safety and better developer experience

Development

You can use the Model Context Protocol inspector to try out the server:

bash
npx @modelcontextprotocol/inspector npx tsx src/index.ts

License

MIT

Frequently asked questions

What is mcp-server-example-image-block?

mcp-server-example-image-block is An example MCP server that sends image blocks

How do I install mcp-server-example-image-block?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is mcp-server-example-image-block open source?

Yes — it is hosted on GitHub at https://github.com/larryhudson/mcp-server-example-image-block and has 1 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP