Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 918e8c9

Browse files
committed
fix
1 parent 10bde5e commit 918e8c9

14 files changed

+564
-62
lines changed

Diff for: .github/workflows/main-checks.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Main branch checks
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
checks:
9+
uses: ./.github/workflows/shared.yml

Diff for: .github/workflows/publish-pypi.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publishing
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release-build:
9+
name: Build distribution
10+
runs-on: ubuntu-latest
11+
needs: [checks]
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v3
17+
18+
- name: "Set up Python"
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version-file: ".python-version"
22+
23+
- name: Install the project
24+
run: uv sync --frozen --all-extras --dev
25+
26+
- name: Build
27+
run: uv build
28+
29+
- name: Upload artifacts
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: release-dists
33+
path: dist/
34+
35+
checks:
36+
uses: ./.github/workflows/shared.yml
37+
38+
pypi-publish:
39+
name: Upload release to PyPI
40+
runs-on: ubuntu-latest
41+
environment: release
42+
needs:
43+
- release-build
44+
permissions:
45+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
46+
47+
steps:
48+
- name: Retrieve release distributions
49+
uses: actions/download-artifact@v4
50+
with:
51+
name: release-dists
52+
path: dist/
53+
54+
- name: Publish package distributions to PyPI
55+
uses: pypa/gh-action-pypi-publish@release/v1

Diff for: .github/workflows/pull-request-checks.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Pull request checks
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
checks:
8+
uses: ./.github/workflows/shared.yml

Diff for: .github/workflows/shared.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Shared Checks
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
format:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Install uv
13+
uses: astral-sh/setup-uv@v3
14+
with:
15+
enable-cache: true
16+
17+
- name: "Set up Python"
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version-file: ".python-version"
21+
22+
- name: Install the project
23+
run: uv sync --frozen --all-extras --dev
24+
25+
- name: Run ruff format check
26+
run: uv run --frozen ruff check .
27+
28+
typecheck:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@v3
35+
with:
36+
enable-cache: true
37+
38+
- name: "Set up Python"
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version-file: ".python-version"
42+
43+
- name: Install the project
44+
run: uv sync --frozen --all-extras --dev
45+
46+
- name: Run pyright
47+
run: uv run --frozen pyright

Diff for: .python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

Diff for: CODE_OF_CONDUCT.md

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

Diff for: README.md

+20-21
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
# MCP Create Server
22

3-
[![PyPI](https://img.shields.io/pypi/v/mcp-create-server)](https://pypi.org/project/mcp-create-server/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3+
[![PyPI](https://img.shields.io/pypi/v/create-mcp-server)](https://pypi.org/project/create-mcp-server/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
44

5-
Create MCP server projects with no build configuration.
5+
Create [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server projects with no build configuration.
66

77
## Quick Overview
88

99
```sh
10-
# Using pip
11-
pip install mcp-create-server
12-
create-mcp-server
13-
14-
# Or using uvx (recommended)
10+
# Using uvx (recommended)
1511
uvx create-mcp-server
12+
13+
# Or using pip
14+
pip install create-mcp-server
15+
create-mcp-server
1616
```
1717

1818
You don't need to install or configure any dependencies manually. The tool will set up everything you need to create an MCP server.
1919

2020
## Creating a Server
2121

22-
**You'll need to have uv >= 0.4.10 installed on your machine.**
22+
**You'll need to have [UV](https://docs.astral.sh/uv/) >= 0.4.10 installed on your machine.**
2323

2424
To create a new server, run either of these commands:
2525

26-
### Using pip
26+
### Using uvx (recommended)
2727
```sh
28-
pip install mcp-create-server
29-
create-mcp-server
28+
uvx create-mcp-server
3029
```
3130

32-
### Using uvx (recommended)
31+
### Using pip
3332
```sh
34-
uvx create-mcp-server
33+
pip install create-mcp-server
34+
create-mcp-server
3535
```
3636

3737
It will walk you through creating a new MCP server project. When complete, you'll have a new directory with this structure:
@@ -40,12 +40,11 @@ It will walk you through creating a new MCP server project. When complete, you'l
4040
my-server/
4141
├── README.md
4242
├── pyproject.toml
43-
├── src/
44-
│ └── my_server/
45-
│ ├── __init__.py
46-
│ └── server.py
47-
└── tests/
48-
└── __init__.py
43+
└── src/
44+
└── my_server/
45+
├── __init__.py
46+
├── __main__.py
47+
└── server.py
4948
```
5049

5150
No configuration or complicated folder structures, only the files you need to run your server.
@@ -62,9 +61,9 @@ uv run my-server
6261

6362
- Simple command-line interface for creating new projects
6463
- Auto-configures Claude Desktop app integration when available
65-
- Uses uv for fast, reliable package management
64+
- Uses [uvx](https://docs.astral.sh/uv/guides/tools/) for fast, reliable package management and project creation
6665
- Sets up basic MCP server structure
67-
- Includes example endpoints
66+
- Uses the [Model Context Protocol Python SDK](https://github.com/modelcontextprotocol/python-sdk) for the server project
6867

6968
## Philosophy
7069

Diff for: pyproject.toml

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
[project]
22
name = "create-mcp-server"
3-
version = "1.0.0"
3+
version = "1.0.1.dev0"
44
description = "Create an MCP server project from a template."
55
readme = "README.md"
66
requires-python = ">=3.10"
7-
dependencies = ["click>=8.1.7", "packaging>=24.2"]
7+
dependencies = [
8+
"click>=8.1.7",
9+
"jinja2>=3.1.4",
10+
"packaging>=24.2",
11+
"toml>=0.10.2",
12+
]
813

914
[project.scripts]
1015
create-mcp-server = "create_mcp_server:main"
@@ -14,7 +19,10 @@ requires = ["hatchling"]
1419
build-backend = "hatchling.build"
1520

1621
[tool.hatch.build.targets.wheel]
17-
artifacts = ["template"]
22+
artifacts = ["src/create_mcp_server/template"]
1823

1924
[tool.uv]
20-
dev-dependencies = ["ruff>=0.7.4"]
25+
dev-dependencies = [
26+
"pyright>=1.1.389",
27+
"ruff>=0.7.4",
28+
]

0 commit comments

Comments
 (0)