home / mcp / octocat hogwarts mcp server

Octocat Hogwarts MCP Server

Exposes generated Postman tools through an MCP server for seamless integration with MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jonico-octocat-harry-potter-mcp-server": {
      "command": "node",
      "args": [
        "mcpServer.js"
      ],
      "env": {
        "ACME_API_KEY": "YOUR_ACME_API_KEY"
      }
    }
  }
}

You have an MCP (Model Context Provider) server that exposes your Postman-generated API tools to MCP-compatible clients. It lets you run local tools for automated API requests and makes them accessible via standard MCP clients or environments like Claude Desktop or Postman Desktop. This guide walks you through installing, starting, and using the server so you can automate your Octocat and Harry Potter API interactions.

How to use

Start the MCP server and connect your MCP client to the exposed tools. You can run the server locally to serve the tools you generated for the Octocat and Harry Potter APIs. The server will expose endpoints or commands that your client can invoke to fetch data, such as Hogwarts staff, spells, students, houses, and Octocats.

How to install

Prerequisites you need before starting:

  • - Node.js v16+ (v20+ recommended)
  • - npm (comes with Node)

From your project root, install the dependencies:

npm install

Step-by-step run options

You can run the MCP server in different environments. Choose the method you prefer and follow the steps.

# Run locally with Node
node mcpServer.js

# Run with SSE support
node mcpServer.js --sse

# Docker-based run (production)
docker run -i --rm --env-file .env octocat-harry-potter-mcp-server

Additional options

Choose any of the following deployment or integration paths to fit your workflow.

# Claude Desktop integration (example)
# Update Claude settings to point to your MCP server as described in the configuration steps.

Notes on running methods mentioned in the setup

The server can be started in multiple ways depending on your environment. Common patterns shown include starting with Node and enabling Server-Sent Events (SSE), or running a Docker container that hosts the MCP server. In a local Node setup, the typical start command is node mcpServer.js with optional --sse flag for SSE support.

Security and environment

Environment variables that control per-workspace API keys are placed in the environment. You may have placeholders like ACME_API_KEY and WIDGETS_API_KEY in your .env file. You access them in tools via process.env.VARIABLE_NAME.

// environment variables are used inside each tool file
const apiKey = process.env.ACME_API_KEY;

Available tools

get_hogwarts_staff

Retrieve all Hogwarts staff characters.

fetch_spells

Fetch spells from the Harry Potter API.

get_hogwarts_students

Fetch all Hogwarts students from the Harry Potter API.

get_characters_in_house

Retrieve characters from a specific Hogwarts house.

get_all_characters

Retrieve all characters from the Harry Potter API.

fetch_octocats

Fetch Octocats from the Octodex API.