diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ae1bd21 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config +FROM node:lts-alpine + +# Create app directory +WORKDIR /app + +# Install dependencies +COPY package.json package-lock.json ./ +RUN npm install --production --ignore-scripts + +# Copy app source +COPY src ./src +COPY setup.js . + +# Use non-root user for security +RUN addgroup -S appgroup && adduser -S appuser -G appgroup +USER appuser + +# Default command +CMD ["node", "src/index.js"] diff --git a/README.md b/README.md index eea2250..b6033ce 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # DeFi Trading Agent MCP Server +[![smithery badge](https://smithery.ai/badge/@edkdev/defi-trading-mcp)](https://smithery.ai/server/@edkdev/defi-trading-mcp) + Transform your AI assistant into an autonomous crypto trading agent with real-time market analysis, portfolio management, and seamless trade execution across 17+ blockchains. ## 🤖 Trading Agent Capabilities @@ -85,6 +87,14 @@ Executing gasless swap now..." ## 🚀 Quick Start +### Installing via Smithery + +To install DeFi Trading Agent for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@edkdev/defi-trading-mcp): + +```bash +npx -y @smithery/cli install @edkdev/defi-trading-mcp --client claude +``` + ### **Installation** ```bash diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..a75a30f --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,38 @@ +# Smithery configuration file: https://smithery.ai/docs/build/project-config + +startCommand: + type: stdio + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => ({command: 'node', args: ['src/index.js'], env: { + USER_PRIVATE_KEY: config.userPrivateKey, + USER_ADDRESS: config.userAddress, + COINGECKO_API_KEY: config.coingeckoApiKey, + ...(config.alchemyApiKey ? {ALCHEMY_API_KEY: config.alchemyApiKey} : {}) + }}) + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - userPrivateKey + - userAddress + - coingeckoApiKey + properties: + userPrivateKey: + type: string + description: Your Ethereum private key for signing transactions + userAddress: + type: string + description: Your Ethereum wallet address + coingeckoApiKey: + type: string + description: Your CoinGecko API key for market data + alchemyApiKey: + type: string + description: Your Alchemy API key for premium RPCs (optional) + exampleConfig: + userPrivateKey: "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890" + userAddress: "0xAbCdEf1234567890aBCdEf1234567890abCDef12" + coingeckoApiKey: CG-abcdef1234567890 + alchemyApiKey: abcd1234efgh5678