python-mcp-test 0.1.0__py3-none-any.whl → 0.1.3__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.
- python_mcp_test/__init__.py +1 -0
- main.py → python_mcp_test/server.py +48 -44
- {python_mcp_test-0.1.0.dist-info → python_mcp_test-0.1.3.dist-info}/METADATA +1 -1
- python_mcp_test-0.1.3.dist-info/RECORD +7 -0
- python_mcp_test-0.1.3.dist-info/entry_points.txt +2 -0
- python_mcp_test-0.1.3.dist-info/top_level.txt +1 -0
- python_mcp_test-0.1.0.dist-info/RECORD +0 -5
- python_mcp_test-0.1.0.dist-info/top_level.txt +0 -1
- {python_mcp_test-0.1.0.dist-info → python_mcp_test-0.1.3.dist-info}/WHEEL +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
# Empty __init__.py file to make this a Python package
|
@@ -1,44 +1,48 @@
|
|
1
|
-
# server.py
|
2
|
-
from mcp.server.fastmcp import FastMCP
|
3
|
-
import requests
|
4
|
-
import os
|
5
|
-
from typing import Optional
|
6
|
-
from dotenv import load_dotenv
|
7
|
-
|
8
|
-
# Load environment variables from .env file
|
9
|
-
load_dotenv()
|
10
|
-
|
11
|
-
# Create an MCP server
|
12
|
-
mcp = FastMCP("Demo")
|
13
|
-
|
14
|
-
|
15
|
-
# Add an addition tool
|
16
|
-
@mcp.tool()
|
17
|
-
def add(a: int, b: int) -> int:
|
18
|
-
"""Add two numbers"""
|
19
|
-
return a + b
|
20
|
-
|
21
|
-
@mcp.tool()
|
22
|
-
def getTask(taskID: str) -> str:
|
23
|
-
|
24
|
-
""" This tool is capable of retreieving the task details for a specific task ID and return it to the user"""
|
25
|
-
|
26
|
-
# Get the API token from environment variables
|
27
|
-
api_token = os.getenv("CLICKUP_API_TOKEN")
|
28
|
-
|
29
|
-
if not api_token:
|
30
|
-
return "Error: CLICKUP_API_TOKEN environment variable not set"
|
31
|
-
|
32
|
-
url = f"https://api.clickup.com/api/v2/task/{taskID}"
|
33
|
-
|
34
|
-
headers = {
|
35
|
-
"accept": "application/json",
|
36
|
-
"Authorization": api_token
|
37
|
-
}
|
38
|
-
|
39
|
-
response = requests.get(url, headers=headers)
|
40
|
-
response.raise_for_status() # Raise an exception for bad status codes
|
41
|
-
return response.text
|
42
|
-
|
43
|
-
|
44
|
-
|
1
|
+
# server.py
|
2
|
+
from mcp.server.fastmcp import FastMCP
|
3
|
+
import requests
|
4
|
+
import os
|
5
|
+
from typing import Optional
|
6
|
+
from dotenv import load_dotenv
|
7
|
+
|
8
|
+
# Load environment variables from .env file
|
9
|
+
load_dotenv()
|
10
|
+
|
11
|
+
# Create an MCP server
|
12
|
+
mcp = FastMCP("Demo")
|
13
|
+
|
14
|
+
|
15
|
+
# Add an addition tool
|
16
|
+
@mcp.tool()
|
17
|
+
def add(a: int, b: int) -> int:
|
18
|
+
"""Add two numbers"""
|
19
|
+
return a + b
|
20
|
+
|
21
|
+
@mcp.tool()
|
22
|
+
def getTask(taskID: str) -> str:
|
23
|
+
|
24
|
+
""" This tool is capable of retreieving the task details for a specific task ID and return it to the user"""
|
25
|
+
|
26
|
+
# Get the API token from environment variables
|
27
|
+
api_token = os.getenv("CLICKUP_API_TOKEN")
|
28
|
+
|
29
|
+
if not api_token:
|
30
|
+
return "Error: CLICKUP_API_TOKEN environment variable not set"
|
31
|
+
|
32
|
+
url = f"https://api.clickup.com/api/v2/task/{taskID}"
|
33
|
+
|
34
|
+
headers = {
|
35
|
+
"accept": "application/json",
|
36
|
+
"Authorization": api_token
|
37
|
+
}
|
38
|
+
|
39
|
+
response = requests.get(url, headers=headers)
|
40
|
+
response.raise_for_status() # Raise an exception for bad status codes
|
41
|
+
return response.text
|
42
|
+
|
43
|
+
def main():
|
44
|
+
"""Main entry point for the MCP server"""
|
45
|
+
mcp.run()
|
46
|
+
|
47
|
+
if __name__ == "__main__":
|
48
|
+
main()
|
@@ -0,0 +1,7 @@
|
|
1
|
+
python_mcp_test/__init__.py,sha256=2R-fVi7oABoTTzJ3E39k8hZfm1rF4Q9X9gIXVJh_tsI,56
|
2
|
+
python_mcp_test/server.py,sha256=FqHQ6qUDGdFvDdJIGYQYwtVSoV8N8NcoHqGqC_oQCEw,1180
|
3
|
+
python_mcp_test-0.1.3.dist-info/METADATA,sha256=vGpjnOCCOORiISqzDb5eaKXftOSjC4PugWO2YQ2pHH8,1440
|
4
|
+
python_mcp_test-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
5
|
+
python_mcp_test-0.1.3.dist-info/entry_points.txt,sha256=bLlgGucBpJfNdbBVo9EqImp1wEkmhlL2tqG8hC5NTC4,64
|
6
|
+
python_mcp_test-0.1.3.dist-info/top_level.txt,sha256=mTam0zbOY5U9vAEmWo6Ekb17BS-tnN44W9ulZxANDWA,16
|
7
|
+
python_mcp_test-0.1.3.dist-info/RECORD,,
|
@@ -0,0 +1 @@
|
|
1
|
+
python_mcp_test
|
@@ -1,5 +0,0 @@
|
|
1
|
-
main.py,sha256=E7oZNFXZmG6t3_RaTAnKg6Y_WK2NC8j4xUvMS1ImCPU,1061
|
2
|
-
python_mcp_test-0.1.0.dist-info/METADATA,sha256=RWbwZm8XUxlQTIEt88_LI-b7T6tUscDkQEbJ0iJ9jak,1440
|
3
|
-
python_mcp_test-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
4
|
-
python_mcp_test-0.1.0.dist-info/top_level.txt,sha256=ZAMgPdWghn6xTRBO6Kc3ML1y3ZrZLnjZlqbboKXc_AE,5
|
5
|
-
python_mcp_test-0.1.0.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
main
|
File without changes
|