diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d347bb2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +FROM node:lts-alpine + +# Create app directory +WORKDIR /usr/src/app + +# Copy package files +COPY package*.json ./ + +# Install dependencies without running scripts to avoid potential issues +RUN npm install --ignore-scripts + +# Copy source code +COPY . . + +# Build the project and ensure the main file is executable +RUN npm run build + +# Expose any ports if needed (not required for this MCP as it uses stdio) + +# Default command to run the MCP server +CMD [ "node", "build/index.js" ] diff --git a/README.md b/README.md index ecaf1c3..08fad9e 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,14 @@ Same set up as above, and then add the following MCP config } ``` +### Installing via Smithery + +To install Email sending for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@resend/mcp-send-email): + +```bash +npx -y @smithery/cli install @resend/mcp-send-email --client claude +``` + **Develop** `npm install` diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..1f29b0c --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,45 @@ +# 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: + - resendApiKey + properties: + resendApiKey: + type: string + description: The API key for Resend to send emails. + senderEmailAddress: + type: string + description: Optional sender email address. + replyToEmailAddresses: + type: string + description: Optional comma-delimited reply-to email addresses. + default: {} + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => { + // Build command-line args based on configuration. + // Required: --key. Optional: --sender, --reply-to + const args = ['build/index.js']; + if (config.resendApiKey) { + args.push(`--key=${config.resendApiKey}`); + } + if (config.senderEmailAddress) { + args.push(`--sender=${config.senderEmailAddress}`); + } + if (config.replyToEmailAddresses) { + args.push(`--reply-to=${config.replyToEmailAddresses}`); + } + return { + command: 'node', + args + }; + } + exampleConfig: + resendApiKey: example-api-key-123 + senderEmailAddress: sender@example.com + replyToEmailAddresses: reply1@example.com,reply2@example.com