LLMling

by phil65

19 315 downloads Not rated yet MIT
GitHub

About

Easy MCP (Model Context Protocol) servers and AI agents, defined as YAML.

Details

License
MIT

Explore

- Declarative YAML-based configuration for LLM applications
- Built on the Model Context Protocol (MCP)
- Supports Resources, Prompts, and Tools as component types
- 100% typed Python with pydantic(-ai) foundation
- File watching with .gitignore-style patterns
- Resource processing pipeline through custom processors

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name LLMling
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

tools:

Create a basic configuration file:


llmling config init my_config.yml

llmling config add myconfig my_config.yml
llmling config set myconfig # Make it active

Basic CLI commands:


Create a configuration file (config.yml):
yaml
tools:
open_url:
import_path: "webbrowser.open"

resources:
bookmarks:
type: text
description: "Common Python URLs"
content: |
Python Website: https://python.org


Use the agent with this configuration:
python
from llmling import RuntimeConfig
from llmling_agent import LLMlingAgent
from pydantic import BaseModel

class WebResult(BaseModel):
opened_url: str
success: bool

async with RuntimeConfig.open("config.yml") as runtime:
agent = LLMlingAgentWebResult
result = await agent.run(
"Load the bookmarks resource and open the Python website URL"
)
print(f"Opened: {result.data.opened_url}")


The agent will:
1. Load the bookmarks resource
2. Extract the Python website URL
3. Use the open_url tool to open it
4. Return the structured result

yaml
tools:

Tools are Python functions or classes that can be called by the LLM. They provide a safe way to extend the LLM's capabilities with custom functionality.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

McpServers

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

PyPI License
Package status
Monthly downloads
Distribution format
Wheel availability
Python version
Implementation
Releases
Github Contributors
Github Discussions
Github Forks
Github Issues
Github Issues
Github Watchers
Github Stars
Github Repository size
Github last commit
Github release date
Github language count
Github commits this month
Package status
PyUp

A framework for declarative LLM application development focused on resource management, prompt templates, and tool execution.

This package provides the backend for two consumers: A MCP server and a pydantic-AI based Agent

Core Concepts

LLMLing provides a YAML-based configuration system for LLM applications.
It allows to set up custom MPC servers serving content defined in YAML files.

- Static Declaration: Define your LLM's environment in YAML - no code required
- MCP Protocol: Built on the Machine Chat Protocol (MCP) for standardized LLM interaction
- Component Types:
- Resources: Content providers (files, text, CLI output, etc.)
- Prompts: Message templates with arguments
- Tools: Python functions callable by the LLM

The YAML configuration creates a complete environment that provides the LLM with:
- Access to content via resources
- Structured prompts for consistent interaction
- Tools for extending capabilities

- Written from ground up in modern python (minimum 3.12 required)
- 100% typed
- pydantic(-ai) based

An overview about the whole system:

graph TB
    subgraph LLMling[LLMling Core Package]
        RT[RuntimeConfig]

subgraph Core_Components[Core Components]
Resources[Resource Management<br/>- Load files/URLs<br/>- Process content<br/>- Watch changes]
Tools[Tool System<br/>- Execute functions<br/>- Register new tools<br/>- OpenAPI integration]
Prompts[Prompt System<br/>- Static/Dynamic prompts<br/>- Template rendering<br/>- Completion support]
end

CLI[Core CLI<br/>- config add/remove/list<br/>- resource list/load<br/>- tool list/execute<br/>- prompt list/render]

Core_Components -->|YAML configuration| RT
RT -->|All components| CLI
CLI -->|modify| Core_Components
end

subgraph Direct_Access[mcp-server-llmling<br/>Direct Component Access]
MCP[HTTP/SSE Server<br/>- Start/Stop server]
MCP_CLI[Server CLI<br/>- Start/Stop server]
Injection[Injection Server<br/>- Inject components<br/>during runtime]
end

subgraph Function_Access[llmling-agent<br/>Access via Function Calling]
LLM[LLM Integration<br/>- Function calling<br/>- Resource access<br/>- Tool execution<br/>- Structured output]
Agent_CLI[Agent CLI<br/>- One-shot execution<br/>- Batch processing]
Agent_Web[Agent Web UI<br/>- Interactive chat]
end

RT -->|All components| MCP
RT -->|Resources & Tools<br/>via function calling| LLM
MCP_CLI --> CLI
Agent_CLI --> CLI

classDef core fill:#e1f5fe,stroke:#01579b
classDef comp fill:#e3f2fd,stroke:#1565c0
classDef cli fill:#fff3e0,stroke:#e65100
classDef mcp fill:#f3e5f5,stroke:#4a148c
classDef agent fill:#e8f5e9,stroke:#1b5e20
classDef access fill:#e8eaf6,stroke:#666
classDef serverBox fill:#7986cb,stroke:#3949ab
classDef agentBox fill:#81c784,stroke:#2e7d32

class RT core
class Resources,Tools,Prompts comp
class CLI,MCP_CLI,Agent_CLI cli
class MCP,Injection mcp
class LLM,Agent_Web agent
class Direct_Access serverBox
class Function_Access agentBox

Usage

1. CLI Usage

Create a basic configuration file:
```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.