Skip to main content
Glama
Hamzaaamin

Get Joke

by Hamzaaamin
README.md
# 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).

TDQS

B3.4/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'get_joke' has a clear and distinct purpose, making it impossible for an agent to misselect among non-existent alternatives.

Naming Consistency5/5

The single tool name 'get_joke' follows a consistent verb_noun pattern (get + joke). Since there is only one tool, there is no inconsistency in naming conventions to evaluate, and it adheres to a predictable style.

Tool Count2/5

A single tool is too few for most server purposes, as it limits functionality and scope. While it might suffice for a minimal joke service, it feels thin and lacks depth, potentially hindering more complex agent interactions or broader use cases.

Completeness3/5

Inferring the domain as joke retrieval, the tool 'get_joke' provides a basic operation. However, there are notable gaps: no ability to filter jokes by category, search for specific jokes, or manage a joke collection (e.g., create, update, delete), which limits the surface's utility for varied agent needs.

Maintenance

ActivityInactive
ResponsivenessNo issues