A Model Context Protocol (MCP) server providing utility tools for development workflows. Built with Python and FastMCP, this server offers tools like automated release notes generation from git commits.
Features include structured logging, configuration management, multiple transport protocols (HTTP, SSE, streamable-HTTP), SSL support, and containerized deployment.
utility-mcp-server/
├── utility_mcp_server/ # Main package directory
│ ├── __init__.py
│ ├── src/ # Core source code
│ │ ├── __init__.py
│ │ ├── main.py # Application entry point & startup logic
│ │ ├── api.py # FastAPI application & transport setup
│ │ ├── mcp.py # MCP server implementation & tool registration
│ │ ├── settings.py # Pydantic-based configuration management
│ │ └── tools/ # MCP tool implementations
│ │ ├── __init__.py
│ │ ├── release_notes_tool.py # Release notes generation tool
│ │ └── assets/ # Static resource files
│ └── utils/ # Shared utilities
│ ├── __init__.py
│ └── pylogger.py # Structured logging with structlog
├── tests/ # Comprehensive test suite
│ ├── conftest.py # Pytest fixtures and configuration
│ ├── test_settings.py # Unit tests for configuration
│ ├── test_mcp.py # Unit tests for MCP server
│ ├── test_release_notes_tool.py # Unit tests for release notes tool
│ ├── test_api.py # Unit tests for API endpoints
│ ├── test_main.py # Unit tests for main module
│ └── test_integration.py # Integration tests
├── pyproject.toml # Project metadata & dependencies
├── Containerfile # Red Hat UBI-based container build
├── compose.yaml # Docker Compose orchestration
├── .env.example # Environment configuration template
├── .gitignore # Version control exclusions
├── .pre-commit-config.yaml # Code quality automation
└── README.md # Project documentation
main.py: Application entry point with configuration validation, error handling, and uvicorn server startupapi.py: FastAPI application setup with transport protocol selection (HTTP/SSE/streamable-HTTP) and health endpointsmcp.py: Core MCP server class that registers tools using FastMCP decoratorssettings.py: Environment-based configuration using Pydantic BaseSettings with validationtools/: MCP tool implementations for utility operationsutils/pylogger.py: Structured JSON logging using structlog
generate_release_notes: Generates structured release notes from git commits and tags
The generate_release_notes tool automatically creates comprehensive release notes from git commits, categorizing changes into features, enhancements, bug fixes, and breaking changes. See USE_CASES.md for detailed use cases and integration scenarios.
Install the package directly from PyPI:
# Using pip
pip install utility-mcp-server
# Using uv (recommended)
uv pip install utility-mcp-serverFor development or to get the latest changes:
git clone https://github.com/redhat-data-and-ai/utility-mcp-server
cd utility-mcp-server
uv pip install -e .The MCP server integrates with Cursor IDE using the STDIO transport protocol.
-
Install the package:
pip install utility-mcp-server
-
Configure Cursor:
- Open Cursor Settings (
Cmd+,on Mac /Ctrl+,on Windows/Linux) - Navigate to
Tools & Integrations→MCP Tools - Click
Add MCP Serverand add the following configuration:
{ "mcpServers": { "utility-mcp-server": { "command": "utility-mcp-server-stdio", "args": [] } } } - Open Cursor Settings (
-
Restart Cursor to load the MCP server
If you encounter spawn utility-mcp-server-stdio ENOENT error:
{
"mcpServers": {
"utility-mcp-server": {
"command": "python",
"args": ["-m", "utility_mcp_server.src.stdio_main"]
}
}
}Or with a virtual environment:
{
"mcpServers": {
"utility-mcp-server": {
"command": "/path/to/your/venv/bin/python",
"args": ["-m", "utility_mcp_server.src.stdio_main"]
}
}
}For detailed setup instructions and troubleshooting, see CURSOR_SETUP.md.
The MCP server can also be used with Claude Desktop application.
-
Install the package:
pip install utility-mcp-server
-
Locate the Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Add the MCP server configuration:
{ "mcpServers": { "utility-mcp-server": { "command": "utility-mcp-server-stdio", "args": [] } } }Or if the command is not in your PATH:
{ "mcpServers": { "utility-mcp-server": { "command": "python", "args": ["-m", "utility_mcp_server.src.stdio_main"] } } } -
Restart Claude Desktop to load the MCP server
Once configured, you can use the generate_release_notes tool in your conversations:
"Generate release notes for version v1.0.0 comparing with v0.9.0 for the repository at /path/to/repo"
The tool will analyze git commits between the specified tags and generate structured release notes with categorized changes.
For development, testing, or integration with other tools, you can run the MCP server as an HTTP service.
- Python 3.12 or higher
- uv (fast Python package installer and resolver)
-
Install uv (if not already installed):
# On macOS/Linux: curl -LsSf https://astral.sh/uv/install.sh | sh # On MacOS using brew brew install uv # On Windows: powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # Or with pip: pip install uv
-
Clone the repository:
git clone https://github.com/redhat-data-and-ai/utility-mcp-server cd utility-mcp-server -
Create and activate a virtual environment with uv:
uv venv # Activate the virtual environment: # On macOS/Linux: source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install the package and dependencies:
# Install in editable mode with all dependencies uv pip install -e .
-
Configure environment variables:
cp .env.example .env # Edit .env file with your configuration -
Run the server:
# Using the installed console script utility-mcp-server # Or directly with Python module python -m utility_mcp_server.src.main # Or using uv to run directly uv run python -m utility_mcp_server.src.main
The HTTP server configuration is managed through environment variables:
| Variable | Default | Description |
|---|---|---|
MCP_HOST |
0.0.0.0 |
Server bind address |
MCP_PORT |
3000 |
Server port (1024-65535) |
MCP_TRANSPORT_PROTOCOL |
streamable-http |
Transport protocol (http, sse, streamable-http) |
MCP_SSL_KEYFILE |
None |
SSL private key file path |
MCP_SSL_CERTFILE |
None |
SSL certificate file path |
PYTHON_LOG_LEVEL |
INFO |
Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) |
-
Build and run with Podman Compose:
podman-compose up --build
-
Or build manually:
podman build -t utility-mcp-server . podman run -p 3000:3000 --env-file .env utility-mcp-server
-
Health check:
curl http://localhost:3000/health
-
Test MCP tools:
# List available tools via MCP endpoint curl -X POST "http://localhost:3000/mcp" \ -H "Content-Type: application/json" \ -d '{"method": "tools/list"}'
-
Install development dependencies:
uv pip install -e ".[dev]" -
Install pre-commit hooks:
pre-commit install
The project includes a comprehensive test suite covering unit tests, integration tests, and various edge cases.
-
Run all tests:
pytest
-
Run tests with coverage reporting:
pytest --cov=utility_mcp_server --cov-report=html --cov-report=term
-
Run tests by category:
# Unit tests only pytest -m unit # Integration tests only pytest -m integration # Slow running tests pytest -m slow # Tests requiring network access pytest -m network
-
Run specific test modules:
# Test individual components pytest tests/test_settings.py -v pytest tests/test_mcp.py -v pytest tests/test_release_notes_tool.py -v # Run integration tests pytest tests/test_integration.py -v
-
Run tests with different output formats:
# Verbose output with detailed test names pytest -v # Short traceback format pytest --tb=short # Quiet output (minimal) pytest -q
-
Linting and formatting with Ruff:
# Check for issues ruff check . # Auto-fix issues ruff check . --fix # Format code ruff format .
-
Type checking with MyPy:
mypy utility_mcp_server/
-
Docstring validation:
pydocstyle utility_mcp_server/ --convention=google
-
Run all pre-commit checks:
pre-commit run --all-files
| Test Category | Description |
|---|---|
| Unit Tests | Individual component testing with mocking |
| Integration Tests | End-to-end workflow testing |
Test Files:
test_settings.py- Configuration, environment variables, validationtest_mcp.py- Server initialization, tool registration, error handlingtest_release_notes_tool.py- Release notes generation tool functionalitytest_api.py- API endpoints and health checkstest_main.py- Main module and server startuptest_integration.py- Complete workflows and system integration
-
Container testing:
docker-compose up -d curl -f http://localhost:3000/health docker-compose down
-
SSL testing (if configured):
curl -k https://localhost:3000/health
GitHub Actions runs automated CI on push and PRs:
- Multi-Python version testing (3.12, 3.13)
- Test suite execution with coverage reporting
- Ruff linting and MyPy type checking
- Bandit security scanning
# Run all pre-commit checks
pre-commit run --all-files
# Run tests with coverage
pytest --cov=utility_mcp_server --cov-fail-under=80
# Run security checks
bandit -r utility_mcp_server/- Fork and clone the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Set up development environment:
uv venv && source .venv/bin/activate uv pip install -e ".[dev]" pre-commit install
- Make changes and run tests:
pytest --cov=utility_mcp_server - Run pre-commit checks:
pre-commit run --all-files - Commit and push, then create a Pull Request
- Follow PEP 8 (enforced by Ruff)
- Type annotations for public functions
- Google-style docstrings
- Conventional commit format (
feat:,fix:,docs:, etc.)
- Create a tool module in
utility_mcp_server/src/tools/ - Register the tool in
utility_mcp_server/src/mcp.pyusingself.mcp.tool()(your_function) - Add tests in
tests/ - Update documentation
Open GitHub issues for bugs or feature requests.