Skip to main content

AI End-to-End Testing Framework Server

Project description

AIE2E MCP Server

The Python server component of the AI-powered end-to-end testing framework. This package provides the Model Context Protocol (MCP) server that executes browser automation tasks using AI agents.

Description

AIE2E MCP Server is the backend component that powers the AI End-to-End Testing Framework. It provides a Model Context Protocol (MCP) server for running browser-based tests using AI agents and supports both stdio and HTTP transport mechanisms.

Prerequisites

  • Python >= 3.11
  • Chrome or Chromium browser (automatically downloaded if not found)
  • pip for package management

Installation

From PyPI (Recommended)

pip install aie2e-server

From Source (Development)

git clone https://github.com/aie2e/aie2e-server.git
cd aie2e-server
pip install -r requirements.txt
pip install -e .

Verify Installation

Test that the server is installed correctly:

python -m aie2e.mcp_server --help

Usage

The MCP server can be run with two different transport mechanisms:

Stdio Transport (Default)

The stdio transport is used by default and is recommended for most use cases. You must specify the LLM configuration:

python -m aie2e.mcp_server --model "gpt-4" --llm-provider "openai" --api-key "your-api-key"

Or explicitly specify stdio transport:

python -m aie2e.mcp_server --transport stdio --model "gemini-2.5-pro" --llm-provider "google" --api-key "your-api-key"

HTTP Transport

The HTTP transport uses Server-Sent Events (SSE) over HTTP and is useful for remote connections:

python -m aie2e.mcp_server --transport http --host 127.0.0.1 --port 3001 --model "claude-3-sonnet" --llm-provider "anthropic" --api-key "your-api-key"

# Run in headless mode (no browser UI)
python -m aie2e.mcp_server --transport http --port 3001 --model "gpt-4" --llm-provider "openai" --headless

Using Environment Variables

The API key can be set using environment variables instead of command line arguments. Use the standard environment variable name for your chosen provider, as supported by Browser-Use

# Set the API key as an environment variable
export OPENAI_API_KEY="your-openai-key"
export ANTHROPIC_API_KEY="your-anthropic-key"
export GOOGLE_API_KEY="your-google-key"

# Run without --api-key argument
python -m aie2e.mcp_server --model "gpt-4" --llm-provider "openai"

MCP Protocol

The server implements the Model Context Protocol (MCP) and provides the following tool:

run_test_session

Executes browser-based test sessions using AI agents.

Server Configuration (Command Line): The server configuration is set once at startup via command line arguments:

  • --model: AI model to use (e.g., "gemini-2.5-pro", "gpt-4") - Required
  • --llm-provider: LLM provider (e.g., "google", "openai", "anthropic") - Required
  • --api-key: API key for the LLM provider (optional, can use environment variables like OPENAI_API_KEY)
  • --headless: Run browser in headless mode (default: false)

MCP Tool Parameters:

  • description: Description of the test session
  • tests: Array of test cases to execute
  • allowed_domains: List of allowed domains for navigation (optional)
  • sensitive_data: Sensitive data for form filling (optional)

Integration

The MCP server is designed to work with MCP-compatible clients. For JavaScript/TypeScript projects, use the AIE2E Node.js client which automatically connects to this server.

Using with AIE2E Client

The most common usage is with the AIE2E Node.js client:

# Install both components
npm install --save-dev aie2e
pip install aie2e-server

# The client automatically manages the server via stdio transport
npx aie2e ./tests

Troubleshooting

Common Issues

"ModuleNotFoundError: No module named 'aie2e'"

  • Ensure you ran the installation: pip install aie2e-server
  • Check your Python environment: python -c "import aie2e; print('Installation OK')"

"Command not found: python"

  • On some systems, use python3 instead of python
  • Ensure Python is installed and in your PATH

Browser issues

  • The server automatically downloads Chrome/Chromium if not found
  • On Linux, you may need: sudo apt-get install chromium-browser
  • On macOS with Homebrew: brew install chromium

Permission errors

  • Try running with elevated privileges if needed
  • Ensure your user has permission to create browser profiles

Getting Help

  • Check the issues page for known problems
  • Create a new issue with your error message and system information

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Related Projects

License

MIT License - see LICENSE for details

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

aie2e-0.1.2.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

aie2e-0.1.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file aie2e-0.1.2.tar.gz.

File metadata

  • Download URL: aie2e-0.1.2.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aie2e-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1ce3a7bcab2bc710babbacf3ad986962d0729cab3bc44f5594b112abd91528b1
MD5 b7541be7ee2e33e47dbdced430153da7
BLAKE2b-256 cdf5b9e4693224e92fdbb325249bb490c75f3798d9030fe39dc388f367933733

See more details on using hashes here.

Provenance

The following attestation bundles were made for aie2e-0.1.2.tar.gz:

Publisher: python-publish.yml on aie2e/aie2e-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aie2e-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: aie2e-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aie2e-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 71943744452cd2815da52c39bbc62fd69a45859b90796f917bd9d6dfd3e64b47
MD5 4f6a91d529a2fde5b15dfe215db634a3
BLAKE2b-256 558f86abd0cf25e70fc1207adcde05f6a8fd59681eb491377dd3d8118daf1f80

See more details on using hashes here.

Provenance

The following attestation bundles were made for aie2e-0.1.2-py3-none-any.whl:

Publisher: python-publish.yml on aie2e/aie2e-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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