- Home
- MCP servers
- Hashnode
Hashnode
- python
5
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"sbmagar13-hashnode-mcp-server": {
"command": "python",
"args": [
"run_server.py"
],
"env": {
"HASHNODE_API_URL": "https://gql.hashnode.com",
"HASHNODE_PERSONAL_ACCESS_TOKEN": "your-personal-access-token"
}
}
}
}You can interact with Hashnode data through an MCP server that exposes common actions like creating and updating articles, searching content, and retrieving details. This server lets you perform Hashnode operations programmatically via MCP-compatible clients, enabling seamless integration with AI assistants and automated workflows.
How to use
You run the MCP server locally and connect to it from your MCP client. Once running, you can ask your assistant to test the API connection, create or update articles, fetch the latest posts from a publication, search articles by keywords, retrieve details for a specific article, or get information about a user. Your client sends requests using the MCP protocol, and the server translates those requests into Hashnode GraphQL calls.
How to install
Prerequisites you need installed on your computer before starting:
- Python 3.8+ (for running the MCP server)
- A terminal or command prompt
- Access to a Hashnode personal access token (for API authentication) and the Hashnode GraphQL API URL if you use a custom endpoint.
Additional setup and run instructions
# 1) Install dependencies
python -m venv .venv
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
pip install -r requirements.txt
# 2) Create environment file or set variables in your shell
# HASHNODE_PERSONAL_ACCESS_TOKEN=your_token
# HASHNODE_API_URL=https://gql.hashnode.com
# 3) Run the MCP server (choose one of the following options)
python run_server.py
# or
python mcp_server.py
Configuration and run options
The MCP server can be started using the root scripts directly. Two common run commands are shown here, depending on which script you choose to start the server.
Troubleshooting
If you encounter connection issues, verify that the server is running, check that the correct script is being invoked, confirm that environment variables are set, and inspect the server logs for error messages. Restart the MCP server and your MCP client if needed.
Environment variables
The following environment variables are used to authenticate and configure the Hashnode API: HASHNODE_PERSONAL_ACCESS_TOKEN and HASHNODE_API_URL. Ensure these are set in your environment or in your .env file.
Notes
There are two valid ways to run the server from the root scope. Use the one that matches your workflow and environment. The HASHNODE_PERSONAL_ACCESS_TOKEN must be kept secure and not committed to source control.
Available tools
test_api_connection
Test the connectivity to the Hashnode API to verify that authentication and endpoint access are functioning.
create_article
Create and publish a new Hashnode article with a given title, body in Markdown, and optional tags and publish flag.
update_article
Update an existing Hashnode article by its ID with new title, content, tags, or publication state.
get_latest_articles
Retrieve the most recent articles from a specific Hashnode publication by hostname with an optional limit.
search_articles
Search Hashnode articles by a query string and return matching results with pagination.
get_article_details
Fetch detailed information about a specific article by its ID.
get_user_info
Obtain information about a Hashnode user by username.