Skip to main content

A Model Context Protocol (MCP) server for wallet and computation tools.

Project description

Eolas MCP Server (Python Edition)

A Model Context Protocol (MCP) server built with Python that provides tools for AI assistants to interact with an Ethereum wallet. This project follows MCP best practices with secure credential management, comprehensive error handling, and proper lifecycle management.

What is MCP?

The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources and tools. MCP servers expose functionality that language models can discover and invoke automatically.

Features

  • 🔧 Extensible Tool System: Easy to add custom tools using FastMCP decorators.
  • 🐍 Python-Powered: Leverages the extensive Python ecosystem for robust development.
  • 🔒 Secure Wallet: Encrypted Ethereum wallet management with system keyring integration.
  • 🛡️ Security First: Uses environment variables for configuration and secure credential storage.
  • 📊 Structured Logging: Provides clear, structured logging for easier debugging.
  • Resource Management: Implements proper server lifecycle for startup and shutdown.

Quickstart for Users

This section is for users who want to use the server with an MCP client like Cursor or Claude Desktop.

Prerequisites

  • Node.js and npm (These are bundled with the Claude Desktop app, so no extra installation is usually needed).
  • Python 3.10+ (must be available in your system's PATH).

One-Step Configuration

This is the only step required. Add the following JSON object to the mcpServers key in your client's configuration file. The npx command will handle downloading and running the server for you automatically.

{
  "mcpServers": {
    "eolas-mech-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "eolas-mech-mcp"
      ]
    }
  }
}

Note: The server key, "eolas-mech-mcp", can be any unique name you choose.

The configuration file is typically located at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\\Claude\\claude_desktop_config.json

Restart Your Client

After adding the configuration, restart your MCP client. The server will be installed automatically on the first run, and the new tools will be available to the AI assistant.

Available Tools

add

Adds two numbers and returns the result.

Parameters:

  • a (int): The first number.
  • b (int): The second number.

Example Usage: "What is 123 + 456?"

top_up

Provides a deposit address for the user's wallet. If a wallet doesn't exist, it securely creates and stores a new one.

Parameters:

  • None

Example Usage: "Top up my account"

Available Resources

wallet://address

Returns the current public wallet address.

wallet://balance

Returns the current wallet balance in ETH.

For Developers

This section is for developers who want to modify or contribute to the server. The project now contains two packages:

  1. eolas-mcp-server: The Python MCP server.
  2. eolas-mcp-wrapper: A lightweight Node.js wrapper to provide an npx-based installation.

Development Setup

  1. Clone the repository.
  2. Navigate to the Python server directory:
    cd eolas-mech-mcp/eolas-mcp-server
    
  3. Set up a virtual environment and install in editable mode:
    python3 -m venv venv
    source venv/bin/activate
    pip install -e .
    
  4. Run the Python server locally:
    python -m src
    

To test the Node.js wrapper locally before publishing, you can use npm link:

  1. Navigate to the wrapper directory: cd ../eolas-mcp-wrapper
  2. Link the package: npm link
  3. You can now run npx eolas-mech-mcp in your terminal to test it.

Project Structure

eolas-mcp-server/
├── src/
│   ├── __init__.py
│   ├── __main__.py           # Entry point for `python -m src`
│   ├── server.py             # Main server with tools and resources
│   └── utils/
│       ├── __init__.py
│       └── wallet.py         # Secure wallet management
├── .env.example              # Example environment file
├── .gitignore
├── requirements.txt          # Python dependencies
├── pyproject.toml            # Packaging configuration
└── README.md

Troubleshooting

  • Server Not Connecting: Check the MCP client logs. For npx issues, ensure Node.js is correctly installed and accessible. For Python issues, ensure Python 3.10+ is in your system's PATH.
  • command not found: python3: If the wrapper script fails, you may need to alias python to python3 or install python3 if it's missing.

License

This project is licensed under the MIT License.

Resources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eolas_mech_mcp-1.0.2.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eolas_mech_mcp-1.0.2-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file eolas_mech_mcp-1.0.2.tar.gz.

File metadata

  • Download URL: eolas_mech_mcp-1.0.2.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for eolas_mech_mcp-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4423dba1d2a5d6167b032a8460de2640869aae4a13ecf02855ce63a72cf04446
MD5 fb7b362b1906252b448f9ffd271dc8ac
BLAKE2b-256 68f171f1e6cfec0d71a29a8b7259ab62da2f86f0b9d990037c7695e444c9d28d

See more details on using hashes here.

File details

Details for the file eolas_mech_mcp-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: eolas_mech_mcp-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for eolas_mech_mcp-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 846cad32315572d2b2aeaf17538796e3c6780562120911b356adc72797793b19
MD5 889e5c2f60bd6feabfe4c05e15a89505
BLAKE2b-256 bbdaab1438281744b4ef4735381f2b69832ed298e41805557ab920037e2b7b8d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page