Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a Node.js image for building the application
FROM node:22.12-alpine AS builder

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json
COPY package.json package-lock.json ./

# Install dependencies
RUN npm install

# Copy the application code
COPY . .

# Build the TypeScript code
RUN npm run build

# Use a minimal Node.js image for running the application
FROM node:22-alpine AS release

# Set the working directory
WORKDIR /app

# Copy the build files and package.json to the runtime image
COPY --from=builder /app/build /app/build
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/package-lock.json /app/package-lock.json

# Install only production dependencies
RUN npm ci --omit=dev

# Set the command to run the application
ENTRYPOINT ["node", "build/index.js"]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Hacker News MCP Server
[![smithery badge](https://smithery.ai/badge/@pskill9/hn-server)](https://smithery.ai/server/@pskill9/hn-server)

A Model Context Protocol (MCP) server that provides tools for fetching stories from Hacker News. This server parses the HTML content from news.ycombinator.com and provides structured data for different types of stories (top, new, ask, show, jobs).

<a href="https://glama.ai/mcp/servers/oge85xl22f"><img width="380" height="200" src="https://glama.ai/mcp/servers/oge85xl22f/badge" alt="Hacker News MCP server" /></a>


## Features

- Fetch different types of stories (top, new, ask, show, jobs)
Expand All @@ -13,6 +15,14 @@ A Model Context Protocol (MCP) server that provides tools for fetching stories f

## Installation

### Installing via Smithery

To install Hacker News for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@pskill9/hn-server):

```bash
npx -y @smithery/cli install @pskill9/hn-server --client claude
```

1. Clone the repository:
```bash
git clone https://github.com/pskill9/hn-server
Expand Down
13 changes: 13 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml

startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
required: []
properties: {}
commandFunction:
# A function that produces the CLI command to start the MCP on stdio.
|-
config => ({command: 'node', args: ['build/index.js'], env: {}})