Skip to main content
Glama

mcp-server-llmling

MIT License
5
  • Linux
  • Apple

mcp-服务器-llmling

PyPI 许可证 包裹状态 每日下载量 每周下载量 每月下载量 分发格式 车轮可用性 Python 版本 执行 发布 Github贡献者 Github 讨论 Github Forks Github 问题 Github 问题 Github 观察者 Github 星标 Github 仓库大小 Github 上次提交 Github发布日期 Github 语言数量 Github 本周提交 Github 本月提交 Github 今年提交的内容 包裹状态 代码样式:黑色 PyUp

阅读文档!

LLMling 服务器手册

概述

mcp-server-llmling 是机器聊天协议 (MCP) 的服务器,它为 LLM 应用程序提供基于 YAML 的配置系统。

LLMLing后端为 LLM 应用程序提供了基于 YAML 的配置系统。它允许设置自定义 MCP 服务器,以提供 YAML 文件中定义的内容。

  • 静态声明:在 YAML 中定义 LLM 的环境 - 无需代码

  • MCP 协议:基于机器聊天协议 (MCP) 构建,用于标准化 LLM 交互

  • 组件类型

    • 资源:内容提供商(文件、文本、CLI 输出等)

    • 提示:带有参数的消息模板

    • 工具:LLM 可调用的 Python 函数

YAML 配置创建了一个完整的环境,为 LLM 提供:

  • 通过资源访问内容

  • 结构化提示,实现一致的互动

  • 扩展功能的工具

主要特点

1.资源管理

  • 加载和管理不同类型的资源:

    • 文本文件( PathResource

    • 原始文本内容( TextResource

    • CLI 命令输出( CLIResource

    • Python 源代码( SourceResource

    • Python 可调用结果( CallableResource

    • 图像( ImageResource

  • 支持资源监视/热重载

  • 资源处理管道

  • 基于URI的资源访问

2.工具系统

  • 将 Python 函数注册并执行为 LLM 工具

  • 支持基于 OpenAPI 的工具

  • 基于入口点的工具发现

  • 工具验证和参数检查

  • 结构化工具响应

3. 及时管理

  • 带有模板支持的静态提示

  • Python 函数的动态提示

  • 基于文件的提示

  • 提示参数验证

  • 提示论点的完成建议

4. 多种交通选择

  • 基于 Stdio 的通信(默认)

  • 面向 Web 客户端的服务器发送事件 (SSE) / 可流式传输的 HTTP

  • 支持自定义传输实现

用法

使用 Zed 编辑器

在您的settings.json中添加 LLMLing 作为上下文服务器:

{ "context_servers": { "llmling": { "command": { "env": {}, "label": "llmling", "path": "uvx", "args": [ "mcp-server-llmling", "start", "path/to/your/config.yml" ] }, "settings": {} } } }

使用 Claude Desktop

claude_desktop_config.json中配置 LLMLing:

{ "mcpServers": { "llmling": { "command": "uvx", "args": [ "mcp-server-llmling", "start", "path/to/your/config.yml" ], "env": {} } } }

手动启动服务器

直接从命令行启动服务器:

# Latest version uvx mcp-server-llmling@latest

1. 程序化使用

from llmling import RuntimeConfig from mcp_server_llmling import LLMLingServer async def main() -> None: async with RuntimeConfig.open(config) as runtime: server = LLMLingServer(runtime, enable_injection=True) await server.start() asyncio.run(main())

2. 使用自定义传输

from llmling import RuntimeConfig from mcp_server_llmling import LLMLingServer async def main() -> None: async with RuntimeConfig.open(config) as runtime: server = LLMLingServer( config, transport="sse", transport_options={ "host": "localhost", "port": 3001, "cors_origins": ["http://localhost:3000"] } ) await server.start() asyncio.run(main())

3.资源配置

resources: python_code: type: path path: "./src/**/*.py" watch: enabled: true patterns: - "*.py" - "!**/__pycache__/**" api_docs: type: text content: | API Documentation ================ ...

4.工具配置

tools: analyze_code: import_path: "mymodule.tools.analyze_code" description: "Analyze Python code structure" toolsets: api: type: openapi spec: "https://api.example.com/openapi.json"

对于 OpenAPI 架构,您可以安装Redocly CLI来捆绑和解析 OpenAPI 规范,然后再将其用于 LLMLing。这有助于确保正确解析架构引用,并正确格式化规范。如果安装了 redocly,它将自动使用。

服务器配置

该服务器通过 YAML 文件进行配置,包含以下部分:

global_settings: timeout: 30 max_retries: 3 log_level: "INFO" requirements: [] pip_index_url: null extra_paths: [] resources: # Resource definitions... tools: # Tool definitions... toolsets: # Toolset definitions... prompts: # Prompt definitions...

MCP 协议

服务器实现了 MCP 协议,支持:

  1. 资源操作

    • 列出可用资源

    • 读取资源内容

    • 监视资源变化

  2. 工具操作

    • 列出可用的工具

    • 使用参数执行工具

    • 获取工具架构

  3. 快捷操作

    • 列出可用的提示

    • 获取格式化的提示

    • 获取提示参数的完成情况

  4. 通知

    • 资源变化

    • 工具/提示列表更新

    • 进度更新

    • 日志消息

-
security - not tested
-
license - not tested
-
quality - not tested

机器聊天协议 (MCP) 的服务器,为 LLM 应用程序提供基于 YAML 的配置系统,允许用户定义资源、工具和提示,而无需编写代码。

  1. LLMling 服务器手册
    1. 概述
    2. 主要特点
    3. 用法
    4. 服务器配置
    5. MCP 协议

Related MCP Servers

  • A
    security
    -
    license
    A
    quality
    An MCP server that enables LLMs to interact with Moodle platforms to manage courses, students, assignments, and quizzes through natural language commands.
    Last updated -
    7
    18
    MIT License
    • Apple
  • A
    security
    -
    license
    A
    quality
    A Model Context Protocol (MCP) server designed to easily dump your codebase context into Large Language Models (LLMs).
    Last updated -
    1
    24
    2
    Apache 2.0
  • A
    security
    -
    license
    A
    quality
    A ready-to-use starter implementation of the Model Context Protocol (MCP) server that enables applications to provide standardized context for LLMs with sample resources, tools, and prompts.
    Last updated -
    2
    1
  • -
    security
    -
    license
    -
    quality
    A comprehensive Model Context Protocol (MCP) server that provides 37+ intelligent development tools across JavaScript/TypeScript, Rust, and Python with security-first design and high-performance features.
    Last updated -
    11
    1

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/phil65/mcp-server-llmling'

If you have feedback or need assistance with the MCP directory API, please join our Discord server