a demo of mcp server
# server.py
from mcp.server.fastmcp import FastMCP
# Create an MCP server
mcp = FastMCP("Demo")
# Add an addition tool
@mcp.tool()
def add(a: int, b: int) -> int:
"""Add two numbers"""
return a + b
# Add a dynamic greeting resource
@mcp.resource("greeting://{name}")
def get_greeting(name: str) -> str:
"""Get a personalized greeting"""
return f"Hello, {name}!"
def main() -> None: # 主函数
mcp.run(transport="stdio")
Metadata
Release files for test-mcp-yfei-demo 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| test_mcp_yfei_demo-0.1.2.tar.gz | 9.1 kB | Without provenance | Details for test_mcp_yfei_demo-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| test_mcp_yfei_demo-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for test_mcp_yfei_demo-0.1.2-py3-none-any.whl |
Total release size: 11.0 kB
Release files / test_mcp_yfei_demo-0.1.2.tar.gz
| Download URL | test_mcp_yfei_demo-0.1.2.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7998b4f06787f8d4b09b1ce459ba48d55a7df9fefcc625d87467fb4dea5dbbac
|
|
BLAKE2b-256 checksum How to use checksums |
ecee6580aa0a0610ee742d458fba5a9283950281279a9d61300044f6c9b99b38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.4
|
Release files / test_mcp_yfei_demo-0.1.2-py3-none-any.whl
| Download URL | test_mcp_yfei_demo-0.1.2-py3-none-any.whl |
|---|---|
| Size | 2.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e7ed444f2bfe5fb249f5d354fcf8c07ac7eef2a5cb7bc09fd818395b29e0530
|
|
BLAKE2b-256 checksum How to use checksums |
8a32685de1eb314071f5790595cc8e09e7621e058fe9a76296fd31ebc531980e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.4
|
Security for test-mcp-yfei-demo 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.