mcp-creator-python 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. mcp_creator_python-1.0.0/.gitignore +15 -0
  2. mcp_creator_python-1.0.0/LAUNCHGUIDE.md +46 -0
  3. mcp_creator_python-1.0.0/PKG-INFO +117 -0
  4. mcp_creator_python-1.0.0/README.md +105 -0
  5. mcp_creator_python-1.0.0/pyproject.toml +26 -0
  6. mcp_creator_python-1.0.0/src/mcp_creator/__init__.py +1 -0
  7. mcp_creator_python-1.0.0/src/mcp_creator/server.py +202 -0
  8. mcp_creator_python-1.0.0/src/mcp_creator/services/__init__.py +0 -0
  9. mcp_creator_python-1.0.0/src/mcp_creator/services/codegen.py +593 -0
  10. mcp_creator_python-1.0.0/src/mcp_creator/services/file_writer.py +39 -0
  11. mcp_creator_python-1.0.0/src/mcp_creator/services/pypi_client.py +55 -0
  12. mcp_creator_python-1.0.0/src/mcp_creator/services/subprocess_runner.py +51 -0
  13. mcp_creator_python-1.0.0/src/mcp_creator/tools/__init__.py +0 -0
  14. mcp_creator_python-1.0.0/src/mcp_creator/tools/add_tool.py +94 -0
  15. mcp_creator_python-1.0.0/src/mcp_creator/tools/build_package.py +50 -0
  16. mcp_creator_python-1.0.0/src/mcp_creator/tools/check_pypi_name.py +37 -0
  17. mcp_creator_python-1.0.0/src/mcp_creator/tools/check_setup.py +104 -0
  18. mcp_creator_python-1.0.0/src/mcp_creator/tools/creator_profile.py +106 -0
  19. mcp_creator_python-1.0.0/src/mcp_creator/tools/generate_launchguide.py +95 -0
  20. mcp_creator_python-1.0.0/src/mcp_creator/tools/publish_package.py +72 -0
  21. mcp_creator_python-1.0.0/src/mcp_creator/tools/scaffold_server.py +122 -0
  22. mcp_creator_python-1.0.0/src/mcp_creator/tools/setup_github.py +137 -0
  23. mcp_creator_python-1.0.0/src/mcp_creator/transport.py +11 -0
  24. mcp_creator_python-1.0.0/tests/test_add_tool.py +75 -0
  25. mcp_creator_python-1.0.0/tests/test_check_pypi_name.py +20 -0
  26. mcp_creator_python-1.0.0/tests/test_codegen.py +112 -0
  27. mcp_creator_python-1.0.0/tests/test_scaffold.py +248 -0
  28. mcp_creator_python-1.0.0/tests/test_server.py +24 -0
