Skip to main content
Glama

Encoding MCP Server

by whyjp
PYPI_DEPLOYMENT.mdโ€ข5.92 kB
# ๐Ÿš€ PyPI ๋ฐฐํฌ ๊ฐ€์ด๋“œ ์ด ๋ฌธ์„œ๋Š” `encoding-mcp` ํŒจํ‚ค์ง€๋ฅผ PyPI์— ๋ฐฐํฌํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค. ## ๐Ÿ“‹ ์‚ฌ์ „ ์ค€๋น„์‚ฌํ•ญ ### 1. PyPI ๊ณ„์ • ์ƒ์„ฑ - [PyPI.org](https://pypi.org) ๊ณ„์ • ์ƒ์„ฑ - [TestPyPI.org](https://test.pypi.org) ๊ณ„์ • ์ƒ์„ฑ (ํ…Œ์ŠคํŠธ์šฉ) ### 2. API ํ† ํฐ ์ƒ์„ฑ PyPI์™€ TestPyPI์—์„œ API ํ† ํฐ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค: 1. PyPI ๋กœ๊ทธ์ธ โ†’ Account settings โ†’ API tokens 2. "Add API token" ํด๋ฆญ 3. Token name: `encoding-mcp-release` 4. Scope: "Entire account" (์ฒซ ๋ฐฐํฌ์‹œ) ๋˜๋Š” "Project: encoding-mcp" 5. ์ƒ์„ฑ๋œ ํ† ํฐ์„ ์•ˆ์ „ํ•œ ๊ณณ์— ์ €์žฅ ### 3. GitHub Secrets ์„ค์ • GitHub ์ €์žฅ์†Œ์—์„œ ๋‹ค์Œ Secrets๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค: - `PYPI_API_TOKEN`: PyPI API ํ† ํฐ - `TEST_PYPI_API_TOKEN`: TestPyPI API ํ† ํฐ (์„ ํƒ์‚ฌํ•ญ) **์„ค์ • ๋ฐฉ๋ฒ•:** 1. GitHub ์ €์žฅ์†Œ โ†’ Settings โ†’ Secrets and variables โ†’ Actions 2. "New repository secret" ํด๋ฆญ 3. Name๊ณผ Value ์ž…๋ ฅ ํ›„ ์ €์žฅ ## ๐Ÿ› ๏ธ ๋กœ์ปฌ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์ • ### 1. ๊ฐœ๋ฐœ ์˜์กด์„ฑ ์„ค์น˜ ```bash # ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์ • pip install -e .[dev,test] # ๋˜๋Š” ๊ฐœ๋ณ„ ์„ค์น˜ pip install build twine pytest flake8 mypy black ``` ### 2. ์ฝ”๋“œ ํ’ˆ์งˆ ๊ฒ€์‚ฌ ```bash # ๋ฆฐํŒ… flake8 encoding_mcp # ํƒ€์ž… ์ฒดํฌ mypy encoding_mcp # ์ฝ”๋“œ ํฌ๋งทํŒ… black encoding_mcp # ํ…Œ์ŠคํŠธ ์‹คํ–‰ pytest --cov=encoding_mcp ``` ## ๐Ÿ“ฆ ์ˆ˜๋™ ๋ฐฐํฌ ๋ฐฉ๋ฒ• ### 1. ํŒจํ‚ค์ง€ ๋นŒ๋“œ ```bash # ๋นŒ๋“œ ๋””๋ ‰ํ„ฐ๋ฆฌ ์ •๋ฆฌ rm -rf dist/ build/ *.egg-info/ # ํŒจํ‚ค์ง€ ๋นŒ๋“œ python -m build ``` ### 2. ํŒจํ‚ค์ง€ ๊ฒ€์ฆ ```bash # ํŒจํ‚ค์ง€ ๊ตฌ์กฐ ํ™•์ธ twine check dist/* # ์„ค์น˜ ํ…Œ์ŠคํŠธ pip install dist/*.whl python -c "import encoding_mcp; print(encoding_mcp.__version__)" ``` ### 3. TestPyPI์— ์—…๋กœ๋“œ (ํ…Œ์ŠคํŠธ) ```bash # TestPyPI์— ์—…๋กœ๋“œ twine upload --repository testpypi dist/* # TestPyPI์—์„œ ์„ค์น˜ ํ…Œ์ŠคํŠธ pip install --index-url https://test.pypi.org/simple/ encoding-mcp ``` ### 4. PyPI์— ์—…๋กœ๋“œ (์šด์˜) ```bash # PyPI์— ์—…๋กœ๋“œ twine upload dist/* # PyPI์—์„œ ์„ค์น˜ ํ…Œ์ŠคํŠธ pip install encoding-mcp ``` ## ๐Ÿค– ์ž๋™ ๋ฐฐํฌ ๋ฐฉ๋ฒ• (๊ถŒ์žฅ) ### 1. GitHub Actions๋ฅผ ํ†ตํ•œ ์ž๋™ ๋ฐฐํฌ ํ”„๋กœ์ ํŠธ์—๋Š” ๋‹ค์Œ ์›Œํฌํ”Œ๋กœ์šฐ๊ฐ€ ์„ค์ •๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค: - **`.github/workflows/test.yml`**: Push/PR ์‹œ ์ž๋™ ํ…Œ์ŠคํŠธ - **`.github/workflows/release.yml`**: ํƒœ๊ทธ ์ƒ์„ฑ ์‹œ ์ž๋™ ๋ฐฐํฌ ### 2. ๋ฆด๋ฆฌ์Šค ์ƒ์„ฑ ๊ณผ์ • #### A. ๋ฒ„์ „ ์—…๋ฐ์ดํŠธ ```bash # ๋ฒ„์ „ ํ™•์ธ git tag --list # ์ƒˆ ๋ฒ„์ „ ํƒœ๊ทธ ์ƒ์„ฑ (์˜ˆ: v1.1.0) git tag v1.1.0 git push origin v1.1.0 ``` #### B. ์ž๋™ ๋ฐฐํฌ ๊ณผ์ • 1. ํƒœ๊ทธ ํ‘ธ์‹œ โ†’ GitHub Actions ํŠธ๋ฆฌ๊ฑฐ 2. ๋‹ค์ค‘ Python ๋ฒ„์ „์—์„œ ํ…Œ์ŠคํŠธ ์‹คํ–‰ 3. ํŒจํ‚ค์ง€ ๋นŒ๋“œ ๋ฐ ๊ฒ€์ฆ 4. PyPI์— ์ž๋™ ์—…๋กœ๋“œ #### C. ๋ฆด๋ฆฌ์Šค ๋…ธํŠธ ์ž‘์„ฑ GitHub์—์„œ Release ํŽ˜์ด์ง€์— ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ๊ธฐ๋กํ•ฉ๋‹ˆ๋‹ค. ## ๐Ÿ”ง ๊ณ ๊ธ‰ ์„ค์ • ### 1. Trusted Publishing (๊ถŒ์žฅ) GitHub Actions์—์„œ OIDC๋ฅผ ์‚ฌ์šฉํ•œ ๋ณด์•ˆ ๋ฐฐํฌ: 1. PyPI โ†’ Account settings โ†’ Publishing 2. "Add a new pending publisher" ํด๋ฆญ 3. ์ €์žฅ์†Œ ์ •๋ณด ์ž…๋ ฅ: - Owner: `whyjp` - Repository: `encoding_mcp` - Workflow: `release.yml` - Environment: `release` ### 2. ๋ฒ„์ „ ์ž๋™ ๊ด€๋ฆฌ `setuptools_scm`์„ ์‚ฌ์šฉํ•˜์—ฌ Git ํƒœ๊ทธ์—์„œ ์ž๋™์œผ๋กœ ๋ฒ„์ „์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค: ```python # pyproject.toml์— ์„ค์ •๋จ [tool.setuptools_scm] write_to = "encoding_mcp/_version.py" ``` ### 3. ๋ฐฐํฌ ํ™˜๊ฒฝ ๋ถ„๋ฆฌ - **๊ฐœ๋ฐœ**: ๋กœ์ปฌ ํ…Œ์ŠคํŠธ - **์Šคํ…Œ์ด์ง•**: TestPyPI - **์šด์˜**: PyPI ## ๐Ÿ› ๋ฌธ์ œ ํ•ด๊ฒฐ ### 1. ์ผ๋ฐ˜์ ์ธ ์˜ค๋ฅ˜ #### "File already exists" ์˜ค๋ฅ˜ ```bash # ํ•ด๊ฒฐ: ๋ฒ„์ „์„ ์˜ฌ๋ฆฌ๊ฑฐ๋‚˜ ๊ธฐ์กด ํŒŒ์ผ ์‚ญ์ œ twine upload --skip-existing dist/* ``` #### ํŒจํ‚ค์ง€ ๋นŒ๋“œ ์‹คํŒจ ```bash # ์˜์กด์„ฑ ํ™•์ธ pip install --upgrade build setuptools wheel # ๋นŒ๋“œ ๋””๋ ‰ํ„ฐ๋ฆฌ ์ •๋ฆฌ rm -rf dist/ build/ *.egg-info/ ``` #### ํ…Œ์ŠคํŠธ ์‹คํŒจ ```bash # ์˜์กด์„ฑ ์„ค์น˜ ํ™•์ธ pip install -e .[test] # ๊ฐœ๋ณ„ ํ…Œ์ŠคํŠธ ์‹คํ–‰ pytest tests/test_encoding_detector.py -v ``` ### 2. GitHub Actions ๋ฌธ์ œ #### Secrets ์„ค์ • ํ™•์ธ - Repository secrets๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์„ค์ •๋˜์—ˆ๋Š”์ง€ ํ™•์ธ - API ํ† ํฐ์ด ์œ ํšจํ•œ์ง€ ํ™•์ธ #### ์›Œํฌํ”Œ๋กœ์šฐ ๊ถŒํ•œ ํ™•์ธ - Repository โ†’ Settings โ†’ Actions โ†’ General - "Workflow permissions" ํ™•์ธ ## ๐Ÿ“Š ๋ฐฐํฌ ์ƒํƒœ ๋ชจ๋‹ˆํ„ฐ๋ง ### 1. PyPI ํ†ต๊ณ„ - [PyPI ํ”„๋กœ์ ํŠธ ํŽ˜์ด์ง€](https://pypi.org/project/encoding-mcp/) - ๋‹ค์šด๋กœ๋“œ ์ˆ˜, ๋ฒ„์ „ ์ •๋ณด ํ™•์ธ ### 2. GitHub Actions - Actions ํƒญ์—์„œ ๋นŒ๋“œ/๋ฐฐํฌ ์ƒํƒœ ํ™•์ธ - ์‹คํŒจ ์‹œ ๋กœ๊ทธ๋ฅผ ํ†ตํ•œ ๋ฌธ์ œ ์ง„๋‹จ ### 3. ์„ค์น˜ ํ…Œ์ŠคํŠธ ```bash # ๋‹ค์–‘ํ•œ ํ™˜๊ฒฝ์—์„œ ํ…Œ์ŠคํŠธ pip install encoding-mcp python -c "import encoding_mcp; print('Success!')" ``` ## ๐ŸŽฏ ๋ฐฐํฌ ์ฒดํฌ๋ฆฌ์ŠคํŠธ ### ๋ฐฐํฌ ์ „ ํ™•์ธ์‚ฌํ•ญ - [ ] ๋ชจ๋“  ํ…Œ์ŠคํŠธ ํ†ต๊ณผ - [ ] ์ฝ”๋“œ ํ’ˆ์งˆ ๊ฒ€์‚ฌ ํ†ต๊ณผ - [ ] README.md ์—…๋ฐ์ดํŠธ - [ ] CHANGELOG ์ž‘์„ฑ - [ ] ๋ฒ„์ „ ๋ฒˆํ˜ธ ํ™•์ธ - [ ] GitHub Secrets ์„ค์ • ํ™•์ธ ### ๋ฐฐํฌ ํ›„ ํ™•์ธ์‚ฌํ•ญ - [ ] PyPI์—์„œ ํŒจํ‚ค์ง€ ํ™•์ธ - [ ] ์„ค์น˜ ํ…Œ์ŠคํŠธ ์„ฑ๊ณต - [ ] GitHub Release ์ƒ์„ฑ - [ ] ๋ฌธ์„œ ์—…๋ฐ์ดํŠธ ## ๐Ÿ”„ ์ง€์†์  ๊ฐœ์„  ### 1. ์ž๋™ํ™” ๊ฐœ์„  - ๋” ๋งŽ์€ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ์ถ”๊ฐ€ - ๋‹ค์–‘ํ•œ OS/Python ๋ฒ„์ „ ์ง€์› - ์„ฑ๋Šฅ ๋ฒค์น˜๋งˆํฌ ์ถ”๊ฐ€ ### 2. ํ’ˆ์งˆ ๊ด€๋ฆฌ - ์ฝ”๋“œ ์ปค๋ฒ„๋ฆฌ์ง€ ํ–ฅ์ƒ - ์ •์  ๋ถ„์„ ๋„๊ตฌ ์ถ”๊ฐ€ - ๋ณด์•ˆ ์Šค์บ” ๋„๊ตฌ ํ†ตํ•ฉ ### 3. ์‚ฌ์šฉ์ž ํ”ผ๋“œ๋ฐฑ - Issue ์ถ”์  ๋ฐ ํ•ด๊ฒฐ - ์‚ฌ์šฉ์ž ์š”์ฒญ ๊ธฐ๋Šฅ ๊ตฌํ˜„ - ๋ฌธ์„œ ๊ฐœ์„  --- **์ฐธ๊ณ  ๋งํฌ:** - [PyPI Packaging Guide](https://packaging.python.org/) - [GitHub Actions Documentation](https://docs.github.com/actions) - [Setuptools Documentation](https://setuptools.pypa.io/)

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/whyjp/encoding_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server