About py-poetry
A Python project template configured for VS Code and Poetry, with instructions for running an agent and analyzing Python code with CodeQL. It is intended for developers setting up a Python repository workflow.
Key features
- 01VS Code and Poetry configuration
- 02Python agent launch instructions
- 03Docker-based CodeQL analysis guidance
Use cases
- 01Starting a Python project in VS Code with Poetry
- 02Running CodeQL queries on Python source code
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEpy-poetry
A template that has python configured for vs code with poetry.
Running the Agent
To run the agent, use the following command:
python src/agent.py <path_to_local_git_repo>
Replace <path_to_local_git_repo> with the path to your local git repository.
Using CodeQL with the Generated Docker Container
To use CodeQL queries with the generated docker container, follow these steps:
- Ensure that the
codeql-config.ymlfile is generated in the root directory of the docker container. - Build the docker container using the provided Dockerfile and docker-compose.yml files.
- Run the docker container.
- Use CodeQL CLI to run queries against the python files in the container.
For example, to run a CodeQL query, use the following command:
codeql database create my-database --language=python --source-root=/workspace
codeql database analyze my-database python-security-extended.qls --format=sarif-latest --output=results.sarif
Replace my-database with the desired name for your CodeQL database.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.