home / mcp / se333 testing mcp server
SE333 Final Project Code Anal;ysis AI Assisted MCP
Configuration
View docs{
"mcpServers": {
"algeek01-se333_final_project": {
"url": "http://localhost:8001",
"headers": {
"MCP_PORT": "8001",
"MCP_USE_STDIO": "true"
}
}
}
}You configure and run an MCP server that automates testing workflows for Java Maven projects, including decision-table based test generation, security scanning, coverage analysis, and Git automation. This server provides actionable tooling to streamline test creation, improve security, and integrate with your Git workflow, all through a consistent MCP client interface.
Connect to the MCP server from your MCP client to perform practical workflows. You start by ensuring the server is reachable over HTTP, then perform the following typical patterns: generate tests for a target class and method, inspect test coverage, scan the codebase for security issues, and manage your changes through Git automation. You can run the server in HTTP mode first, and optionally switch to a local stdio workflow if your client supports it. Focus on one capability at a time to verify outputs and refine inputs before combining steps in a larger automation flow.
Prerequisites you need before you install and run the MCP server:
- Python 3.12 or newer
- Node.js 18+ (LTS recommended)
- VS Code with Chat view (optional for editor integrations)
- Java 11+ and Maven 3.6+ for the Java project you will test
- Git and a GitHub account for repository workflows
- uv package manager (install here)
Proceed with the following concrete steps to install and run the MCP server and set up your environment.
1. Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh2. Set up Python environment
cd Armin_Tavassoli_SE333_Final_project
uv init
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate3. Install dependencies
uv sync
# Or if that doesn't work:
uv add mcp fastmcp httpx pypdf python-dotenv4. Start the MCP server in HTTP mode
python server.py
```
The server will start on http://localhost:8001/sse (port 8000 if MCP_PORT is not set)5. Connect an editor client (optional) with HTTP or stdio mode. For HTTP mode, use the server URL http://localhost:8001. If your editor prefers stdio mode, enable MCP_USE_STDIO and configure local process execution according to your editor's guidance.
6. Enable Auto-Approve and verify tools are visible in the Chat view of your editor integration.
7. Set up your Maven Java project
cd codebase
mvn clean install
mvn test jacoco:reportEnvironment variables you may encounter while running the MCP server include MCP_USE_STDIO to switch to stdio mode and MCP_PORT to specify a port when starting the HTTP server. Use these as needed to match your development environment.
Server wonβt start
- Confirm you have Python 3.12+ installed.
- Ensure dependencies are installed with uv sync.
- Activate the virtual environment before starting the server.
- Check that port 8000 is not in use by another process.
Cannot find JaCoCo reports
- Run tests and generate reports: mvn clean test and mvn jacoco:report inside the Maven project.
VS Code cannot connect
- Ensure the MCP server is running and the URL is correct in your editor settings.
- Enable Auto-Approve and check server logs for errors.
The project contains the Maven Java codebase and supporting MCP server tooling, organized into codebase and related folders for Maven, Python, and editor configurations.
The MCP server provides a set of tools to streamline testing workflows, including coverage analysis, test generation, security scanning, and Git automation.
Finds where JaCoCo coverage reports are located (HTML, XML, or exec files)
Parses JaCoCo XML reports to identify uncovered code and provide coverage stats
Generates JUnit tests using decision tables by analyzing method signatures, decision points, and producing test matrices that cover null, empty, valid, boundary, edge, and exception scenarios
Scans Java source code for security issues such as SQLi, XSS, command injection, path traversal, hardcoded secrets, insecure random, and deserialization risks with severity labeling
Shows what files are staged, unstaged, and untracked
Stages all changes, excluding build artifacts
Commits changes with messages that include coverage stats when available
Pushes commits to the remote repository
Creates pull requests using GitHub CLI or manual steps