@@ -0,0 +1,15 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+ *.egg
9
+ .venv/
10
+ venv/
11
+ .env
12
+ *.so
13
+ .pytest_cache/
14
+ .mypy_cache/
15
+ .ruff_cache/
@@ -0,0 +1,46 @@
1
+ # mcp-creator
2
+
3
+ ## Tagline
4
+ Create, build, and publish Python MCP servers to PyPI — conversationally.
5
+
6
+ ## Description
7
+ MCP Creator is a meta-tool that helps anyone create their own MCP servers. Install it, add it to your AI assistant, and the assistant walks you through the entire process: naming your package, checking PyPI availability, scaffolding a complete project with FastMCP, building, publishing, and pushing to GitHub. It remembers your setup across sessions so returning creators skip straight to building. Zero configuration required — just describe what you want to build and it handles the rest. Perfect for beginners who want to create and share their own MCP tools.
8
+
9
+ ## Setup Requirements
10
+ No environment variables required. Just install and add to your MCP config.
11
+
12
+ ## Category
13
+ Developer Tools
14
+
15
+ ## Features
16
+ - Persistent creator profile — remembers your setup, usernames, and project history across sessions
17
+ - Detects installed tools (uv, git, gh, PyPI token) and only walks through what's missing
18
+ - Check PyPI package name availability before you start
19
+ - Scaffold a complete, runnable MCP server project from a description and tool definitions
20
+ - Generated projects use FastMCP, hatchling, and follow Python packaging best practices
21
+ - Add new tools to existing projects without manual wiring
22
+ - Build and publish to PyPI directly from your AI assistant
23
+ - Initialize git, create a GitHub repo, and push code in one step
24
+ - Generate LAUNCHGUIDE.md for MCP Marketplace submission
25
+ - Zero external dependencies beyond mcp[cli] — installs instantly
26
+
27
+ ## Getting Started
28
+ - "Create an MCP server that translates text between languages"
29
+ - "I want to build an MCP that checks domain name availability"
30
+ - "Help me make an MCP server for managing my Notion pages"
31
+ - Tool: get_creator_profile — Load your profile and project history
32
+ - Tool: update_creator_profile — Save setup state and project history across sessions
33
+ - Tool: check_setup — Detect what's installed and skip setup you've already done
34
+ - Tool: check_pypi_name — Verify your package name is available on PyPI
35
+ - Tool: scaffold_server — Generate a complete project from tool definitions
36
+ - Tool: add_tool — Add new tools to an existing project
37
+ - Tool: build_package — Build with uv
38
+ - Tool: publish_package — Publish to PyPI
39
+ - Tool: setup_github — Create a GitHub repo and push your code
40
+ - Tool: generate_launchguide — Create marketplace submission file
41
+
42
+ ## Tags
43
+ mcp, developer-tools, scaffolding, python, pypi, code-generation, fastmcp, github, publishing
44
+
45
+ ## Documentation URL
46
+ https://github.com/gmoneyn/mcp-creator
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-creator-python
3
+ Version: 1.0.0
4
+ Summary: Create, build, and publish Python MCP servers to PyPI — conversationally
5
+ License: MIT
6
+ Requires-Python: >=3.11
7
+ Requires-Dist: mcp[cli]>=1.0.0
8
+ Provides-Extra: dev
9
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
10
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
11
+ Description-Content-Type: text/markdown
12
+
13
+ # mcp-creator
14
+
15
+ Create, build, and publish Python MCP servers to PyPI — conversationally.
16
+
17
+ Install `mcp-creator`, add it to your AI assistant, and it walks you through the entire process: naming your package, scaffolding a complete project, building, and publishing to PyPI.
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ pip install mcp-creator
23
+ ```
24
+
25
+ ## Setup
26
+
27
+ Add to Claude Code (`~/.claude/settings.json`):
28
+
29
+ ```json
30
+ {
31
+ "mcpServers": {
32
+ "mcp-creator": {
33
+ "command": "mcp-creator",
34
+ "args": []
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ Or for Cursor (`.cursor/mcp.json`):
41
+
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "mcp-creator": {
46
+ "command": "mcp-creator",
47
+ "args": []
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ ## Tools
54
+
55
+ | Tool | What it does |
56
+ |------|-------------|
57
+ | `get_creator_profile` | Load your persistent profile — setup status, project history. Called first every session. |
58
+ | `update_creator_profile` | Save setup state, usernames, and project history across sessions |
59
+ | `check_setup` | Detect what's installed (uv, git, gh, PyPI token) — only walks through missing steps |
60
+ | `check_pypi_name` | Check if a package name is available on PyPI |
61
+ | `scaffold_server` | Create a complete MCP server project from a name + description + tool definitions |
62
+ | `add_tool` | Add a new tool to an existing scaffolded project |
63
+ | `build_package` | Run `uv build` on the project |
64
+ | `publish_package` | Run `uv publish` to PyPI |
65
+ | `setup_github` | Initialize git, create a GitHub repo, and push the code |
66
+ | `generate_launchguide` | Create LAUNCHGUIDE.md for marketplace submission |
67
+
68
+ ## How It Works
69
+
70
+ 1. **Tell your AI what you want to build**: "I want an MCP server that checks the weather"
71
+ 2. **It checks the name**: calls `check_pypi_name` to verify availability on PyPI
72
+ 3. **It scaffolds the project**: calls `scaffold_server` with your tool definitions — generates a complete, runnable project
73
+ 4. **You fill in the logic**: replace the TODO stubs in `services/` with your real API calls
74
+ 5. **Build & publish**: `build_package` → `publish_package` → live on PyPI
75
+ 6. **Push to GitHub**: `setup_github` creates a repo and pushes your code
76
+ 7. **Submit to marketplace**: `generate_launchguide` creates the submission file with your repo URL
77
+
78
+ ## What Gets Generated
79
+
80
+ For a project named `my-weather-mcp` with a `get_weather` tool:
81
+
82
+ ```
83
+ my-weather-mcp/
84
+ ├── pyproject.toml ← hatchling build, mcp[cli] dep, CLI entry point
85
+ ├── README.md ← install instructions + MCP config JSON
86
+ ├── .gitignore
87
+ ├── src/my_weather_mcp/
88
+ │ ├── __init__.py
89
+ │ ├── server.py ← FastMCP + @mcp.tool() for each tool
90
+ │ ├── transport.py
91
+ │ ├── tools/
92
+ │ │ ├── __init__.py
93
+ │ │ └── get_weather.py
94
+ │ └── services/
95
+ │ ├── __init__.py
96
+ │ └── get_weather_service.py ← TODO: your logic here
97
+ └── tests/
98
+ ├── test_server.py
99
+ └── test_get_weather.py
100
+ ```
101
+
102
+ The generated server runs immediately — stub services return placeholder data so you can test before implementing real logic.
103
+
104
+ ## Requirements
105
+
106
+ - Python 3.11+
107
+ - [uv](https://docs.astral.sh/uv/) (for building and publishing)
108
+
109
+ ## Development
110
+
111
+ ```bash
112
+ git clone https://github.com/gmoneyn/mcp-creator.git
113
+ cd mcp-creator
114
+ uv venv .venv && source .venv/bin/activate
115
+ uv pip install -e ".[dev]"
116
+ pytest -v
117
+ ```
@@ -0,0 +1,105 @@
1
+ # mcp-creator
2
+
3
+ Create, build, and publish Python MCP servers to PyPI — conversationally.
4
+
5
+ Install `mcp-creator`, add it to your AI assistant, and it walks you through the entire process: naming your package, scaffolding a complete project, building, and publishing to PyPI.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install mcp-creator
11
+ ```
12
+
13
+ ## Setup
14
+
15
+ Add to Claude Code (`~/.claude/settings.json`):
16
+
17
+ ```json
18
+ {
19
+ "mcpServers": {
20
+ "mcp-creator": {
21
+ "command": "mcp-creator",
22
+ "args": []
23
+ }
24
+ }
25
+ }
26
+ ```
27
+
28
+ Or for Cursor (`.cursor/mcp.json`):
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "mcp-creator": {
34
+ "command": "mcp-creator",
35
+ "args": []
36
+ }
37
+ }
38
+ }
39
+ ```
40
+
41
+ ## Tools
42
+
43
+ | Tool | What it does |
44
+ |------|-------------|
45
+ | `get_creator_profile` | Load your persistent profile — setup status, project history. Called first every session. |
46
+ | `update_creator_profile` | Save setup state, usernames, and project history across sessions |
47
+ | `check_setup` | Detect what's installed (uv, git, gh, PyPI token) — only walks through missing steps |
48
+ | `check_pypi_name` | Check if a package name is available on PyPI |
49
+ | `scaffold_server` | Create a complete MCP server project from a name + description + tool definitions |
50
+ | `add_tool` | Add a new tool to an existing scaffolded project |
51
+ | `build_package` | Run `uv build` on the project |
52
+ | `publish_package` | Run `uv publish` to PyPI |
53
+ | `setup_github` | Initialize git, create a GitHub repo, and push the code |
54
+ | `generate_launchguide` | Create LAUNCHGUIDE.md for marketplace submission |
55
+
56
+ ## How It Works
57
+
58
+ 1. **Tell your AI what you want to build**: "I want an MCP server that checks the weather"
59
+ 2. **It checks the name**: calls `check_pypi_name` to verify availability on PyPI
60
+ 3. **It scaffolds the project**: calls `scaffold_server` with your tool definitions — generates a complete, runnable project
61
+ 4. **You fill in the logic**: replace the TODO stubs in `services/` with your real API calls
62
+ 5. **Build & publish**: `build_package` → `publish_package` → live on PyPI
63
+ 6. **Push to GitHub**: `setup_github` creates a repo and pushes your code
64
+ 7. **Submit to marketplace**: `generate_launchguide` creates the submission file with your repo URL
65
+
66
+ ## What Gets Generated
67
+
68
+ For a project named `my-weather-mcp` with a `get_weather` tool:
69
+
70
+ ```
71
+ my-weather-mcp/
72
+ ├── pyproject.toml ← hatchling build, mcp[cli] dep, CLI entry point
73
+ ├── README.md ← install instructions + MCP config JSON
74
+ ├── .gitignore
75
+ ├── src/my_weather_mcp/
76
+ │ ├── __init__.py
77
+ │ ├── server.py ← FastMCP + @mcp.tool() for each tool
78
+ │ ├── transport.py
79
+ │ ├── tools/
80
+ │ │ ├── __init__.py
81
+ │ │ └── get_weather.py
82
+ │ └── services/
83
+ │ ├── __init__.py
84
+ │ └── get_weather_service.py ← TODO: your logic here
85
+ └── tests/
86
+ ├── test_server.py
87
+ └── test_get_weather.py
88
+ ```
89
+
90
+ The generated server runs immediately — stub services return placeholder data so you can test before implementing real logic.
91
+
92
+ ## Requirements
93
+
94
+ - Python 3.11+
95
+ - [uv](https://docs.astral.sh/uv/) (for building and publishing)
96
+
97
+ ## Development
98
+
99
+ ```bash
100
+ git clone https://github.com/gmoneyn/mcp-creator.git
101
+ cd mcp-creator
102
+ uv venv .venv && source .venv/bin/activate
103
+ uv pip install -e ".[dev]"
104
+ pytest -v
105
+ ```
@@ -0,0 +1,26 @@
1
+ [project]
2
+ name = "mcp-creator-python"
3
+ version = "1.0.0"
4
+ description = "Create, build, and publish Python MCP servers to PyPI — conversationally"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ license = { text = "MIT" }
8
+ dependencies = [
9
+ "mcp[cli]>=1.0.0",
10
+ ]
11
+
12
+ [project.scripts]
13
+ mcp-creator-python = "mcp_creator.server:main"
14
+
15
+ [build-system]
16
+ requires = ["hatchling"]
17
+ build-backend = "hatchling.build"
18
+
19
+ [tool.hatch.build.targets.wheel]
20
+ packages = ["src/mcp_creator"]
21
+
22
+ [project.optional-dependencies]
23
+ dev = [
24
+ "pytest>=8.0.0",
25
+ "pytest-asyncio>=0.23.0",
26
+ ]
@@ -0,0 +1 @@
1
+ """MCP Creator — create, build, and publish Python MCP servers to PyPI."""
@@ -0,0 +1,202 @@
1
+ """MCP Creator — create, build, and publish Python MCP servers to PyPI."""
2
+
3
+ from mcp.server.fastmcp import FastMCP
4
+
5
+ from mcp_creator.tools.creator_profile import get_creator_profile as _get_creator_profile
6
+ from mcp_creator.tools.creator_profile import update_creator_profile as _update_creator_profile
7
+ from mcp_creator.tools.check_setup import check_setup as _check_setup
8
+ from mcp_creator.tools.check_pypi_name import check_pypi_name as _check_pypi_name
9
+ from mcp_creator.tools.scaffold_server import scaffold_server as _scaffold_server
10
+ from mcp_creator.tools.add_tool import add_tool as _add_tool
11
+ from mcp_creator.tools.build_package import build_package as _build_package
12
+ from mcp_creator.tools.publish_package import publish_package as _publish_package
13
+ from mcp_creator.tools.setup_github import setup_github as _setup_github
14
+ from mcp_creator.tools.generate_launchguide import generate_launchguide as _generate_launchguide
15
+
16
+ mcp = FastMCP("mcp-creator")
17
+
18
+
19
+ @mcp.tool(
20
+ description=(
21
+ "Load the creator's persistent profile — their setup status, GitHub/PyPI usernames, "
22
+ "and project history. Call this FIRST in every session. If the profile exists with "
23
+ "setup_complete=true, skip all onboarding and go straight to building."
24
+ )
25
+ )
26
+ def get_creator_profile() -> str:
27
+ """Load creator profile."""
28
+ return _get_creator_profile()
29
+
30
+
31
+ @mcp.tool(
32
+ description=(
33
+ "Update the creator's profile after setup steps or project creation. "
34
+ "Call this after: setup completes, a project is published, or GitHub/PyPI info is learned. "
35
+ "This persists across sessions so the user never repeats setup."
36
+ )
37
+ )
38
+ def update_creator_profile(
39
+ setup_complete: bool | None = None,
40
+ github_username: str | None = None,
41
+ pypi_username: str | None = None,
42
+ default_output_dir: str | None = None,
43
+ add_project: str | None = None,
44
+ ) -> str:
45
+ """Update creator profile."""
46
+ return _update_creator_profile(
47
+ setup_complete=setup_complete,
48
+ github_username=github_username,
49
+ pypi_username=pypi_username,
50
+ default_output_dir=default_output_dir,
51
+ add_project=add_project,
52
+ )
53
+
54
+
55
+ @mcp.tool(
56
+ description=(
57
+ "Check the user's environment for required tools (uv, git, gh CLI, PyPI token). "
58
+ "Call this after get_creator_profile if setup_complete is false. "
59
+ "If everything is set up, skip beginner instructions and go straight to building."
60
+ )
61
+ )
62
+ def check_setup() -> str:
63
+ """Check what's already set up."""
64
+ return _check_setup()
65
+
66
+
67
+ @mcp.tool(
68
+ description="Check if a package name is available on PyPI. Call this first before scaffolding."
69
+ )
70
+ def check_pypi_name(package_name: str) -> str:
71
+ """Check PyPI name availability."""
72
+ return _check_pypi_name(package_name=package_name)
73
+
74
+
75
+ @mcp.tool(
76
+ description=(
77
+ "Scaffold a complete, runnable MCP server project. "
78
+ "Pass the package name, description, and a JSON array of tool definitions. "
79
+ "Each tool def: {name, description, parameters: [{name, type, required, description, default}], returns}. "
80
+ "The generated server runs immediately with stub implementations. "
81
+ "Set paid=true to add license key gating via the MCP Marketplace SDK. "
82
+ "Set paid_tools to a JSON array of tool names to gate (omit to gate all). "
83
+ 'Set hosting="remote" for an SSE/HTTP server with Dockerfile (default: "local" for stdio).'
84
+ )
85
+ )
86
+ def scaffold_server(
87
+ package_name: str,
88
+ description: str,
89
+ tools: str,
90
+ output_dir: str = ".",
91
+ env_vars: str | None = None,
92
+ paid: bool = False,
93
+ paid_tools: str | None = None,
94
+ hosting: str = "local",
95
+ ) -> str:
96
+ """Scaffold a complete MCP server project."""
97
+ return _scaffold_server(
98
+ package_name=package_name,
99
+ description=description,
100
+ tools=tools,
101
+ output_dir=output_dir,
102
+ env_vars=env_vars,
103
+ paid=paid,
104
+ paid_tools=paid_tools,
105
+ hosting=hosting,
106
+ )
107
+
108
+
109
+ @mcp.tool(
110
+ description=(
111
+ "Add a new tool to an existing scaffolded MCP server. "
112
+ "Pass the project directory and a JSON tool definition. "
113
+ "Creates the tool module, service stub, test, and updates server.py."
114
+ )
115
+ )
116
+ def add_tool(project_dir: str, tool: str) -> str:
117
+ """Add a tool to an existing project."""
118
+ return _add_tool(project_dir=project_dir, tool=tool)
119
+
120
+
121
+ @mcp.tool(
122
+ description="Build the MCP server package using 'uv build'. Run this after implementing your tools."
123
+ )
124
+ def build_package(project_dir: str) -> str:
125
+ """Build the package."""
126
+ return _build_package(project_dir=project_dir)
127
+
128
+
129
+ @mcp.tool(
130
+ description=(
131
+ "Publish the built package to PyPI using 'uv publish'. "
132
+ "Requires a PyPI token — either pass it directly or set UV_PUBLISH_TOKEN env var."
133
+ )
134
+ )
135
+ def publish_package(project_dir: str, token: str | None = None) -> str:
136
+ """Publish to PyPI."""
137
+ return _publish_package(project_dir=project_dir, token=token)
138
+
139
+
140
+ @mcp.tool(
141
+ description=(
142
+ "Initialize git, create a GitHub repo, and push the project. "
143
+ "Requires the gh CLI to be installed and authenticated. "
144
+ "Run this after publishing to PyPI so the repo URL can be included in the LAUNCHGUIDE."
145
+ )
146
+ )
147
+ def setup_github(
148
+ project_dir: str,
149
+ repo_name: str,
150
+ description: str = "",
151
+ private: bool = False,
152
+ ) -> str:
153
+ """Create GitHub repo and push code."""
154
+ return _setup_github(
155
+ project_dir=project_dir,
156
+ repo_name=repo_name,
157
+ description=description,
158
+ private=private,
159
+ )
160
+
161
+
162
+ @mcp.tool(
163
+ description=(
164
+ "Generate a LAUNCHGUIDE.md for MCP Marketplace submission. "
165
+ "Creates a formatted file ready to submit at mcp-marketplace.io. "
166
+ "Limits: tagline max 100 chars, features max 30 items, tags max 30."
167
+ )
168
+ )
169
+ def generate_launchguide(
170
+ project_dir: str,
171
+ package_name: str,
172
+ tagline: str,
173
+ description: str,
174
+ category: str,
175
+ features: str,
176
+ tools_summary: str,
177
+ tags: str,
178
+ setup_requirements: str = "No environment variables required.",
179
+ docs_url: str = "",
180
+ ) -> str:
181
+ """Generate LAUNCHGUIDE.md."""
182
+ return _generate_launchguide(
183
+ project_dir=project_dir,
184
+ package_name=package_name,
185
+ tagline=tagline,
186
+ description=description,
187
+ category=category,
188
+ features=features,
189
+ tools_summary=tools_summary,
190
+ tags=tags,
191
+ setup_requirements=setup_requirements,
192
+ docs_url=docs_url,
193
+ )
194
+
195
+
196
+ def main():
197
+ """Run the MCP Creator server."""
198
+ mcp.run()
199
+
200
+
201
+ if __name__ == "__main__":
202
+ main()