<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sagar Budhathoki</title>
    <description>The latest articles on DEV Community by Sagar Budhathoki (@sbmagar13).</description>
    <link>https://dev.to/sbmagar13</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F255173%2Fade67ade-8135-4532-8d84-db96fba49cee.png</url>
      <title>DEV Community: Sagar Budhathoki</title>
      <link>https://dev.to/sbmagar13</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sbmagar13"/>
    <language>en</language>
    <item>
      <title>Connecting Claude Tools to Hashnode using MCP Server</title>
      <dc:creator>Sagar Budhathoki</dc:creator>
      <pubDate>Sat, 10 May 2025 05:07:27 +0000</pubDate>
      <link>https://dev.to/sbmagar13/connecting-claude-tools-to-hashnode-using-mcp-server-lin</link>
      <guid>https://dev.to/sbmagar13/connecting-claude-tools-to-hashnode-using-mcp-server-lin</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the rapidly evolving landscape of AI tools and integrations, the ability to extend AI capabilities through custom interfaces has become increasingly valuable. Today, I'm excited to share a project I've been working on: the &lt;strong&gt;Hashnode MCP Server&lt;/strong&gt;. This tool bridges the gap between AI assistants and the Hashnode blogging platform, enabling seamless content creation, management, and retrieval directly through AI interactions.&lt;/p&gt;

&lt;p&gt;In this article, I'll walk you through what the Model Context Protocol (MCP) is, how my Hashnode MCP server works, and how you can set it up to enhance your own content workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Demo First? (😁)&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;Create Article:&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8bkxjckypxbdg2vi7y9c.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8bkxjckypxbdg2vi7y9c.gif" alt="Create Article" width="600" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Update Article&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6cumzefbs210byet4ztm.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6cumzefbs210byet4ztm.gif" alt="Update Article" width="720" height="398"&gt;&lt;/a&gt;   &lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Model Context Protocol (MCP)?
&lt;/h2&gt;

&lt;p&gt;The Model Context Protocol (MCP) is a framework that allows AI models to interact with external tools and data sources. It provides a standardized way for AI assistants to access additional capabilities beyond their built-in functions.&lt;/p&gt;

&lt;p&gt;MCP servers act as intermediaries between AI models and external services, exposing a set of tools and resources that the AI can use to perform specific tasks. This extends what AI assistants can do without requiring them to have direct API access to every possible service.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8uwk93ic7uviqzp2vfcs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8uwk93ic7uviqzp2vfcs.png" alt="Image description" width="800" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing the Hashnode MCP Server
&lt;/h2&gt;

&lt;p&gt;The Hashnode MCP Server is a Python-based implementation that connects AI assistants to the Hashnode API. It allows AI models to perform various operations on Hashnode blogs, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Creating and publishing new articles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Updating existing articles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Searching for articles by keywords&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Retrieving article details&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Getting user information&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fetching the latest articles from a publication&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F57ztai778evletgo75iv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F57ztai778evletgo75iv.png" alt="Image description" width="800" height="751"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This means that with the Hashnode MCP Server, you can ask an AI assistant to draft a blog post, publish it to your Hashnode blog, search for related content, or update existing articles—all without leaving your conversation with the AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Hashnode MCP Server Works
&lt;/h2&gt;

