darling-mcp-server-demo 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,44 @@
1
+ """
2
+ FastMCP quickstart example.
3
+
4
+ Run from the repository root:
5
+ uv run examples/snippets/servers/fastmcp_quickstart.py
6
+ """
7
+
8
+ from mcp.server.fastmcp import FastMCP
9
+
10
+ # Create an MCP server
11
+ mcp = FastMCP("Demo", json_response=True)
12
+
13
+
14
+ # Add an addition tool
15
+ @mcp.tool()
16
+ def add(a: int, b: int) -> int:
17
+ """Add two numbers"""
18
+ return a + b
19
+
20
+
21
+ # Add a dynamic greeting resource
22
+ @mcp.resource("greeting://{name}")
23
+ def get_greeting(name: str) -> str:
24
+ """Get a personalized greeting"""
25
+ return f"Hello, {name}!"
26
+
27
+
28
+ # Add a prompt
29
+ @mcp.prompt()
30
+ def greet_user(name: str, style: str = "friendly") -> str:
31
+ """Generate a greeting prompt"""
32
+ styles = {
33
+ "friendly": "Please write a warm, friendly greeting",
34
+ "formal": "Please write a formal, professional greeting",
35
+ "casual": "Please write a casual, relaxed greeting",
36
+ }
37
+
38
+ return f"{styles.get(style, styles['friendly'])} for someone named {name}."
39
+
40
+
41
+
42
+
43
+ def main() -> None:
44
+ mcp.run(transport="stdio")
@@ -0,0 +1,10 @@
1
+ Metadata-Version: 2.3
2
+ Name: darling-mcp-server-demo
3
+ Version: 0.1.0
4
+ Summary: Add your description here
5
+ Author: ahua
6
+ Author-email: ahua <1456547279@qq.com>
7
+ Requires-Dist: mcp[cli]>=1.26.0
8
+ Requires-Python: >=3.13
9
+ Description-Content-Type: text/markdown
10
+
@@ -0,0 +1,5 @@
1
+ darling_mcp_server_demo/__init__.py,sha256=A82gzN0ATNI-ZFUXB5qzxIwtT1joDIol85at0CaWOaA,991
2
+ darling_mcp_server_demo-0.1.0.dist-info/WHEEL,sha256=5DEXXimM34_d4Gx1AuF9ysMr1_maoEtGKjaILM3s4w4,80
3
+ darling_mcp_server_demo-0.1.0.dist-info/entry_points.txt,sha256=LO2Dqx1mPe5txwspkXmojCBK7KLOHcFtw0VF25Kkv5c,74
4
+ darling_mcp_server_demo-0.1.0.dist-info/METADATA,sha256=f7dw9CqyjHzdLryB15FkC6MaPQrocq8iGa-yEchletQ,251
5
+ darling_mcp_server_demo-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.9.29
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ darling-mcp-server-demo = darling_mcp_server_demo:main
3
+