Skip to main content

mcp-server-llmling

PyPI License Package status Monthly downloads Distribution format Wheel availability Python version Implementation Releases Github Contributors 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

Read the documentation!

mcp-server-llmling

Overview

mcp-server-llmling is a Model Context Protocol (MCP) server that serves resources, prompts and tools declared in an LLMling YAML configuration file. No code is needed to set up a custom MCP server.

Installation

pip install mcp-server-llmling
# or run it directly
uvx mcp-server-llmling start path/to/your/config.yml
  • Static Declaration: Define your LLM's environment in YAML - no code required
  • MCP Protocol: Built on the Model Context 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

Key Features

1. Resource Management

  • Load and manage different types of resources:
    • Text files (PathResource)
    • Raw text content (TextResource)
    • CLI command output (CLIResource)
    • Python source code (SourceResource)
    • Python callable results (CallableResource)
    • Git repository content (RepositoryResource)
  • Support for resource watching/hot-reload
  • Resource processing pipelines
  • URI-based resource access

2. Tool System

  • Register and execute Python functions as LLM tools
  • Support for OpenAPI-based tools
  • Entry point-based tool discovery
  • Tool validation and parameter checking
  • Structured tool responses

3. Prompt Management

  • Static prompts with template support
  • Dynamic prompts from Python functions
  • File-based prompts
  • Prompt argument validation
  • Completion suggestions for prompt arguments

4. Multiple Transport Options

  • Stdio-based communication (default)
  • Streamable HTTP and Server-Sent Events (SSE) for web clients

5. Config injection and Zed mode

  • Optional HTTP/WebSocket API to add or update components of a running server (--enable-injection, mcp-server-llmling inject config.yml)
  • --zed-mode wraps multi-argument prompts for Zed editor compatibility

Usage

With Zed Editor

Add LLMLing as a context server in your settings.json:

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

With Claude Desktop

Configure LLMLing in your claude_desktop_config.json:

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

Manual Server Start

Start the server directly from command line:

# Latest version, stdio transport
uvx mcp-server-llmling@latest start path/to/your/config.yml

# Streamable HTTP on a custom port
uvx mcp-server-llmling start path/to/your/config.yml --transport streamable-http --port 3001

# Other commands
uvx mcp-server-llmling info
uvx mcp-server-llmling --help

1. Programmatic usage

import asyncio

from llmling import RuntimeConfig
from mcp_server_llmling import LLMLingServer


async def main() -> None:
    async with RuntimeConfig.open("config.yml") as runtime:
        server = LLMLingServer(runtime, enable_injection=True)
        await server.start()


asyncio.run(main())

2. Using Custom Transport

import asyncio

from llmling import RuntimeConfig
from mcp_server_llmling import LLMLingServer


async def main() -> None:
    async with RuntimeConfig.open("config.yml") as runtime:
        server = LLMLingServer(
            runtime,
            transport="streamable-http",
            # passed on to FastMCP.run_async()
            transport_options={"host": "localhost", "port": 3001},
        )
        await server.start()


asyncio.run(main())

3. Resource Configuration

resources:
  python_code:
    type: path
    path: "./src/**/*.py"
    watch:
      enabled: true
      patterns:
        - "*.py"
        - "!**/__pycache__/**"

  api_docs:
    type: text
    content: |
      API Documentation
      ================
      ...

4. Tool Configuration

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"

Server Configuration

The server is configured through a YAML file with the following sections:

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 Protocol

The server implements the MCP protocol which supports:

  1. Resource Operations

    • List available resources
    • Read resource content
    • Watch for resource changes
  2. Tool Operations

    • List available tools
    • Execute tools with parameters
    • Get tool schemas
  3. Prompt Operations

    • List available prompts
    • Get formatted prompts
    • Get completions for prompt arguments
  4. Notifications

    • Resource changes
    • Tool/prompt list updates
    • Progress updates
    • Log messages

Metadata

Release files for mcp-server-llmling 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-server-llmling 1.1.0
File Size Uploaded Provenance Actions
mcp_server_llmling-1.1.0.tar.gz 39.5 kB With provenance Details for mcp_server_llmling-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-server-llmling 1.1.0
File Interpreter ABI Platform Actions
mcp_server_llmling-1.1.0-py3-none-any.whl Python 3 none any Details for mcp_server_llmling-1.1.0-py3-none-any.whl

Total release size: 86.2 kB

Release files / mcp_server_llmling-1.1.0.tar.gz

Download URL mcp_server_llmling-1.1.0.tar.gz
Size 39.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f62610dc6ae2b18368d9eb33691860243155eed4ee8ea1c1c529f8dcdf35c53d
BLAKE2b-256 checksum
How to use checksums
acc4c0024d30a179ad40e282661fd95c63d28bc1995aeb8bf89f0c818e7a94ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / mcp_server_llmling-1.1.0-py3-none-any.whl

Download URL mcp_server_llmling-1.1.0-py3-none-any.whl
Size 46.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
274a1149630793ef2774a0e0acf4ccb1879109881e0f554930a62bf9dd69b42f
BLAKE2b-256 checksum
How to use checksums
945066ac1977860f23a2bb3d5b17b529efbfd959efa03aa18546e36cbf5bb919
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for mcp-server-llmling 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_server_llmling-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page