&lt;p&gt;At its core, the Hashnode MCP Server is a bridge between AI assistants and the Hashnode GraphQL API. Here's how it works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Connection&lt;/strong&gt;: The MCP server establishes a connection with both the AI assistant and the Hashnode API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tool Exposure&lt;/strong&gt;: It exposes a set of tools that represent different Hashnode operations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Request Handling&lt;/strong&gt;: When the AI assistant wants to perform an action, it sends a request to the MCP server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;API Interaction&lt;/strong&gt;: The server translates this request into the appropriate GraphQL query or mutation for the Hashnode API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Response Formatting&lt;/strong&gt;: After receiving a response from Hashnode, the server formats it in a way that's easy for the AI to understand and present to the user.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The server is built using the FastMCP framework, which simplifies the process of creating MCP servers by handling the communication protocol details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up the Hashnode MCP Server
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Python 3.8 or higher&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A Hashnode account with a personal access token&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Basic familiarity with command-line operations&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Installation Steps
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Clone the repository&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/sbmagar13/hashnode-mcp-server.git
&lt;span class="nb"&gt;cd &lt;/span&gt;hashnode-mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create a virtual environment&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
&lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate  &lt;span class="c"&gt;# On Windows: .venv\Scripts\activate&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install dependencies&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set up environment variables&lt;/strong&gt;: Create a &lt;code&gt;.env&lt;/code&gt; file in the project root with the following content:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;HASHNODE_API_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://gql.hashnode.com
&lt;span class="nv"&gt;HASHNODE_PERSONAL_ACCESS_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_personal_access_token
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Replace &lt;code&gt;your_personal_access_token&lt;/code&gt; with your actual Hashnode personal access token, which you can generate in your Hashnode account settings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Run the server&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;You have two options for running the server:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 1&lt;/strong&gt;: Run the server manually&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python run_server.py
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Or directly using the root file:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python mcp_server.py
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;The server will start and listen for connections from AI assistants. By default, it runs on &lt;a href="http://localhost:8000" rel="noopener noreferrer"&gt;&lt;code&gt;localhost:8000&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 2&lt;/strong&gt;: Let the MCP integration handle it automatically (&lt;strong&gt;&lt;em&gt;I’ll be using this&lt;/em&gt;&lt;/strong&gt;)&lt;/p&gt;

&lt;p&gt;When properly configured in Claude Desktop or Cline VSCode extension, the MCP integration will automatically start and manage the server process for you.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Important&lt;/strong&gt; Note on File Structure
&lt;/h3&gt;

&lt;p&gt;When configuring your MCP server in Claude Desktop or Cline VSCode extension, you should use the root &lt;code&gt;mcp_&lt;/code&gt;&lt;a href="http://server.py" rel="noopener noreferrer"&gt;&lt;code&gt;server.py&lt;/code&gt;&lt;/a&gt; file directly rather than the files in the &lt;code&gt;hashnode_mcp&lt;/code&gt; directory. The &lt;code&gt;hashnode_mcp&lt;/code&gt; directory is primarily for packaging purposes.&lt;/p&gt;

&lt;p&gt;For example, in your configuration, point to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/path/to/your/hashnode-mcp-server/mcp_server.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And not:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/path/to/your/hashnode-mcp-server/hashnode_mcp/mcp_server.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures you're using the most up-to-date version of the server with all features enabled. The root &lt;code&gt;mcp_&lt;/code&gt;&lt;a href="http://server.py" rel="noopener noreferrer"&gt;&lt;code&gt;server.py&lt;/code&gt;&lt;/a&gt; file contains all the necessary functionality and doesn't require the package structure to operate correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using the Hashnode MCP Server with AI Assistants
&lt;/h2&gt;

&lt;p&gt;Once your server is configured, you can connect compatible AI assistants to it. Unlike traditional API integrations that use URLs, MCP servers are typically configured directly in the AI assistant's configuration files, as we'll see in the next section.&lt;/p&gt;

&lt;p&gt;The connection process generally involves:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Setting up the configuration file for your AI assistant (Claude Desktop or Cline VSCode extension)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Specifying the path to your Python interpreter and the MCP server script&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Providing necessary environment variables like your Hashnode personal access token&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After configuring the connection, you can start giving the AI commands related to your Hashnode blog. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;"Create a new article about Python programming tips"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Update my article with ID 12345 to fix the code examples"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Get the latest articles from my blog"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Search for articles about machine learning"&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The AI will use the MCP server to execute these commands and return the results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring MCP on Claude Desktop and Cline VSCode Extension
&lt;/h2&gt;

&lt;p&gt;To use your Hashnode MCP Server with Claude AI, you'll need to configure it in either Claude Desktop or the Cline VSCode extension. Here's how to set it up in both environments:&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuring MCP on Cline VSCode Extension
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open VS Code&lt;/strong&gt; with the Cline extension installed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Navigate to the Cline MCP settings file&lt;/strong&gt; located at:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Windows: `%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`

* macOS: `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`

