# mcp_aes **Repository Path**: hzhlu/mcp_aes ## Basic Information - **Project Name**: mcp_aes - **Description**: 学习mcp,功能:对整数进行AES加密,验证:通过workbuddy连接 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-17 - **Last Updated**: 2026-06-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 创建步骤 ------------------- ~~~ mcp-hello/ ├── app.py # FastAPI 主应用 ├── mcp_server.py # MCP 服务器实现 ├── crypto_utils.py # AES 加密工具 ├── requirements.txt # 依赖 └── mcp_config.json # MCP 客户端配置示例 ~~~ ## 安装依赖 ~~~ pip install -r requirements.txt pip install aiohttp fastapi uvicorn pydantic cryptography python-multipart ~~~ ## 启动服务 ~~~ python app.py ~~~ ## 测试 ~~~ # 健康检查 curl http://localhost:8000/ # 加密整数 curl -X POST http://localhost:8000/encrypt \ -H "Content-Type: application/json" \ -d '{"number": 12345, "note": "测试数据"}' # 解密 curl -X POST http://localhost:8000/decrypt \ -H "Content-Type: application/json" \ -d '{"ciphertext": "xxx", "iv": "yyy"}' ~~~ ## workbuddy 连接 - 启动app.py服务 - 在workbuddy中配置mcp ~~~json { "mcpServers": { "aes-helloworld": { "command": "python", "args": [ "C:/my/workspace/python/myMCP1/mcp_server.py" ], "disabled": false } } } ~~~ - 调用:aes-helloworld , 在workbuddy的指令对话框中输入:`请使用 AES 加密工具,将数字 12345 加密` ![ScreenShot_2026-06-17_170127_925.png](docImages/workBuddy-001.png) ## 调测MCP 在命令行中运行下面指令,将启动一个web调测页面 ~~~ npx @modelcontextprotocol/inspector python mcp_server.py ~~~ ![img.png](docImages/inspector-001.png)