MCPcopy Index your code
hub / github.com/HKUDS/DeepCode / main

Function main

tools/bocha_search_server.py:198–215  ·  view source on GitHub ↗

Initialize and run the MCP server.

()

Source from the content-addressed store, hash-verified

196
197
198def main():
199 """Initialize and run the MCP server."""
200
201 # Check for required environment variables
202 if "BOCHA_API_KEY" not in os.environ:
203 print(
204 "Error: BOCHA_API_KEY environment variable is required",
205 file=sys.stderr,
206 )
207 print(
208 "Get a Bocha API key from: " "https://open.bochaai.com",
209 file=sys.stderr,
210 )
211 sys.exit(1)
212
213 print("Starting Bocha Search MCP server...", file=sys.stderr)
214
215 server.run(transport="stdio")
216
217
218if __name__ == "__main__":

Callers 1

Calls 1

runMethod · 0.80

Tested by

no test coverage detected