SK

sebastianaigner/kotlin-mcp-hue-light-sample

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

20 stars 4 forks 质量 21 趋势 10

本仓库包含本YouTube视频的补充代码。

概览

本仓库包含本YouTube视频的补充代码。 模型上下文协议Kotlin SDK(https://github.com/modelcontextprotocol/kotlin-sdk))让你轻松构建像Claude Desktop这样的大型语言模型客户端与你自己的应用(无论是软件还是硬件)之间的集成!让我们看看实际操作:加入Sebastian Aigner,一起构建Hue Smart Lights和Claude Desktop的集成,完全由Kotlin驱动。我们一步步定义接口,将Ktor工作中较机械的任务委托给Junie,然后使用Kotlin官方SDK实现了MCP的基础版本。我们使用MCP检查器来探索和调试应用程序,最终通过设置最终配置将Kotlin Gradle应用与Claude Desktop集成。最终,我们拥有了一个自给自足的MCP服务器,能够用自然语言控制智能灯具! Junie,JetBrains的编码代理:https://www.jetbrains.

概述(AI 翻译)

This仓库包含了该YouTube频道的补充代码video.

模型上下文协议Kotlin SDK(https://github.com/modelcontextprotocol/kotlin-sdk))让你轻松构建像Claude Desktop这样的大型语言模型客户端与你自己的应用(无论是软件还是硬件)之间的集成!让我们看看实际操作:加入Sebastian Aigner,一起构建Hue Smart Lights和Claude Desktop的集成,完全由Kotlin驱动。我们一步步定义接口,将Ktor工作中较机械的任务委托给Junie,然后使用Kotlin官方SDK实现了MCP的基础版本。我们使用MCP检查器来探索和调试应用程序,最终通过设置最终配置将Kotlin Gradle应用与Claude Desktop集成。最终,我们拥有了一个自给自足的MCP服务器,能够用自然语言控制智能灯具!

Junie,JetBrains的编码代理:https://www.jetbrains.com/junie/

JetBrains IDE 的 MCP 服务器插件:https://plugins.jetbrains.com/plugin/26071-mcp-server

MCP检查员:https://github.com/modelcontextprotocol/inspector

如何跑步

本页由 AI 翻译,技术细节请以原文为准。

README

🎥 Building MCP with Kotlin: Claude Desktop Controls my Smart Home Lights!

This repo contains supplemental code for this YouTube video.

The Model Context Protocol Kotlin SDK (https://github.com/modelcontextprotocol/kotlin-sdk) makes it easy for you to build integrations between LLM clients like Claude Desktop and your own applications, whether that’s software or hardware! Let’s see it in practice: Join Sebastian Aigner building an integration between Hue Smart Lights and Claude Desktop, powered entirely by Kotlin. We walk through defining our interfaces, delegating some of the more mechanical tasks when working with Ktor to Junie, and then implement a basic version of an MCP using the official SDK for Kotlin. We use the MCP inspector to explore and debug our application, and finally integrate the Kotlin Gradle application with Claude Desktop by setting up the final configuration. In the end, we have a self-sufficient MCP server that can control smart lights with natural language!

Junie, the coding agent by JetBrains: https://www.jetbrains.com/junie/

MCP Server Plugin for JetBrains IDEs: https://plugins.jetbrains.com/plugin/26071-mcp-server

MCP inspector: https://github.com/modelcontextprotocol/inspector

How to run

Run the installDist Gradle task, and point your MCP client to the generated startup script in build/install/huelight-mcp/bin.

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →