machinecommander 0.1.3__tar.gz → 0.3.0__tar.gz

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,3 @@
1
+ dist/
2
+ __pycache__/
3
+ .venv/
@@ -0,0 +1 @@
1
+ 3.14
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: machinecommander
3
- Version: 0.1.3
3
+ Version: 0.3.0
4
4
  Summary: MachineCommander is an IoT system to manage all the construction machines working on construction projects.
5
5
  Author-email: Ye Wang <wangye@zeaho.com>
6
- Requires-Python: >=3.13
7
- Requires-Dist: mcp>=1.10.1
8
- Requires-Dist: requests>=2.31.0
6
+ Requires-Python: >=3.14
7
+ Requires-Dist: mcp>=2.3.0
8
+ Requires-Dist: requests>=2.34.2
9
9
  Description-Content-Type: text/markdown
10
10
 
11
11
  # machine-commander
@@ -16,9 +16,12 @@ MachineCommander is an IoT system to manage all the construction machines workin
16
16
  {
17
17
  "mcpServers": {
18
18
  "MachineCommander": {
19
- "command": "python machine-commander.py",
20
- "args": ["string"],
21
- "env": {}
19
+ "command": "uvx",
20
+ "args": [ "MachineCommander" ],
21
+ "env": {
22
+ "APP_KEY": "Your zhgcloud App Key",
23
+ "APP_SECRET": "Your App Secret"
24
+ }
22
25
  }
23
26
  }
24
27
  }
@@ -6,9 +6,12 @@ MachineCommander is an IoT system to manage all the construction machines workin
6
6
  {
7
7
  "mcpServers": {
8
8
  "MachineCommander": {
9
- "command": "python machine-commander.py",
10
- "args": ["string"],
11
- "env": {}
9
+ "command": "uvx",
10
+ "args": [ "MachineCommander" ],
11
+ "env": {
12
+ "APP_KEY": "Your zhgcloud App Key",
13
+ "APP_SECRET": "Your App Secret"
14
+ }
12
15
  }
13
16
  }
14
17
  }
@@ -1,16 +1,16 @@
1
1
  [project]
2
2
  name = "machinecommander"
3
- version = "0.1.3"
3
+ version = "0.3.0"
4
4
  description = "MachineCommander is an IoT system to manage all the construction machines working on construction projects."
5
5
  readme = "README.md"
6
- requires-python = ">=3.13"
7
- dependencies = [ "mcp>=1.10.1", "requests>=2.31.0" ]
6
+ requires-python = ">=3.14"
7
+ dependencies = [ "mcp>=2.3.0", "requests>=2.34.2" ]
8
8
  [[project.authors]]
9
9
  name = "Ye Wang"
10
10
  email = "wangye@zeaho.com"
11
11
 
12
12
  [build-system]
13
- requires = [ "hatchling",]
13
+ requires = [ "hatchling" ]
14
14
  build-backend = "hatchling.build"
15
15
 
16
16
  [project.scripts]
@@ -1,14 +1,23 @@
1
- from mcp.server.fastmcp import FastMCP
1
+ from importlib.metadata import version
2
+ from mcp.server.mcpserver import MCPServer
3
+ import os
2
4
  import requests
3
5
 
4
- mcp = FastMCP("MachineCommander")
6
+ mcp = MCPServer("MachineCommander", version=version("machinecommander"))
5
7
 
6
8
  @mcp.tool()
7
9
  def get_construction_machines_data(question: str) -> dict:
8
10
  """MachineCommander is a global system to manage all the construction machines working on construction projects. Use this tool to extract the data of construction machines and projects, and to answer construction related questions. The returned value includes a "result" field, which can be a table (a list of rows) or an answer (a string)."""
9
11
  url = f"https://gpt-agent.zhgcloud.com/paipai_mcp/{question}"
10
12
  try:
11
- response = requests.get(url, headers={"Authorization": "Basic emVhaG8tZ3B0LWFnZW50LWw0OnplYWhvXzkzMjQ2"})
13
+ response = requests.post(
14
+ url,
15
+ headers={"Authorization": "Basic emVhaG8tZ3B0LWFnZW50LWw0OnplYWhvXzkzMjQ2"},
16
+ json={
17
+ "APP_KEY": os.environ.get("APP_KEY", ""),
18
+ "APP_SECRET": os.environ.get("APP_SECRET", "")
19
+ }
20
+ )
12
21
  response.raise_for_status()
13
22
  result = response.json()
14
23
  except Exception as e: