MCPcopy
hub / github.com/modelcontextprotocol/python-sdk / cli

Function cli

src/mcp/client/__main__.py:65–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63
64
65def cli():
66 parser = argparse.ArgumentParser()
67 parser.add_argument("command_or_url", help="Command or URL to connect to")
68 parser.add_argument("args", nargs="*", help="Additional arguments")
69 parser.add_argument(
70 "-e",
71 "--env",
72 nargs=2,
73 action="append",
74 metavar=("KEY", "VALUE"),
75 help="Environment variables to set. Can be used multiple times.",
76 default=[],
77 )
78
79 args = parser.parse_args()
80 anyio.run(partial(main, args.command_or_url, args.args, args.env), backend="trio")
81
82
83if __name__ == "__main__":

Callers 1

__main__.pyFile · 0.70

Calls 1

runMethod · 0.45

Tested by

no test coverage detected