Skip to content

Commit 276863a

Browse files
author
LittleCoinCoin
committed
[Test] Add base_pkg_1
**Major**: - Re-adding the base_pkg_1 for testing the package submission workflow
1 parent 2d5eee0 commit 276863a

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"package_schema_version": "1.1.0",
3+
"name": "base_pkg_1",
4+
"version": "1.0.0",
5+
"description": "Base package with no dependencies for testing",
6+
"tags": ["test", "base"],
7+
"author": {
8+
"name": "Test User",
9+
"email": "test@example.com"
10+
},
11+
"license": {
12+
"name": "MIT"
13+
},
14+
"entry_point": "server.py",
15+
"tools": [
16+
{
17+
"name": "base_function",
18+
"description": "Basic function for testing"
19+
}
20+
],
21+
"hatch_dependencies": [],
22+
"python_dependencies": [],
23+
"citations": {
24+
"origin": "Base package 1 for testing with no dependencies",
25+
"mcp": "Base package 1 MCP implementation"
26+
}
27+
}

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)