Skip to content

Add LICENSE, Dockerfile, E2E tests, and CI/CD for Glama MCP directory compatibility#3

Closed
Copilot wants to merge 5 commits intomainfrom
copilot/add-dockerfile-to-glama-listing
Closed

Add LICENSE, Dockerfile, E2E tests, and CI/CD for Glama MCP directory compatibility#3
Copilot wants to merge 5 commits intomainfrom
copilot/add-dockerfile-to-glama-listing

Conversation

Copy link

Copilot AI commented Oct 22, 2025

Adding LICENSE, Dockerfile, E2E tests, and CI/CD for Glama compatibility

  • Explore repository structure and understand the codebase
  • Verify the server runs correctly
  • Add LICENSE file (MIT License)
  • Update LICENSE copyright to SerpApi
  • Create Dockerfile for containerization
  • Add .dockerignore file for optimized builds
  • Add comprehensive e2e test suite
  • Add GitHub Actions workflow for CI/CD
  • Test Dockerfile builds successfully
  • Verify containerized server works e2e
  • Run security checks with CodeQL

Summary

Successfully added:

  1. LICENSE file - MIT License with SerpApi copyright
  2. Dockerfile - Python 3.13-slim based container with all dependencies
  3. .dockerignore - Optimized Docker builds by excluding unnecessary files
  4. E2E Test Suite - Comprehensive pytest-based tests validating Docker functionality
  5. GitHub Actions CI/CD - Automated testing workflow running on every commit and PR

GitHub Actions Workflow

The CI/CD workflow (.github/workflows/python-package.yml) provides automated quality assurance with 3 parallel jobs:

  • test: Runs the complete e2e test suite (6 tests) with Python 3.13
  • lint: Code quality checks using Ruff linter (non-blocking)
  • docker-build: Validates Docker image build and basic functionality

Best Practices Implemented:

  • ✓ Uses latest GitHub Actions (v4, v5)
  • ✓ Pip and Docker layer caching for faster builds
  • ✓ Matrix strategy for easy Python version expansion
  • ✓ Parallel job execution for efficiency
  • ✓ Fail-fast disabled for comprehensive testing
  • ✓ Comprehensive documentation in .github/workflows/README.md

The workflow triggers automatically on every push to main and on all pull requests.

Test Suite Features

The e2e test suite (tests/test_e2e_docker.py) includes 6 automated tests:

  • ✓ Docker image build verification
  • ✓ Environment variable validation (SERPAPI_API_KEY)
  • ✓ Container startup and runtime tests
  • ✓ Python version verification (3.13)
  • ✓ Dependency installation verification
  • ✓ Server module accessibility checks
  • ✓ CI/CD friendly (handles SSL certificate issues in restricted environments)

All tests pass successfully and can be run with: pytest tests/test_e2e_docker.py -v

Testing Results

  • ✓ Dockerfile builds successfully
  • ✓ Container validates required environment variables (SERPAPI_API_KEY)
  • ✓ Container starts and runs the MCP server correctly
  • ✓ All 6 e2e tests pass locally and in CI
  • ✓ GitHub Actions workflow configured and ready
  • ✓ No security vulnerabilities detected by CodeQL

The server is now ready for Glama listing with Docker support, comprehensive automated testing, and continuous integration.

Fixes #1

Original prompt

This section details on the original issue you should resolve

<issue_title>Glama listing is missing Dockerfile</issue_title>
<issue_description>Your MCP server is currently listed on the Glama MCP directory, but it is not available for others to use because it does not have a Dockerfile.

It takes only a few minutes to fix this:

  1. Go to your server's listing: ilyazub/serpapi-mcp-server
  2. Click "Claim" to verify ownership.
  3. Once claimed, navigate to the admin Dockerfile page and add a Dockerfile.
  4. Ensure your server passes all the checks.

Once completed, your server will be available for anyone to use.

For context, there are about 60k people using Glama every month and I'd love to see more people using your server.</issue_description>

<agent_instructions>Add License and Dockerfile. Make sure it works e2e (tests).</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@ilyazub Hey @punkpeye, thank you! Is there a way to "Claim" without submitting credit card? Image

@tanys123 Do want to finish your work on main...tanys123:serpapi-mcp-server:main and follow the steps above, once you have time?</comment_new>

Fixes #1


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: ilyazub <282605+ilyazub@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Dockerfile to Glama MCP listing Add LICENSE and Dockerfile for Glama MCP directory compatibility Oct 22, 2025
Copilot AI requested a review from ilyazub October 22, 2025 17:08
LICENSE Outdated
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Ilya Zub
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Copyrights are SerpApi

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the LICENSE copyright to SerpApi in commit e26647a.

Co-authored-by: ilyazub <282605+ilyazub@users.noreply.github.com>
Copilot AI requested a review from ilyazub October 22, 2025 17:34
# No EXPOSE needed for stdio mode

# Run the server
CMD ["python", "-m", "src.serpapi-mcp-server.server"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Cool, thanks! Please add an e2e test.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comprehensive e2e test suite in commit 3892965. The tests validate:

  • Docker image builds successfully
  • Container requires SERPAPI_API_KEY environment variable
  • Container starts and runs correctly with API key
  • Python 3.13 is used
  • All dependencies are installed
  • Server module is accessible

All 6 tests pass. Run with: pytest tests/test_e2e_docker.py -v

Co-authored-by: ilyazub <282605+ilyazub@users.noreply.github.com>
Copilot AI changed the title Add LICENSE and Dockerfile for Glama MCP directory compatibility Add LICENSE, Dockerfile, and E2E tests for Glama MCP directory compatibility Oct 22, 2025
Copilot AI requested a review from ilyazub October 22, 2025 18:56
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Cool, thanks! Can you add GitHub Action to run on each commit (make sure to research and the best practices).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added GitHub Actions CI/CD workflow in commit 634433e. The workflow includes:

3 Parallel Jobs:

  • test: Runs all 6 e2e tests with Python 3.13
  • lint: Code quality checks with Ruff linter
  • docker-build: Validates Docker image build and functionality

Best Practices:

  • ✓ Uses latest GitHub Actions (v4, v5)
  • ✓ Pip and Docker layer caching for faster builds
  • ✓ Matrix strategy for easy Python version expansion
  • ✓ Parallel execution for efficiency
  • ✓ Comprehensive documentation in .github/workflows/README.md

The workflow runs automatically on every push to main and all pull requests. Badge in README shows build status.

Co-authored-by: ilyazub <282605+ilyazub@users.noreply.github.com>
Copilot AI changed the title Add LICENSE, Dockerfile, and E2E tests for Glama MCP directory compatibility Add LICENSE, Dockerfile, E2E tests, and CI/CD for Glama MCP directory compatibility Oct 23, 2025
Copilot AI requested a review from ilyazub October 23, 2025 16:07
@ilyazub
Copy link
Collaborator

ilyazub commented Nov 18, 2025

Superseded by #7.

@ilyazub ilyazub closed this Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Glama listing is missing Dockerfile

2 participants