MCP TemplateIO

MCP TemplateIO

A Model Context Protocol server that provides an image generation tool using Templated.io, allowing users to create customized images based on templates with text and image layers.

Lucker631

Image & Video Processing
Visit Server

README

MCP TemplateIO - Image Generation Tool

A Model Context Protocol (MCP) server built with mcp-framework that provides an image generation tool using Templated.io.

Overview

This template provides a starting point for building MCP servers with custom tools. It includes an example tool and instructions on how to add more tools, develop them, and publish them to npm. This README will guide you through the process of setting up, developing, and deploying your own MCP server.

Quick Start

# Install dependencies
npm install

# Build the project
npm run build

Project Structure

mcp-templateio/
├── src/
│   ├── tools/        # MCP Tools
│   │   ├── ExampleTool.ts
│   │   └── TemplatedImageTool.ts # Image generation tool
│   └── index.ts      # Server entry point
├── package.json
└── tsconfig.json

Available Tools

Templated Image Generator

This tool generates an image based on a template, given text and image URLs, using the Templated.io API.

Input Parameters:

  • templateId: ID of the Templated.io template to use
  • photoBgImageUrl: URL for the image to place in the "photo-bg" layer.
  • bgYellowImageUrl: URL for the image to place in the "bg-yellow" layer.
  • buildText: Text content for the "build" text layer.

Tool Development

Example tool structure:

import { MCPTool } from "mcp-framework";
import { z } from "zod";

interface MyToolInput {
  message: string;
}

class MyTool extends MCPTool<MyToolInput> {
  name = "my_tool";
  description = "Describes what your tool does";

  schema = {
    message: {
      type: z.string(),
      description: "Description of this input parameter",
    },
  };

  async execute(input: MyToolInput) {
    // Your tool logic here
    return `Processed: ${input.message}`;
  }
}

export default MyTool;

Adding Components

The project comes with an example tool in src/tools/ExampleTool.ts and the TemplatedImageTool.ts. You can add more tools using the CLI:

# Add a new tool
mcp add tool my-tool

# Example tools you might create:
mcp add tool data-processor
mcp add tool api-client
mcp add tool file-handler

Publishing to npm

  1. Update your package.json:

    • Ensure name is unique and follows npm naming conventions
    • Set appropriate version
    • Add description, author, license, etc.
    • Check bin points to the correct entry file
  2. Build and test locally:

    npm run build
    npm link
    mcp-templateio  # Test your CLI locally
    
  3. Login to npm (create account if necessary):

    npm login
    
  4. Publish your package:

    npm publish
    

After publishing, users can add it to their claude desktop client (read below) or run it with npx

Using with Claude Desktop

Local Development

Add this configuration to your Claude Desktop config file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "mcp-templateio": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-templateio/dist/index.js"]
    }
  }
}

After Publishing

GET YOUR API KEY HERE: https://app.templated.io/api-integration?template=4ae9a86b-4ecd-44ee-aebd-7c5a49c16969

Add this configuration to your Claude Desktop config file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "mcp-templateio": {
      "command": "node",
      "args": [
        "C:\\Users\\alex0\\Documents\\AA_CodeAndScripts\\modelcontextprotocol\\mcp-templateio\\dist\\index.js"
      ],
      "env": {"TEMPLATED_API_KEY":"YOUR-API-KEY-HERE"}
    },
  }
}

Building and Testing

  1. Make changes to your tools
  2. Run npm run build to compile
  3. The server will automatically load your tools on startup

Learn More

Recommended Servers

Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
@kazuph/mcp-fetch

@kazuph/mcp-fetch

Model Context Protocol server for fetching web content and processing images. This allows Claude Desktop (or any MCP client) to fetch web content and handle images appropriately.

Featured
Local
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
mcp-pinterest

mcp-pinterest

A Pinterest Model Context Protocol (MCP) server for image search and information retrieval

Featured
TypeScript
DeepSRT MCP Server

DeepSRT MCP Server

An MCP server that enables users to generate summaries of YouTube videos in multiple languages and formats through integration with DeepSRT's API.

Official
JavaScript
ScreenshotOne MCP Server

ScreenshotOne MCP Server

An official MCP server implementation that allows AI assistants to capture website screenshots through the ScreenshotOne API, enabling visual context from web pages during conversations.

Official
TypeScript
Glif

Glif

Run AI workflows hosted on Glif.app via MCP, including ComfyUI-based image generators, meme generators, selfies, chained LLM calls, and more

Official
TypeScript
WebPerfect MCP Server

WebPerfect MCP Server

An intelligent MCP server with a fully automated batch pipeline for web-ready images. Features include noise reduction, auto levels/curves, JPEG artifact removal, 4K resizing, smart sharpening with shadow/highlight enhancement, and advanced WebP conversion.

Local
JavaScript
Stealth Browser MCP Server

Stealth Browser MCP Server

Provides stealth browser capabilities using Playwright with anti-detection techniques, allowing MCP clients to navigate websites and take screenshots while evading common bot detection systems.

Local
TypeScript
MCP-LOGO-GEN

MCP-LOGO-GEN

MCP Tool Server for Logo Generation. This server provides logo generation capabilities using FAL AI, with tools for image generation, background removal, and image scaling.

Local
Python