Enhance automcp init to Generate pyproject.toml #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enhances the
automcp init
command to streamline the setup process for new MCP server projects. Previously, users only received arun_mcp.py
file. Now,automcp init
also generates a standardpyproject.toml file
, pre-populated with essential configurations and dependencies.Key Changes:
pyproject.toml Generation:
The
automcp init -f <framework>
command now creates a pyproject.toml file in the target directory if one doesn't already exist.A new template file (
automcp/cli_templates/pyproject.toml.template
) has been added, containing base project structure, build system config (hatchling), and script entry points (serve_stdio
,serve_sse
).Dynamic Configuration:
The generated
pyproject.toml
automatically sets the [project] name based on the current directory's name.Crucially, it reads framework-specific dependencies from
automcp/cli_templates/framework_config.yaml
.Documentation & Usability:
The
README.md
has been updated to explain the new pyproject.toml generation, guide users on verifying/adding dependencies, and reflect the updated workflow.The "Next steps" instructions printed by automcp init have been modified to guide the user regarding the new
pyproject.toml
and dependency installation (uv sync).