Back to the catalog

io.github.Hamzaaamin/get-joke

Minimal MCP server that returns a random programming joke.

Open source Open in the app JSON README (API)

About

Minimal MCP server that returns a random programming joke.

Details

Kind
MCP servers
Topic
No topic detected
Publisher
hamzaaamin
Origin
official
Category
ferramentas
Transport
local
Version
0.1.1
Last push
2026-04-17T10:55:36Z
Repository state
ativo
Language
JavaScript
License
MIT
Added
2026-08-29 03:01:56
Updated
2026-08-29 03:01:56
Origin id
io.github.Hamzaaamin/get-joke

README

# Get Joke MCP Server

Minimal Model Context Protocol (MCP) server (Node.js) that exposes one tool: `get_joke`.

## Setup

```bash
npm install
```

## Run

```bash
node index.js
```

Or:

```bash
npm start
```

## Test (without Inspector)

This repo includes a tiny SDK-based client that spawns the server over stdio, lists tools, and calls `get_joke`:

```bash
npm run test:mcp
```

## Tool response shape

The `get_joke` tool returns JSON like:

```json
{
  "joke": "Why do programmers prefer dark mode? Because light attracts bugs."
}
```

## Publish to the MCP Registry (official)

The official MCP Registry stores **metadata** only, so you must publish the package to **npm** first.

1) Publish to npm (once):

```bash
npm adduser
npm publish --access public
```

2) Publish metadata to the MCP Registry:

```bash
brew install mcp-publisher
mcp-publisher login github
mcp-publisher publish
```

Notes:
- `package.json` includes `mcpName` and `server.json` uses the same `name` (required for verification).
- If you change the version, bump it in **both** `package.json` and `server.json` (and republish to npm).

More