本服务器基于 FastAPI 构建,借助标准 API 提供抵押贷款文档解析与比较工具。它能够轻松与各类人工智能框架(如 CrewAI、AutoGen 和 LangChain)集成。当前已实现一个简单的“你好”工具作为概念验证,后续版本将推出抵押贷款文档解析功能。
git clone https://github.com/confersolutions/mcp-mortgage-server.git
cd mcp-mortgage-server
git clone https://github.com/yourusername/mcp-server.git
cd mcp-server
python -m venv venv
source venv/bin/activate # 在 Windows 上使用 `venv\Scripts\activate`
pip install -r requirements.txt
编辑 .env 文件:
API_KEY=your_api_key_here
RATE_LIMIT_PER_MINUTE=120
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8000
uvicorn main:app --reload
请求:GET /health
响应:{ "status": "ok" }
请求:GET /hello/{name}
路径参数:`name` (字符串)
示例响应:"Hello, World!"
在 main.py 中添加:
from crewai import Crew
crew = Crew("your_api_key")
@app.get("/generate")
async def generate(context: str):
return await crew.generate(context)
在 main.py 中添加:
from autogen import Agent
agent = Agent()
@app.get("/analyze")
async def analyze(text: str):
return agent.analyze(text)
这是一个测试版(v0.1.0),具备以下功能:
即将推出的版本将包含抵押贷款文档解析和比较工具。
服务器使用 slowapi 实现速率限制,默认设置为每分钟 120 次请求/每 IP。可以通过 RATE_LIMIT_PER_MINUTE 环境变量进行配置。
/healthALLOWED_ORIGINS 环境变量设置)欢迎提出问题或提交代码改进。
该项目由 Confer Solutions 维护。如需帮助或支持,请联系 info@confersolutions.ai。
本项目采用 MIT 许可证,详见 LICENSE 文件获取详细信息。