memecub

How do I build my own meme MCP server for Cursor?

Build a small Node.js project, add the MCP SDK, expose one tool (for example search_memes) that returns image URLs, then register the server in Cursor's MCP settings and restart. The minimum loop is: scaffold a folder, install @modelcontextprotocol/sdk, write a stdio server with a tool handler, and point Cursor at the built file. If you would rather skip the build, memecub already runs a remote MCP server at https://memecub.com/mcp that Cursor can connect to directly.

How a meme MCP server works

An MCP server is a small process that exposes tools to an MCP client. Cursor is the client; your server is the thing that actually searches or renders memes.

Cursor launches your server, asks it what tools it offers, and then calls those tools when the model decides a meme is needed. The server returns text and image URLs, and Cursor shows them in the chat.

For a meme server, one tool is usually enough: a search that takes a query like “tired debugging” and returns a few image URLs with titles. A second tool that returns a random meme is a nice extra.

Build it: folder, SDK, one tool

1. Make a folder and run npm init -y, then npm install @modelcontextprotocol/sdk zod.

2. Create server.js. Register a tool named search_memes with a query string input, and in the handler call your meme source and return the results as content items with image URLs.

3. A minimal shape looks like this: import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; const server = new McpServer({ name: 'meme-server', version: '1.0.0' }); server.tool('search_memes', { query: z.string() }, async ({ query }) => ({ content: [{ type: 'text', text: 'results for ' + query }] })); await server.connect(new StdioServerTransport());

4. Replace the placeholder text with real results. You can scrape nothing and instead call an existing API: memecub's REST API does search at one credit per call, and its remote MCP server at https://memecub.com/mcp is a working reference for what a meme tool should return.

5. Run node server.js once to confirm it starts without errors before touching Cursor.

Connect it in Cursor

Open Cursor settings, go to MCP, and add a new server. For a local stdio server, the command is node and the argument is the absolute path to server.js.

Save, then restart Cursor or reload the MCP servers. The tool should appear in the list; if it does not, check the server logs Cursor shows for that entry.

In chat, ask something like “find me a meme about a server that finally works” and approve the tool call when Cursor asks.

If you do not want to maintain a server, add the hosted one instead: the URL https://memecub.com/mcp, no build step. The keyless trial gives 20 searches a day, and there is also a skill you can install with npx skills add https://memecub.com into Cursor.

Tone, licensing and what to return

Return a few candidates, not one image, so the model can pick. Include the title and a short description with each URL; that text is what the model reasons over.

Most memes online are collected from the web: fine for personal chats, but copyright stays with the original creators and they are not for commercial use. If your server will serve a product, filter to openly licensed sources such as Openverse, open-source emoji or public-domain art.

Keep responses small. A handful of URLs per call keeps the chat readable and avoids blowing up the context window.

Let your AI find the memes

REST API, remote MCP, CLI and a skill. Try 20 searches a day without a key.

More that fit

FAQ

Do I need an API key to test a meme MCP server?

Not necessarily. memecub's remote MCP server has a keyless trial of 20 searches a day, which is enough to test the Cursor connection before you build your own.

Can I use a hosted meme MCP server instead of building one?

Yes. Add https://memecub.com/mcp as a remote MCP server in Cursor and skip the code entirely. Building your own makes sense when you need custom sources or output formats.

What language should I write the server in?

Any language with an MCP SDK works. Node.js with @modelcontextprotocol/sdk is the shortest path because Cursor can launch it with a single node command.

Why does Cursor not show my meme tool?

Usually the server crashed on start or the path is wrong. Run the file directly in a terminal first, then check the MCP server logs in Cursor settings.

Are the memes safe to use commercially?

Most collected memes are for personal chats only and copyright stays with the original creators. Use the openly licensed filter if you need commercial use.