mcp-python-server logo

mcp-python-server

by rohanjoackhim

This is a template repository for any Python project that comes with pre-configured dev tools like ruff, black, and pytest. It includes pre-commit hooks and Github actions for automated checks and tests.

View on GitHub

Last updated: N/A

What is mcp-python-server?

This is a Python project template designed to provide a standardized and efficient starting point for new Python projects. It includes pre-configured development tools, testing frameworks, and automation to ensure code quality and consistency.

How to use mcp-python-server?

The template can be used with or without a devcontainer. With a devcontainer, open the repository in Codespaces or VS Code with the Dev Containers extension. Without a devcontainer, create a virtual environment, install the development tools from requirements-dev.txt, and install the pre-commit hooks. Replace the sample main.py and tests/main_test.py with your own code and tests.

Key features of mcp-python-server

  • Pre-configured with ruff for linting and formatting

  • Includes black for auto-formatting

  • Uses pytest for testing with coverage measurement

  • Automated checks and tests via Github Actions

  • Devcontainer support for consistent development environment

  • Pre-commit hooks to enforce code quality

Use cases of mcp-python-server

  • Starting a new Python project

  • Creating a consistent development environment

  • Enforcing code quality standards

  • Automating code checks and tests

  • Rapid prototyping of Python applications

FAQ from mcp-python-server

How do I change the Python version?

Modify the image argument in .devcontainer/devcontainer.json, config options in .precommit-config.yaml, and the version number in .github/workflows/python.yaml.

What is a devcontainer?

A devcontainer is a Dockerized Python environment that provides a consistent development environment across different machines.

How do I run the tests?

Run python3 -m pytest in your terminal.

What are pre-commit hooks?

Pre-commit hooks are scripts that run automatically before each commit to ensure code quality and consistency.

Where can I find the list of development dependencies?

The development dependencies are listed in the requirements-dev.txt file.