Skip to content

feat!: v2.0.0 - MCP SDK Upgrade, Write Capabilities & Enhanced Workflows - #21

Merged
wayzeek merged 12 commits into
mainfrom
major-mcp-update
Nov 20, 2025
Merged

feat!: v2.0.0 - MCP SDK Upgrade, Write Capabilities & Enhanced Workflows#21
wayzeek merged 12 commits into
mainfrom
major-mcp-update

Conversation

@wayzeek

@wayzeek wayzeek commented Nov 19, 2025

Copy link
Copy Markdown
Member

PR: v2.0.0 - MCP SDK Upgrade, Write Capabilities & Enhanced Workflows

Summary

This major release upgrades the server to MCP SDK v2.0.0, introduces full smart contract write capabilities, adds flexible wallet configuration (Mnemonic/HD Wallet), and completely overhauls the AI prompts for better safety and usability.

Key Changes

Core & Infrastructure

  • v2.0.0 Upgrade: Updated to the latest Model Context Protocol (MCP) SDK.
  • Server Configuration: Enhanced server capabilities and configuration options.
  • Refactoring: Significant cleanup of tools and resources to align with new SDK patterns.

Smart Contract Write Support

  • New write_contract Tool: Execute any state-changing function on verified contracts.
  • Auto-ABI Fetching: Seamlessly fetches ABIs from Etherscan v2 for 60+ networks.
  • Safety Checks: Prevents accidental calls to view/pure functions.

Wallet Configuration

  • Mnemonic Support: Added support for BIP-39 mnemonic phrases (EVM_MNEMONIC).
  • HD Wallet: Added EVM_ACCOUNT_INDEX support for deriving accounts.
  • Centralized Logic: Moved wallet management to a dedicated src/core/services/wallet.ts service.

Prompts & Workflows

  • New interact_with_contract Prompt: Guided workflow for safe contract interactions.
  • Prompt Overhaul: Replaced generic prompts with task-oriented workflows (Transfer, Diagnostics, Analysis).
  • Enhanced Safety: Prompts now include explicit pre-checks, cost estimation, and confirmation steps.

Breaking Changes

  • Version Bump: This is a major version update (v2.0.0).
  • Prompt IDs: Replaced previous generic prompts with specific, task-oriented ones.
  • SDK Changes: Internal changes to match the new MCP SDK structure.

Closes #6
Closes #9
Closes #17

…r transfers, diagnostics, wallet analysis, and approvals, and add an ABI service.
…ance transaction prompts with detailed, safety-focused instructions.
…n content for token transfer, transaction diagnosis, and wallet analysis.
@ccbbccbb

Copy link
Copy Markdown
Member

@codex full review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…monic phrase, centralize wallet logic, and update documentation.
@wayzeek wayzeek changed the title feat: Major EVM MCP server update feat!: v2.0.0 - MCP SDK Upgrade, Write Capabilities & Enhanced Workflows Nov 19, 2025
@wayzeek wayzeek added the enhancement New feature or request label Nov 19, 2025
wayzeek and others added 4 commits November 19, 2025 14:19
- Add express and @types/express to dependencies for production reliability
  * Battle-tested error handling and middleware ecosystem
  * All MCP SDK examples use Express for HTTP transport
  * Minimal overhead (~50KB) with significant reliability gains
- Fix wallet.ts to use viem's documented HDAccount/PrivateKeyAccount types
  * Use getHdKey() method for extracting private key from mnemonic accounts
  * Proper type checking instead of unsafe 'as any' casting
  * Better error messages for debugging
- Update bun.lock with express dependencies

This ensures all MCP transports (stdio, StreamableHTTP) are production-ready.
Security Fixes:
- Add 10mb JSON body size limit to prevent DoS attacks
- Validate EVM_ACCOUNT_INDEX to prevent NaN injection
- Add HTTP server timeouts (120s request, 65s keepalive)

Reliability Fixes:
- Implement session cleanup (30min timeout, check every 5min)
- Update session timestamps on activity to prevent premature cleanup
- Prevent memory leaks from abandoned sessions

These changes ensure the server is production-ready and resilient.
@wayzeek
wayzeek merged commit 013e98b into main Nov 20, 2025
@wayzeek
wayzeek deleted the major-mcp-update branch November 20, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stream is not readable Add mnemonic support Better private key management

3 participants