Skip to content

Commit a373f91

Browse files
author
LittleCoinCoin
committed
[Test] Add simple_dep_pkg
1 parent d28a618 commit a373f91

4 files changed

Lines changed: 63 additions & 0 deletions

File tree

simple_dep_pkg/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# simple_dep_pkg
2+
3+
Package with a simple dependency on base_pkg_1 for testing the dependency resolver.
4+
5+
## Tools
6+
7+
- **simple_wrapper**: Simple wrapper function that depends on base_pkg_1

simple_dep_pkg/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Hatch package initialization

simple_dep_pkg/hatch_metadata.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "simple_dep_pkg",
3+
"version": "1.0.0",
4+
"description": "Package with a simple dependency for testing",
5+
"category": "testing",
6+
"tags": ["test", "dependency"],
7+
"author": {
8+
"name": "Test User",
9+
"email": "test@example.com"
10+
},
11+
"license": "MIT",
12+
"entry_point": "server.py",
13+
"tools": [
14+
{
15+
"name": "simple_wrapper",
16+
"description": "Simple wrapper function that depends on base_pkg_1"
17+
}
18+
],
19+
"hatch_dependencies": [
20+
{
21+
"name": "base_pkg_1",
22+
"version_constraint": ">=1.0.0",
23+
"type": "remote"
24+
}
25+
],
26+
"python_dependencies": [],
27+
"citations": {
28+
"origin": "Simple dependency package for testing",
29+
"mcp": "Simple dependency package MCP implementation"
30+
}
31+
}

simple_dep_pkg/server.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from mcp_utils.hatch_mcp import HatchMCP
2+
3+
# Initialize MCP server with metadata
4+
hatch_mcp = HatchMCP("simple_dep_pkg",
5+
origin_citation="Simple dependency package for testing",
6+
mcp_citation="Simple dependency package MCP implementation")
7+
8+
@hatch_mcp.server.tool()
9+
def simple_wrapper(param: str) -> str:
10+
"""Simple wrapper function that depends on base_pkg_1.
11+
12+
Args:
13+
param: Input parameter
14+
15+
Returns:
16+
str: Processed result
17+
"""
18+
hatch_mcp.logger.info(f"Simple wrapper called with param: {param}")
19+
# In a real implementation, this would call functions from base_pkg_1
20+
return f"Simple dependency package processed: {param} (depends on base_pkg_1)"
21+
22+
if __name__ == "__main__":
23+
hatch_mcp.logger.info("Starting MCP server")
24+
hatch_mcp.server.run()

0 commit comments

Comments
 (0)