gen-ai-starter
by jbsoftware-io·★ 3·综合分 36
生成式AI入门项目,集成MCP协议,可将REST API转换为标准化工具。
概述
这是一个全面的生成式AI入门工具包,集成了多个开源工具和模型,包括Ollama、Open WebUI、LangChain、Streamlit、Chroma和PGVector。它使用Docker和Docker Compose对应用进行容器化。该项目特别支持模型上下文协议(MCP)服务器,能够从OpenAPI规范实现标准化工具加载。项目包含从PokéAPI OpenAPI规范生成的完整MCP服务器,展示了如何将REST API转换为标准化MCP工具并独立部署。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
选择此项目作为学习如何将 REST API 转换为 MCP 工具的资源,或当您需要可运行的 MCP 服务器实现示例时。
什么时候不要选它
不适用于生产环境,因为这主要是一个入门项目,只有一个 API 示例(PokéAPI),而不是全面的 MCP 服务器框架。
此 server 暴露的工具
从 README 抽取出 8 个工具pokemon_mcpQuery PokéAPI to get information about Pokémon
ollama_list_modelsList available Ollama models
create_github_issueCreate a new GitHub issue
search_braveSearch the web using Brave Search API
explain_codeExplain a specific file or code pattern
guide_learningGet structured guidance through learning topics
create_learning_pathCreate personalized learning progressions
implement_featureGet help implementing new features
说明:Tools were inferred from documentation examples and usage patterns rather than explicit MCP tool listings. The actual MCP tools are likely generated from OpenAPI specifications as mentioned in the README.
可对比工具
安装
安装
- 先决条件:
- Docker引擎(>=12GB内存或>=8GB并安装Ollama可执行文件) - 可选:用于网页搜索示例的Brave Search API密钥
- CPU快速启动:
``bash docker compose --profile=cpu up -d ``
- 访问应用:
- Streamlit应用:http://localhost:8501/ - Open WebUI:http://localhost:3000/
- 生成MCP服务器:
``bash npm install -g openapi-mcp-generator openapi-mcp-generator --input path/to/openapi.json --output my-mcp-server --transport streamable-http ``
FAQ
- 该项目中的MCP服务器有什么用途?
- MCP服务器能够从OpenAPI规范实现标准化工具加载,使开发人员可以将REST API转换为MCP工具,供AI代理使用。
- 如何为我的 own API 创建MCP服务器?
- 您可以使用openapi-mcp-generator CLI工具。通过'npm install -g openapi-mcp-generator'安装,然后使用'openapi-mcp-generator --input your-openapi.json --output your-mcp-server'生成您的服务器。
gen-ai-starter 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。