* Linux: `Unfortunately, Claude Desktop is not available for Linux as of now (at the time of writing this article)` (So you can use VSCode Cline Extension instead)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Add your Hashnode MCP server configuration&lt;/strong&gt; to the file:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"hashnode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/path/to/your/venv/bin/python"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"/path/to/your/hashnode-mcp-server/mcp_server.py"&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;root&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;mcp_server.py&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;file&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"HASHNODE_PERSONAL_ACCESS_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-personal-access-token"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Note that the configuration points to the root &lt;code&gt;mcp_&lt;/code&gt;&lt;a href="http://server.py" rel="noopener noreferrer"&gt;&lt;code&gt;server.py&lt;/code&gt;&lt;/a&gt; file, not the one in the &lt;code&gt;hashnode_mcp&lt;/code&gt; directory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Replace the paths and token&lt;/strong&gt; with your actual values. For example:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"hashnode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/Users/sagar/my_personal/hashnode-mcp-server/.venv/bin/python"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"/Users/sagar/my_personal/hashnode-mcp-server/mcp_server.py"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"HASHNODE_PERSONAL_ACCESS_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-personal-access-token"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Save the file&lt;/strong&gt; and restart VS Code or reload the window.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open a new Cline conversation&lt;/strong&gt; and test the connection by asking it to interact with your Hashnode blog.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Configuring MCP on Claude Desktop
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Open Claude Desktop&lt;/strong&gt; and navigate to the configuration file:&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Windows: `%APPDATA%\Claude\claude_desktop_config.json`

* macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`

* Linux: `Unfortunately, Claude Desktop is not available for Linux as of now (at the time of writing this article)`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Add your Hashnode MCP server configuration&lt;/strong&gt; to the file, using the same format as for the Cline VSCode extension. Make sure to point to the root &lt;code&gt;mcp_&lt;/code&gt;&lt;a href="http://server.py" rel="noopener noreferrer"&gt;&lt;code&gt;server.py&lt;/code&gt;&lt;/a&gt; file:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"hashnode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/path/to/your/venv/bin/python"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"/path/to/your/hashnode-mcp-server/mcp_server.py"&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;root&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;mcp_server.py&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;file&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"HASHNODE_PERSONAL_ACCESS_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-personal-access-token"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Save the file&lt;/strong&gt; and restart Claude Desktop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Test the connection&lt;/strong&gt; by asking Claude to perform a simple operation like "Get the latest articles from my Hashnode blog."&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Troubleshooting Connection Issues
&lt;/h3&gt;

&lt;p&gt;If you encounter connection issues:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Verify the server is running&lt;/strong&gt; by checking the terminal where you started the MCP server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check the paths&lt;/strong&gt; in your configuration are correct and point to the right Python interpreter and script.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ensure your environment variables&lt;/strong&gt; are properly set, especially the Hashnode personal access token.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check the server logs&lt;/strong&gt; for any error messages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Try restarting&lt;/strong&gt; both the MCP server and the Claude application.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Example: Creating a New Article
&lt;/h2&gt;

&lt;p&gt;Let's walk through a practical example of using the Hashnode MCP Server to create and publish a new article:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Start the server&lt;/strong&gt; as described above.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Connect your AI assistant&lt;/strong&gt; to the MCP server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Ask the AI to create an article&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Create a new article titled &lt;span class="s2"&gt;"Getting Started with Python"&lt;/span&gt; with the following content:

&lt;span class="c"&gt;# Getting Started with Python&lt;/span&gt;

Python is one of the most popular programming languages today. In this article, we&lt;span class="s1"&gt;'ll explore the basics of Python and how to get started.

## Installation

First, you need to install Python...

[rest of the article content]

Tags: python, programming, beginners
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The AI will use the MCP server to:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Format the request for the Hashnode API

* Send the creation request

* Return the result, including the article ID and URL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;You can then ask the AI to:&lt;/li&gt;
&lt;/ol&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Publish the article immediately

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Save it as a draft&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make further edits&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Advanced Features&lt;br&gt;
&lt;/h2&gt;

&lt;h3&gt;


Timeout Handling
&lt;/h3&gt;


&lt;p&gt;The Hashnode MCP Server includes robust timeout handling for API requests. This is particularly important for operations like article creation and updates, which might take longer to process. If a request times out, the server provides helpful error messages and suggestions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Error Management
&lt;/h3&gt;

&lt;p&gt;The server includes comprehensive error handling to provide clear feedback when issues occur. This makes troubleshooting easier and improves the user experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pagination Support
&lt;/h3&gt;

&lt;p&gt;For operations that might return large amounts of data, like searching for articles, the server supports pagination to manage the response size and improve performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Potential Use Cases
&lt;/h2&gt;

&lt;p&gt;The Hashnode MCP Server opens up numerous possibilities for content creators:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automated Content Creation&lt;/strong&gt;: Generate draft articles based on outlines or topics.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Content Management&lt;/strong&gt;: Update, organize, and manage your blog without leaving your AI assistant.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Research Assistance&lt;/strong&gt;: Search your existing content to find relevant articles or avoid duplication.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Batch Operations&lt;/strong&gt;: Perform bulk updates or content audits across your blog.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Integration with Workflows&lt;/strong&gt;: Incorporate blog publishing into broader AI-assisted workflows.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Technical Architecture
&lt;/h2&gt;

&lt;p&gt;The project is organized with a clean, modular structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;mcp_&lt;/code&gt;&lt;a href="http://server.py" rel="noopener noreferrer"&gt;&lt;code&gt;server.py&lt;/code&gt;&lt;/a&gt;: Root server implementation that can be run directly&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;hashnode_mcp/&lt;/code&gt;: Core package containing the modular functionality&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mcp_&lt;/code&gt;&lt;a href="http://server.py" rel="noopener noreferrer"&gt;&lt;code&gt;server.py&lt;/code&gt;&lt;/a&gt;: Package version of the server implementation&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://utils.py" rel="noopener noreferrer"&gt;&lt;code&gt;utils.py&lt;/code&gt;&lt;/a&gt;: Utility functions for formatting responses and GraphQL queries&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;code&gt;examples/&lt;/code&gt;: Example usage scripts&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;code&gt;tests/&lt;/code&gt;: Test suite for verifying functionality&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;code&gt;run_&lt;/code&gt;&lt;a href="http://server.py" rel="noopener noreferrer"&gt;&lt;code&gt;server.py&lt;/code&gt;&lt;/a&gt;: Entry point for running the server using the package version&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;While the project includes a package structure (&lt;code&gt;hashnode_mcp/&lt;/code&gt;) for organization and potential distribution, users can simply run the root &lt;code&gt;mcp_&lt;/code&gt;&lt;a href="http://server.py" rel="noopener noreferrer"&gt;&lt;code&gt;server.py&lt;/code&gt;&lt;/a&gt; file directly without needing to use the package. This provides flexibility in how you choose to deploy the server.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Future Enhancements
&lt;/h2&gt;

&lt;p&gt;There are several exciting possibilities for future development:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Additional Hashnode Features&lt;/strong&gt;: Support for more Hashnode API capabilities like managing comments, series, and newsletters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Analytics Integration&lt;/strong&gt;: Retrieving and analyzing blog performance metrics.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Content Optimization&lt;/strong&gt;: AI-assisted SEO optimization for articles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-User Support&lt;/strong&gt;: Enhanced capabilities for team publications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Webhook Support&lt;/strong&gt;: Responding to events from your Hashnode blog.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The Hashnode MCP Server represents a powerful bridge between AI assistants and content creation on Hashnode. By enabling AI models to interact directly with your blog, it streamlines the writing and publishing process, making content creation more efficient and accessible.&lt;/p&gt;

&lt;p&gt;Whether you're a solo blogger looking to optimize your workflow or part of a content team seeking to scale your production, this tool offers valuable capabilities for integrating AI into your content strategy.&lt;/p&gt;

&lt;p&gt;I'm excited to see how others in the community will use and extend this project. The code is open-source and available on GitHub, so feel free to fork it, contribute, or adapt it to your specific needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/sbmagar13/hashnode-mcp-server" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://apidocs.hashnode.com/" rel="noopener noreferrer"&gt;Hashnode API Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://modelcontextprotocol.io/introduction" rel="noopener noreferrer"&gt;Model Context Protocol Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have you integrated AI tools into your content workflow? Share your experiences in the comments below!&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>This is test article from MCP server with Cline</title>
      <dc:creator>Sagar Budhathoki</dc:creator>
      <pubDate>Wed, 30 Apr 2025 18:32:10 +0000</pubDate>
      <link>https://dev.to/sbmagar13/this-is-test-article-from-mcp-server-with-cline-3p6</link>
      <guid>https://dev.to/sbmagar13/this-is-test-article-from-mcp-server-with-cline-3p6</guid>
      <description>&lt;h1&gt;
  
  
  Hello guys!!
&lt;/h1&gt;

&lt;p&gt;This is just a test article using MCP server.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>writing</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
