diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5459f2c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +FROM node:lts-alpine + +# Set working directory +WORKDIR /app + +# Copy package.json and yarn.lock (or package-lock.json) to install dependencies +COPY package.json ./ +COPY yarn.lock ./ + +# Install dependencies (using yarn if available, fallback to npm) +RUN if [ -f yarn.lock ]; then yarn install --frozen-lockfile; else npm install --ignore-scripts; fi + +# Copy the rest of the files +COPY . . + +# Build the project +RUN npm run build + +# Expose the port if needed +# EXPOSE 3000 + +# Command to run the MCP server +CMD ["node", "dist/index.js"] diff --git a/README.md b/README.md index 4006986..f40ccc9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Meme MCP Server +[![smithery badge](https://smithery.ai/badge/@haltakov/meme-mcp)](https://smithery.ai/server/@haltakov/meme-mcp) + A simple Model Context Protocol (MCP) server for generating memes using the ImgFlip API. This server enables AI models and tools to generate meme images from user prompts. @@ -37,6 +39,14 @@ You can configure the meme generator server in your client using the [`meme-mcp` > Note: you need to create a free account on [ImgFlip](https://imgflip.com/signup) to get your username and password. +### Installing via Smithery + +To install Meme Generator for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@haltakov/meme-mcp): + +```bash +npx -y @smithery/cli install @haltakov/meme-mcp --client claude +``` + ### Troubleshooting Sometimes Claude Desktop fails to find the right version of `npx` (especially if you are using NVM, see this [Issue](https://github.com/modelcontextprotocol/servers/issues/64) for details). In this case, you can manually install `meme-mcp` globally and then use it directly. @@ -70,4 +80,4 @@ After configuring Claude Desktop, you need to restart it and then you will see t ## Author -This project is created for fun by [Vladimir Haltakov](https://haltakov.net). If you find it interesting you can message me on X [@haltakov](https://x.com/haltakov). \ No newline at end of file +This project is created for fun by [Vladimir Haltakov](https://haltakov.net). If you find it interesting you can message me on X [@haltakov](https://x.com/haltakov). diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..a15e143 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,31 @@ +# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml + +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - imgflipUsername + - imgflipPassword + properties: + imgflipUsername: + type: string + description: Your ImgFlip username + imgflipPassword: + type: string + description: Your ImgFlip password + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => ({ + command: 'node', + args: ['dist/index.js'], + env: { + IMGFLIP_USERNAME: config.imgflipUsername, + IMGFLIP_PASSWORD: config.imgflipPassword + } + }) + exampleConfig: + imgflipUsername: your_username + imgflipPassword: your_password