File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed
Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,14 @@ def csv(value):
1616 parser = argparse .ArgumentParser (
1717 description = "Planet MCP Server" ,
1818 )
19+ # when using fastmcp inspector and other tools, we handle
20+ # extra args here (or else the parser barfs)
1921 parser .add_argument ("args" , nargs = "*" )
2022 parser .add_argument ("--include-tags" , type = csv , default = None )
2123 parser .add_argument ("--exclude-tags" , type = csv , default = None )
2224 parser .add_argument ("--servers" , type = csv , default = None )
25+ # similar to extra args, inspector adds this
26+ parser .add_argument ("--no-banner" , action = "store_true" )
2327 return parser .parse_args ()
2428
2529
@@ -34,7 +38,7 @@ def csv(value):
3438# this is the entry point for the executable script installed via package
3539# and also supports execution via `uv run fastmcp run src/main.py`
3640def main ():
37- mcp .run (transport = "stdio" )
41+ mcp .run (transport = "stdio" , show_banner = not args . no_banner )
3842
3943
4044if __name__ == "__main__" :
Original file line number Diff line number Diff line change 1- from . import sdk_wrapper
1+ from . import sdk
22from . import tiles
33
44all = [
5- sdk_wrapper ,
5+ sdk ,
66 tiles ,
77]
Original file line number Diff line number Diff line change 2424
2525
2626def mcp () -> FastMCP :
27- mcp = FastMCP ("sdk_wrapper " )
27+ mcp = FastMCP ("sdk " )
2828 make_tools (mcp , planet .FeaturesClient , "features" )
2929 make_tools (mcp , planet .DataClient , "data" )
3030 make_tools (mcp , planet .OrdersClient , "orders" )
Original file line number Diff line number Diff line change @@ -18,6 +18,6 @@ async def test_search_tool():
1818 )
1919 async with client :
2020 result = await client .call_tool (
21- "sdk_wrapper_data_search " , {"item_types" : ["SkySatScene" ]}
21+ "sdk_data_search " , {"item_types" : ["SkySatScene" ]}
2222 )
2323 assert result .structured_content == {"result" : [{"type" : "Feature" }]}
You can’t perform that action at this time.
0 commit comments