- Home
- MCP servers
- Hacker News
Hacker News
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 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": {
"malayke-hackernews-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Malayke/hackernews-mcp.git",
"hackernews-mcp"
],
"env": {
"FIRECRAWL_API_KEY": "your_api_key_here"
}
}
}
}You can run a focused Hacker News MCP server that fetches discussion threads and scrapes linked articles, delivering compact, ready-to-consume content for large language models. This server supports both HN URLs and item IDs and is designed to be easy to integrate with MCP clients for streamlined data retrieval.
How to use
To use the Hacker News MCP server, add it to your MCP client configuration as a server you can invoke to fetch complete Hacker News discussions and the corresponding article content. You can pass either a full Hacker News URL or just the item ID, and you will receive a markdown-formatted bundle containing the article content followed by a nested, reader-friendly Hacker News discussion.
You will obtain a single, structured markdown output that includes the article content scraped from the linked page and the HN discussion formatted with metadata. This output is optimized for consumption by large language models, with compact nesting for replies and clear separation between article content and discussion.
Typical inputs you will use are either a full HN URL such as https://news.ycombinator.com/item?id=46130187 or just the numeric ID 46130187. The server will return the combined markdown content, with the article first and the discussion details after a separator.
How to install
Prerequisites: Python 3.11+ and a Firecrawl API key for article extraction. You will also need a runtime environment for the MCP client you plan to use (for example, Claude Desktop or any MCP-compatible client). Ensure you have network access to fetch dependencies and to reach the MCP server you run.
Install options shown use a package manager that can install the MCP server from source or prebuilt binaries. Choose one of the following methods to obtain the server: either install via uvx from GitHub or install by using pip.
Install with uvx from GitHub (recommended):
```bash
uvx --from git+https://github.com/Malayke/hackernews-mcp.git hackernews-mcp
This pulls the MCP server code directly from the repository and starts the server entrypoint named hackernews-mcp.
Install with uv pip:
uv pip install git+https://github.com/Malayke/hackernews-mcp.git
This installs the MCP server as a Python package accessible via the uv tool.
Install with pip:
pip install git+https://github.com/Malayke/hackernews-mcp.git
This installs the server package via Python’s pip installer.
## Additional notes and configuration
Environment variables and runtime configurations are required to run the server. Specifically, you need a Firecrawl API key to enable article scraping. Create a local environment file or provide the key in your MCP client configuration when starting the server.
Example environment variable usage in your MCP client setup:
{
"mcpServers": {
"hackernews-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Malayke/hackernews-mcp.git",
"hackernews-mcp"
],
"env": {
"FIRECRAWL_API_KEY": "your_api_key_here"
}
}
}
}
If you have installed the server via pip, you can configure it similarly with the direct command:
{
"mcpServers": {
"hackernews-mcp": {
"command": "hackernews-mcp",
"env": {
"FIRECRAWL_API_KEY": "your_api_key_here"
}
}
}
}
Replace your_api_key_here with your actual Firecrawl API key. The key is required to enable article scraping features.
## Troubleshooting and notes
If you encounter issues starting the server, ensure Python 3.11+ is installed and that the FIRECRAWL\_API\_KEY environment variable is set. Double-check your MCP client’s configuration to confirm that the server name matches and that the correct command and arguments are provided.
## Security and maintenance notes
Keep your API keys and access credentials secure. Do not expose the FIRECRAWL\_API\_KEY in public configurations. Rotate keys periodically according to your security policy, and monitor access to the MCP server for unauthorized usage.
## Available tools
### get\_hn\_content
Fetches Hacker News comments and the linked article content. Input hn\_url can be a full URL or just an ID; output is combined markdown including article content and HN discussion with metadata.