mcpField
S
spring-ai-alibaba-examples

spring-ai-alibaba-examples

Local
github.com/springaialibabaDeveloper Tools2.9kUpdated 17w ago

About spring-ai-alibaba-examples

A collection of Spring AI and Spring AI Alibaba example modules, aimed at developers learning how to build AI applications with these frameworks. It ranges from basic chat to MCP, RAG, image generation, and tool-calling demos.

Key features

  1. 01Examples from basic to advanced usage
  2. 02Chat and image-generation demos
  3. 03MCP and RAG examples
  4. 04Tool-calling examples
  5. 05Quickstart commands and configuration references

Use cases

  1. 01Explore Spring AI chat integrations
  2. 02Run image-generation examples
  3. 03Study MCP or RAG demos
  4. 04Learn tool-calling patterns

MCP support

Includes an MCP demo module for clients to explore MCP usage; the README does not specify what it exposes to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Spring AI Alibaba Examples

Spring AI Alibaba Repo: https://github.com/alibaba/spring-ai-alibaba

Spring AI Alibaba Website: https://java2ai.com

Spring AI Alibaba Website Repo: https://github.com/springaialibaba/spring-ai-alibaba-website

English | 中文

介绍

此仓库中包含许多 Example 模块项目来介绍 Spring AI 和 Spring AI Alibaba 从基础到高级的各种用法和 AI 项目的最佳实践。

更详细的介绍请参阅每个子项目中的 README.md 和 Spring AI Alibaba 官网。

参与建设

欢迎任何形式的代码贡献。

Quickstart Matrix (Community Contribution)

modulepurposecommandrequired servicesenv varsenv templateentry
spring-ai-alibaba-helloworldbasic chat and advisor examplesmvn -pl spring-ai-alibaba-helloworld spring-boot:runnoneAI_DASHSCOPE_API_KEY—README
spring-ai-alibaba-chat-example/dashscope-chatDashScope chat basicsmvn -pl spring-ai-alibaba-chat-example/dashscope-chat spring-boot:runnoneAI_DASHSCOPE_API_KEY—README
spring-ai-alibaba-image-example/dashscope-imageDashScope image generationmvn -pl spring-ai-alibaba-image-example/dashscope-image spring-boot:runnoneAI_DASHSCOPE_API_KEY—README
spring-ai-alibaba-mcp-exampleMCP demomvn -pl spring-ai-alibaba-mcp-example spring-boot:runnone/local mcp toolmodel api key.env.exampleREADME
spring-ai-alibaba-rag-exampleRAG demomvn -pl spring-ai-alibaba-rag-example spring-boot:runvector db (optional by profile)model api key, embedding model.env.exampleREADME
spring-ai-alibaba-tool-calling-exampletool callingmvn -pl spring-ai-alibaba-tool-calling-example spring-boot:runnonemodel api key, map api key.env.exampleREADME

常用配置键速查

配置键常见模块说明
AI_DASHSCOPE_API_KEYspring-ai-alibaba-helloworld、DashScope chat/image、tool calling、evaluation、很多 graph/rag 示例DashScope 兼容模型最常见的 API Key
OPENAI_API_KEYspring-ai-alibaba-chat-example/openai-chat、spring-ai-alibaba-chat-example/vllm-chatOpenAI 兼容接口示例常用
AI_OPENAI_API_KEYspring-ai-alibaba-image-example/openai-imageOpenAI 图片生成示例使用
AI_DEEPSEEK_API_KEYspring-ai-alibaba-chat-example/deepseek-chat、spring-ai-alibaba-mem0-exampleDeepSeek 相关示例使用
MINIMAX_API_KEYspring-ai-alibaba-chat-example/minimax-chatMiniMax 模型示例使用
ZHIPUAI_API_KEYspring-ai-alibaba-chat-example/zhipuai-chat智谱模型示例使用
BAIDU_MAP_API_KEYspring-ai-alibaba-tool-calling-example地图工具调用示例需要

常见启动问题 / Troubleshooting

  • AI_DASHSCOPE_API_KEY 未设置 / Missing AI_DASHSCOPE_API_KEY: 先确认环境变量已在当前 shell 或 IDE 中生效,再重新启动示例。
  • 端口被占用 / Port already in use: 检查对应模块 application.yml 中的 server.port,释放端口或改端口后重试。
  • 本地依赖未启动 / Required local services not running: RAG、MCP、向量库或 Docker 相关示例通常需要先启动对应的中间件或容器。
  • 模块里暂时没有 .env.example / No .env.example in a module yet: 优先查看该模块 README 和 src/main/resources/application.yml,确认真实的变量名和依赖服务。

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.