Skip to content

Conversation

@cafalchio
Copy link

@cafalchio cafalchio commented Dec 18, 2025

Summary

This PR adds a MCP Server in Python that provides QR code generation and decoding capabilities. - closes #919

Server Details

  • Name: your-server-name
  • Location: mcp-servers/python/qr_code_server/
  • Transports: STDIO, HTTP
  • Tools:
    • generate_qr_code: Generate QR codes from text or data
    • decode_qr_code: Decode QR codes from image files
    • generate_batch_qr_codes: Generate multiple QR codes efficiently
    • validate_qr_data: Validate and analyze QR code data before generation

Testing

  • Unit tests pass (95% coverage)
  • Integration tests with ContextForge Gateway
  • Linting passes (ruff)
  • Type checking passes (mypy), few exceptions
  • Container builds successfully

Documentation

  • Comprehensive README.md
  • Usage examples
  • API documentation

Checklist

  • Follows best practices
  • Includes all required files (Makefile, Containerfile, tests)
  • No secrets or credentials committed
  • Apache 2.0 license (or compatible)

cafalchio and others added 30 commits November 25, 2025 21:55
    -Removed extra comments
    -Added info when loaded
    -Removed wrong validation
 - implement create_qr
 - implemented simple happy path unit test
    - Added base64 output
    - Added error handling
    - Added png, svg and ascii formats
    - Added tests to cover generator changes
    - It will check if user input has filename on it
    - check if filename.ext has the correct ext
    - It creates the output folder if it does not exist
     - save method added to allow use as qrcode image
    - Uses qrcode image factory to generate images
    - Removed ascii logic from generator
    - improved output path handling
    - remove code used to run locally
    - test for multiple formats PNG, SVG, ASCII
    - test for error handling
    - test create qr base64
…anage the following cases

    -  case 1: output_path is a folder
    - case 2: output_path has file extension
    - case 3: output_path has filename without extension
    - case 4: output_path does not have filename
    - Decoupled qr image generation from the create_qr_code
    - Improved Ascii save to handle BytesIO for batch zip generation
    - Handle errors
    - Added tests to get 100% coverage
    - Test manually to check created files
    - changed ascii filename to have extension ascii
    - Created a image generator to handle batch
    - handled errors
    - changed ascii format to have ascii extension
    -  Fixed ascii not encoding in base64
    -  Added validation to BatchQRgeneration
    -  Fixed lint
    -  loads from file image
    - loads from base64
    - load multiple types
cafalchio and others added 27 commits December 15, 2025 21:14
    - Fixed config not loading default values
    - Added Log when successfull
    - added log for success false
@cafalchio
Copy link
Author

Address issue #919

@crivetimihai
Copy link
Member

Very cool. Thanks for the PR.

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.

Sample MCP Server - Python (qr-code-server)

2 participants