Skip to content

Commit 97f1d4b

Browse files
LittleCoinCoinLittleCoinCoin
authored andcommitted
[Test] Add base_pkg_1 (#4)
1 parent bee8218 commit 97f1d4b

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

base_pkg_1/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# base_pkg_1
2+
3+
Base package with no dependencies
4+
5+
## Tools
6+
7+
- **example_tool**: Example tool function

base_pkg_1/__init__.py

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

base_pkg_1/hatch_metadata.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "base_pkg_1",
3+
"version": "1.0.4",
4+
"description": "Base package with no dependencies for testing",
5+
"category": "testing",
6+
"tags": ["test", "base"],
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": "base_function",
16+
"description": "Basic function for testing"
17+
}
18+
],
19+
"hatch_dependencies": [],
20+
"python_dependencies": [],
21+
"citations": {
22+
"origin": "Base package 1 for testing with no dependencies",
23+
"mcp": "Base package 1 MCP implementation"
24+
}
25+
}

base_pkg_1/server.py

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

0 commit comments

Comments
 (0)