Skip to main content

MCP server sample (ecommerce)

Project description

FastMCP Template

파일 설명

(fastmcp-template) moono@9ff9740bf671:/mnt/data_ssd/ncai-git-repos/fastmcp-template$ tree .
.
|-- README.md
|-- fastmcp.json    # FastMCP cli 용
|-- launcher.py     # FastMCP cli 용
|-- pyproject.toml  # uv project 세팅
|-- src             # actual source code
|   `-- ecommerce_mcp_server
|       |-- Dockerfile
|       |-- __init__.py
|       |-- core
|       |   |-- __init__.py
|       |   |-- httpx_async_client.py
|       |   `-- models.py
|       |-- logs
|       |   |-- __init__.py
|       |   |-- formatters.py
|       |   |-- helper.py
|       |   `-- loaders.py
|       |-- server.py
|       `-- tools
|           |-- __init__.py
|           `-- openapi.py
`-- uv.lock

App 환경변수

env variable description default
MCP_TRANSPORT select transport (stdio, http) stdio
MCP_HOST host setting on http setting 0.0.0.0
MCP_PORT port setting on http setting 8000

사용 방법

  1. Command line
# 1-1. Using `uv`
~$ uv run python -m ecommerce_mcp_server.server
~$ MCP_TRANSPORT=http uv run python -m ecommerce_mcp_server.server  # http transport with --host=0.0.0.0 --port=8000

# 1-2. Using `pyproject.toml` defined script
~$ run-mcp-server
~$ MCP_TRANSPORT=http run-mcp-server  # http transport with --host=0.0.0.0 --port=8000

# 1-3. FastMCP cli using `fastmcp.json` (default)
~$ fastmcp run
~$ fastmcp run fastmcp.json
~$ fastmcp run --transport=http --host=0.0.0.0 --port=8000  # http transport
  1. vscode debugger
  • choose launch target Python Debugger: FastMCP

FastMCP Cli

  • Run MCP server
~$ fastmcp run
  • Extract schema
~$ fastmcp inspect launcher.py -f fastmcp -o manifest.json

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_sample-0.1.0.tar.gz (75.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_sample-0.1.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_sample-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_server_sample-0.1.0.tar.gz
  • Upload date:
  • Size: 75.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for mcp_server_sample-0.1.0.tar.gz
Algorithm Hash digest
SHA256 81058167ee7228cd7a64947c643839833f093f7720e15bedddfe6cfb154665e6
MD5 051756de108a513601afa0344c692c96
BLAKE2b-256 4f8f95e6c3c65bcb2fa6e512f7c08cbbfcc724d7dfd4cc4b46fc49edeb02ae7a

See more details on using hashes here.

File details

Details for the file mcp_server_sample-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_sample-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfc9c4f8231f28ebf6e2a0f59c8a1d6a97cfea7272d9966d39432894ca77b4b0
MD5 b04ffe925e16b7b9a8e0e1d465fa4da6
BLAKE2b-256 b8e1e2f4746612f3249d81e527ad477fc2f0eac43dd398f405aeeaf43cf5dcd2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page