UL

ufownl/lua-resty-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

27 stars 5 forks 품질 54 트렌드 11BSD-3-Clause

Model Context Protocol SDK implemented in Lua for OpenResty

개요

- [x] Transports - [x] stdio - [x] Streamable HTTP - [x] WebSocket (non-specification) - [x] Protocols - [x] Lifecycle - [x] Prompts - [x] Resources - [x] Tools - [x] Roots - [x] Sampling - [x] Elicitation - [x] Utilities - [x] Pagination - [x] Progress - [x] Cancellation - [x] Completion - [x] Logging - [x] Ping A simple server demonstrating prompts, resources, tools: syntax: server, err = mcp.server(transport[, options]) Create an MCP server session with the specific transport (currently only mcp.transport.stdio is available here) and options. A successful call returns an MCP server session. Otherwise, it returns nil and a string describing the error. * mcp.transport.stdio * mcp.transport.websocket 1. The optional field title is intended for UI and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar with domain-specific terminology. If not provided, the name should be used for display; 2.

README

원문 README의 일부입니다. 원문 보기.

lua-resty-mcp

Model Context Protocol (MCP) SDK implemented in Lua for OpenResty.

Status

Production ready.

Table of Contents

Features

  • [x] Transports
    • [x] stdio
    • [x] Streamable HTTP
    • [x] WebSocket (non-specification)
  • [x] Protocols
    • [x] Lifecycle
    • [x] Prompts
    • [x] Resources
    • [x] Tools
    • [x] Roots
    • [x] Sampling
    • [x] Elicitation
    • [x] Utilities
      • [x] Pagination
      • [x] Progress
      • [x] Cancellation
      • [x] Completion
      • [x] Logging
      • [x] Ping

Quickstart

A simple server demonstrating prompts, resources, tools:

-- Import lua-resty-mcp module
local mcp = require("resty.mcp")

-- Create an MCP server session with stdio transport
local server = assert(mcp.server(mcp.transport.stdio, {}))

-- Register a prompt
assert(server:register(mcp.prompt("echo", function(args)
  return "Please process this message: "..args.message
end, {
  description = "Create an echo prompt",
  arguments = {
    message = {required = true}
  }
})))

-- Register a resource template
GitHub에서 전체 README 보기

설치

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

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →