Cover image
Try Now
2025-04-14

MCP服务器示例:使用纯MCP Java SDK构建 - 无需弹簧框架

3 years

Works with Finder

8

Github Watches

1

Github Forks

8

Github Stars

MCP Server Examples

Built using pure MCP Java SDK – No Spring Framework Required.

For another easier way to develop your own MCP server, you can explore this Annotation-driven MCP Java SDK.

Requirements

  • Java 17 or later (Restricted by MCP Java SDK)

What is MCP?

The Model Context Protocol (MCP) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:

  • Expose data through Resources (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
  • Provide functionality through Tools (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
  • Define interaction patterns through Prompts (reusable templates for LLM interactions)
  • And more!

You can start exploring everything about MCP from here.

Examples

If you are looking for servers implemented with Typescript MCP SDK or Python MCP SDK, see here.

These servers aim to demonstrate MCP features and the MCP Java SDK.

  • Chat2MySQL - Use AI agent that supports multi-language to chat with your MySQL database
  • Filesystem - Secure file operations with configurable access controls

相关推荐

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • sigoden
  • 使用普通的bash/javascript/python函数轻松创建LLM工具和代理。

  • RockChinQ
  • 😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack

  • modelscope
  • 开始以更轻松的方式开始构建具有LLM授权的多代理应用程序。

  • dmayboroda
  • 带有可配置容器的本地对话抹布

    Reviews

    3.8 (4)
    Avatar
    user_3tc3xiIz
    2025-04-25

    I'm truly impressed with the mcp-java-sdk-examples created by codeboyzhou. It's an excellent resource for those looking to get a solid grasp on using MCP with Java. The examples are clear, well-documented, and incredibly helpful for both beginners and experienced developers. This SDK has significantly streamlined my development process, and I highly recommend it to anyone working in a Java environment.

    Avatar
    user_K9Ql5sN8
    2025-04-25

    As a dedicated user of the mcp-java-sdk-examples by codeboyzhou, I must say it has been an invaluable resource for my Java development projects. The examples provided are clear, comprehensive, and easy to follow, making the integration process smooth and efficient. Highly recommend for anyone working with MCP!

    Avatar
    user_UmJjPjaw
    2025-04-25

    I'm highly impressed with mcp-java-sdk-examples by codeboyzhou. The examples provided are comprehensive and well-documented, making it extremely easy to understand and implement. The code is clean and the instructions are clear, which significantly enhances the learning experience. As a developer, this resource has become indispensable for my projects involving MCP applications. Highly recommended!

    Avatar
    user_l8zF2hwv
    2025-04-25

    I've been using the mcp-java-sdk-examples from codeboyzhou and it has significantly streamlined my development process. The comprehensive examples and clear documentation make it easy to integrate and utilize the SDK. Highly recommend it for anyone working with Java and MCP services!