Skip to content

Deployment: Dockerfile and Smithery config #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use the official Node.js 20 image as a build stage
FROM node:20-alpine AS builder

# Set the working directory
WORKDIR /app

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

# Install dependencies
RUN npm install

# Copy all source files
COPY . .

# Build the project
RUN npm run build

# Use the official Node.js 20 image for the production environment
FROM node:20-alpine AS production

# Set the working directory
WORKDIR /app

# Copy the build artifacts and node_modules from the builder stage
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/node_modules /app/node_modules
COPY package.json .

# Set environment variables (Make sure to replace with your actual key when running the container)
ENV FR24_API_KEY=your_actual_api_key_here
ENV FR24_API_URL=https://fr24api.flightradar24.com

# Expose port if needed
EXPOSE 3000

# Start the server
CMD ["node", "dist/index.js"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Flightradar24 MCP Server 🛩️
[![smithery badge](https://smithery.ai/badge/flightradar24-mcp-server)](https://smithery.ai/server/flightradar24-mcp-server)

A Claude Desktop MCP server that helps you track flights in real-time using Flightradar24 data. Perfect for aviation enthusiasts, travel planners, or anyone curious about flights overhead!

Expand All @@ -19,6 +20,14 @@ A Claude Desktop MCP server that helps you track flights in real-time using Flig

### 2. Installation

### Installing via Smithery

To install Flightradar24 Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/flightradar24-mcp-server):

```bash
npx -y @smithery/cli install flightradar24-mcp-server --client claude
```

1. Clone this repository somewhere on your computer:
```bash
git clone https://github.com/sunsetcoder/flightradar24-mcp-server.git
Expand Down
21 changes: 21 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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:
- fr24ApiKey
properties:
fr24ApiKey:
type: string
description: Your Flightradar24 API key.
fr24ApiUrl:
type: string
default: https://fr24api.flightradar24.com
description: The base URL for the Flightradar24 API.
commandFunction:
# A function that produces the CLI command to start the MCP on stdio.
|-
config => ({ command: 'node', args: ['dist/index.js'], env: { FR24_API_KEY: config.fr24ApiKey, FR24_API_URL: config.fr24ApiUrl } })