diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c96129c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +FROM node:lts-alpine + +# Set working directory +WORKDIR /app + +# Copy package files +COPY package.json package-lock.json ./ + +# Install dependencies (skip scripts if needed) +RUN npm install --ignore-scripts + +# Copy the rest of the source code +COPY . . + +# Build the project +RUN npm run build + +# Start the MCP server +CMD ["node", "build/src/mcpServer.js"] diff --git a/README.md b/README.md index 65e58d0..00921f1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # MCP Ethers Wallet +[![smithery badge](https://smithery.ai/badge/@crazyrabbitLTC/mcp-ethersjs-server)](https://smithery.ai/server/@crazyrabbitLTC/mcp-ethersjs-server) A Model Context Protocol (MCP) server that provides Ethereum wallet functionality using ethers.js v6. @@ -40,6 +41,15 @@ Replace `pathTo/ethers-server` with the actual path to your installation directo ## Installation +### Installing via Smithery + +To install Ethers Wallet for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@crazyrabbitLTC/mcp-ethersjs-server): + +```bash +npx -y @smithery/cli install @crazyrabbitLTC/mcp-ethersjs-server --client claude +``` + +### Manual Installation ```bash # Clone the repository git clone https://github.com/yourusername/ethers-server.git diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..3b68620 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,43 @@ +# 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: + - alchemyApiKey + - infuraApiKey + properties: + alchemyApiKey: + type: string + description: Your Alchemy API key for connecting to the Ethereum network. + infuraApiKey: + type: string + description: Your Infura API key for connecting to the Ethereum network. + defaultNetwork: + type: string + default: mainnet + description: Optional default Ethereum network (e.g., mainnet, polygon). + logLevel: + type: string + default: info + description: Logging level for the server (e.g., error, warn, info, debug). + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => ({ + command: 'node', + args: ['build/src/mcpServer.js'], + env: { + ALCHEMY_API_KEY: config.alchemyApiKey, + INFURA_API_KEY: config.infuraApiKey, + DEFAULT_NETWORK: config.defaultNetwork || 'mainnet', + LOG_LEVEL: config.logLevel || 'info' + } + }) + exampleConfig: + alchemyApiKey: your_alchemy_api_key_here + infuraApiKey: your_infura_api_key_here + defaultNetwork: mainnet + logLevel: info