Labsco
sbmagar13 logo

Hashnode MCP Server

โ˜… 6

from sbmagar13

An MCP server for interacting with the Hashnode API.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

MseeP.ai Security Assessment Badge

Hashnode MCP Server

A Model Context Protocol (MCP) server for interacting with the Hashnode API. This server provides tools for accessing and searching Hashnode content programmatically.

Hashnode MCP Server

Demo

  • Create Article Create Article
  • Update Article Update Article

Features

  • Creating and publishing new articles
  • Updating existing articles
  • Searching for articles by keywords
  • Retrieving article details
  • Getting user information
  • Fetching the latest articles from a publication

Environment Variables

  • HASHNODE_PERSONAL_ACCESS_TOKEN: Your Hashnode personal access token
  • HASHNODE_API_URL: The Hashnode GraphQL API URL (default: https://gql.hashnode.com)

GitHub Repository

The source code for this project is available on GitHub: https://github.com/sbmagar13/hashnode-mcp-server

Technical Architecture

The project is organized with a clean, modular structure:

  • mcp_server.py: Root server implementation that can be run directly
  • hashnode_mcp/: Core package containing the modular functionality
    • mcp_server.py: Package version of the server implementation
    • utils.py: Utility functions for formatting responses and GraphQL queries
  • run_server.py: Entry point for running the server using the package version

The server uses asynchronous programming with Python's asyncio and httpx libraries for efficient API communication. GraphQL queries and mutations are defined as constants, making them easy to maintain and update.

Future Enhancements

Planned future developments include:

  • Additional Hashnode features (comments, series, newsletters)
  • Analytics integration
  • Content optimization
  • Multi-user support
  • Webhook support