From e76fb71e6f81be54c19cc72960b7eff8b438b686 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 16 Apr 2025 11:02:43 -0700 Subject: [PATCH 1/3] Add Dockerfile --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4154e33 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +FROM python:3.12-slim + +# Set working directory +WORKDIR /app + +# Copy local code to the container +COPY . /app + +# Install dependencies without running unnecessary scripts +RUN pip install --upgrade pip \ + && pip install --no-cache-dir . + +# Expose the port that the MCP might be running on (if applicable) +EXPOSE 8000 + +# Set the entrypoint command to run the MCP server +CMD ["reddit-mcp"] From 48458d22fd51290a67e8c9d2d98a2e8415efd179 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 16 Apr 2025 11:02:44 -0700 Subject: [PATCH 2/3] Add Smithery configuration --- smithery.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..cfd44ad --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,37 @@ +# 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: + - redditClientId + - redditClientSecret + properties: + redditClientId: + type: string + description: Reddit API Client ID + redditClientSecret: + type: string + description: Reddit API Client Secret + port: + type: number + default: 8000 + description: Port to run the MCP server on (optional) + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => ({ + command: 'reddit-mcp', + args: [], + env: { + REDDIT_CLIENT_ID: config.redditClientId, + REDDIT_CLIENT_SECRET: config.redditClientSecret, + PORT: config.port ? config.port.toString() : '8000' + } + }) + exampleConfig: + redditClientId: dummy_client_id + redditClientSecret: dummy_client_secret + port: 8000 From efbedc0faee4102af66935576662d15c8f69c8ed Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 16 Apr 2025 11:02:45 -0700 Subject: [PATCH 3/3] Update README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 1928fd4..bf33a09 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Reddit MCP [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![smithery badge](https://smithery.ai/badge/@GridfireAI/reddit-mcp)](https://smithery.ai/server/@GridfireAI/reddit-mcp) A plug-and-play [MCP](https://modelcontextprotocol.io) server to browse, search, and read Reddit. @@ -21,6 +22,14 @@ https://github.com/user-attachments/assets/a2e9f2dd-a9ac-453f-acd9-1791380ebdad ## Installation +### Installing via Smithery + +To install Reddit MCP for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@GridfireAI/reddit-mcp): + +```bash +npx -y @smithery/cli install @GridfireAI/reddit-mcp --client claude +``` + ### Prerequisite: Reddit API credentials Create a [developer app](https://www.reddit.com/prefs/apps) in your Reddit account if you don't already have one. This will give you a `client_id` and `client_secret` to use in the following steps. If you already have these, you can skip this step.