Skip to main content
Glama

Zhihu MCP Server

by chemany
simple_test.py1 kB
# simple_test.py import logging from zhihu_mcp_server.auth import ZhihuAuth # 确保路径正确 from zhihu_mcp_server.utils import setup_logging # 假设你有这个 if __name__ == "__main__": setup_logging() # 初始化日志 logger = logging.getLogger(__name__) logger.info("开始简单测试...") try: auth_manager = ZhihuAuth(cookies_file_path="C:\\code\\zhihu_mcp_server\\zhihu_cookies.json") logger.info("AuthManager 初始化完毕,尝试检查登录状态...") is_logged_in = auth_manager.check_login_status() logger.info(f"检查登录状态完成,结果: {is_logged_in}") if auth_manager.driver: logger.info("浏览器已启动,5秒后关闭...") time.sleep(5) auth_manager.close_driver() else: logger.info("浏览器未能启动。") except Exception as e: logger.error(f"简单测试发生错误: {e}", exc_info=True) logger.info("简单测试结束。")

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chemany/zhihu_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server