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"] 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. 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