1. Conduid
  2. Developer Tools
  3. Yolink MCP
MCP server · Developer Tools

Yolink MCP

An MCP server for YoLink smart devices

Unclaimed MIT last commit a year ago smarthomemcpmcp-toolsmcp-serveryolinkdevtoolsaiiot
56Fair

Scored 5 months ago · breakdown

About Yolink MCP

Yolink MCP is an MCP server published by martydill in the Developer Tools category: an MCP server for YoLink smart devices.

The repository has 1 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/martydill/yolink-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Yolink MCP

Powered by Claude · Grounded in docs

I know everything about Yolink MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

3 checks have not been run yet.

README

YoLink MCP Server

Finally - the security of IOT devices combined with the security of MCP!

This is a Model Context Protocol (MCP) server for interacting with YoLink smart devices. This server allows you to enumerate devices and get status information from your YoLink account through the MCP protocol.

Features

  • Device Enumeration: List all devices in your YoLink account
  • Device Status: Get current status and state information for any device
  • MCP Protocol: Full compliance with MCP specification for seamless integration
  • Authentication: Secure OAuth2 authentication with YoLink API
  • Error Handling: Comprehensive error handling and logging

Prerequisites

  • Go 1.21 or later
  • YoLink account with API access
  • YoLink Client ID and Client Secret

Installation

  1. Clone this repository:
git clone <repository-url>
cd yolink-mcp
  1. Install dependencies:
go mod tidy
  1. Build the server:
go build -o yolink-mcp-server .

Configuration

Set the following environment variables with your YoLink API credentials:

export YOLINK_CLIENT_ID="your_client_id_here"
export YOLINK_CLIENT_SECRET="your_client_secret_here"

Getting YoLink API Credentials

  1. Visit the YoLink Developer Portal
  2. Create an account or sign in
  3. Create a new application to get your Client ID and Client Secret
  4. Make sure your application has the yolink:read scope

Usage

Running the Server

Start the MCP server:

./yolink-mcp-server

The server will listen for MCP requests on stdin and send responses to stdout.

Available Tools

1. enumerate_devices

Lists all YoLink devices in your account.

Parameters: None

Example MCP Request:

{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "tools/call",
  "params": {
    "name": "enumerate_devices",
    "arguments": {}
  }
}

2. get_device_status

Gets the current status of a specific YoLink device.

Parameters:

  • device_id (string): The ID of the device to get status for

Example MCP Request:

{
  "jsonrpc": "2.0",
  "id": "2",
  "method": "tools/call",
  "params": {
    "name": "get_device_status",
    "arguments": {
      "device_id": "your_device_id_here"
    }
  }
}

MCP Integration

This server implements the MCP protocol and can be integrated with any MCP-compatible client. The server supports:

  • initialize: Server initialization and capability advertisement
  • tools/list: List available tools
  • tools/call: Execute tool calls

Example Integration

You can integrate this server with MCP clients by configuring the client to use this server as a tool provider. The server communicates via stdin/stdout using JSON-RPC messages.

Project Structure

yolink-mcp/
├── main.go           # Main entry point and stdin/stdout handling
├── mcp_server.go     # MCP protocol implementation
├── yolink_client.go  # YoLink API client
├── types.go          # Data structures and type definitions
├── go.mod            # Go module file
└── README.md         # This file

Error Handling

The server includes comprehensive error handling for:

  • Authentication failures
  • Network connectivity issues
  • Invalid device IDs
  • API rate limiting
  • Malformed MCP requests

All errors are logged using structured logging and returned as proper MCP error responses.

Development

Building from Source

go build -o yolink-mcp-server .

Running Tests

go test ./...

Logging

The server uses structured logging with the following levels:

  • INFO: General operational information
  • ERROR: Error conditions and failures
  • DEBUG: Detailed debugging information (when enabled)

API Reference

YoLink API Endpoints Used

  • POST /oauth/token: Authentication
  • POST /openapi: Device operations (getDeviceList, getState)

Supported Device Types

This server works with all YoLink device types including:

  • Smart switches and outlets
  • Sensors (temperature, humidity, door/window, motion, etc.)
  • Smart locks
  • Garage door controllers
  • Water leak sensors
  • And more...

Troubleshooting

Common Issues

  1. Authentication Error: Verify your YOLINK_CLIENT_ID and YOLINK_CLIENT_SECRET are correct
  2. Network Issues: Check your internet connection and firewall settings
  3. Device Not Found: Ensure the device ID is correct and the device is online
  4. Permission Denied: Verify your YoLink application has the correct scopes

Debug Mode

Set log level to debug for verbose output:

export LOG_LEVEL=debug
./yolink-mcp-server

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • YoLink for providing the IoT device API The MCP protocol specification and community

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Yolink MCP

How do I install Yolink MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Yolink MCP safe to use with an AI agent?

Its trust score is 56 out of 100 (fair). It passes 2 of the 3 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Yolink MCP still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.