Get the FREE Ultimate OpenClaw Setup Guide →

hashnode

A Model Context Protocol (MCP) server that connects AI assistants to the Hashnode API, enabling seamless content creation, management, and retrieval through AI interactions. Create, update, and search Hashnode articles directly through Claude or other AI assistants.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio sbmagar13-hashnode-mcp-server python mcp_server.py \
  --env HASHNODE_API_URL="https://gql.hashnode.com" \
  --env HASHNODE_PERSONAL_ACCESS_TOKEN="your-personal-access-token"

How to use

The Hashnode MCP Server provides programmatic access to Hashnode via a set of MCP tools. After starting the server, you can use an MCP-enabled assistant (like Claude) to test the API connection, create and update articles, fetch the latest articles from a publication, search for articles by keywords, and retrieve details about specific articles or users. The server runs locally (default localhost:8000) and communicates using Server-Sent Events (SSE) as the transport protocol. The available tools exposed by the server include test_api_connection, create_article, update_article, get_latest_articles, search_articles, get_article_details, and get_user_info. These tools enable end-to-end content creation and management against the Hashnode API, all orchestrated through MCP interactions with your AI assistant.

To get started, start the server with the command described in the installation guide, ensure your environment variables (Hashnode token and API URL) are set, and then invoke the appropriate MCP tools from your assistant. The server will handle forming GraphQL queries to Hashnode, parsing responses, and returning structured results to the MCP client for use in your workflows.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Virtual environment support (optional but recommended)
  • Internet access to install dependencies

Installation steps:

  1. Clone the repository
git clone https://github.com/sbmagar13/hashnode-mcp-server.git
cd hashnode-mcp-server
  1. Create and activate a virtual environment macOS/Linux:
python -m venv .venv
source .venv/bin/activate

Windows:

python -m venv .venv
.\venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Create a .env file in the project root with your Hashnode credentials:
HASHNODE_PERSONAL_ACCESS_TOKEN=your_personal_access_token
HASHNODE_API_URL=https://gql.hashnode.com
  1. Run the server
python run_server.py

Or run directly with the root server file:

python mcp_server.py

The server will start listening on localhost:8000 by default.

Additional notes

Environment variables:

  • HASHNODE_PERSONAL_ACCESS_TOKEN: Your Hashnode personal access token

  • HASHNODE_API_URL: Hashnode GraphQL API URL (default: https://gql.hashnode.com)

  • When configuring in Claude Desktop or Cline VSCode extension, point to the root mcp_server.py and ensure the env vars are provided in the config snippet as shown in the README.

  • If you encounter connection issues, verify the server is running, the paths in the config are correct, and that the environment variables are exported to the process running the MCP server. Check server logs for errors and consider restarting both the MCP server and the host application.

  • The hashnode_mcp package within the repository contains the modular implementation; the root mcp_server.py is the entry point for direct execution.

Related MCP Servers

Sponsor this space

Reach thousands of developers