mcpField
O
OpenLigaDbLlm

OpenLigaDbLlm

Local
github.com/FelixDamrauGames & Entertainment0Updated 78w ago

About OpenLigaDbLlm

OpenLigaDbLlm is a .NET example project with an MCP server for the OpenLigaDb API and a chat client, intended to demonstrate MCP tool use. It also includes a Docker Compose monitoring stack with OpenTelemetry Collector, Loki, and Grafana.

Key features

  1. 01Includes a .NET MCP server and chat client
  2. 02Queries OpenLigaDb through tools
  3. 03Gets available and filtered leagues
  4. 04Gets teams for a league and season
  5. 05Includes OpenTelemetry monitoring configuration

Use cases

  1. 01Demonstrate a chat client connecting to an MCP server
  2. 02Retrieve available or matching leagues
  3. 03Look up teams for a league season
  4. 04View monitoring data with Loki and Grafana

MCP support

The MCP server exposes tools for querying OpenLigaDb, including league and team lookups. The included ChatWithTools client connects to the server, discovers tools, and invokes them.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

OpenLigaDbLlm

This project demonstrates the integration of a .NET ChatClient with an MCP (Model Context Protocol) Server that provides tools to interact with the OpenLigaDb API. The project includes a ChatClient, an MCP Server, and uses Docker Compose for setting up a monitoring stack (OpenTelemetry Collector, Loki, and Grafana).

Project Structure

  • src/ChatWithTools: Contains the .NET ChatClient application.
  • src/McpServer: Contains the .NET MCP Server application with OpenLigaDb tools.
  • docker-compose.yml: Defines the services for running the OpenTelemetry Collector, Loki, and Grafana using Docker.
  • otel-collector-config.yaml: Configuration for the OpenTelemetry Collector.

Prerequisites

  • Docker and Docker Compose installed.
  • .NET SDK (required to run the C# projects).

Getting Started

This project involves running the C# applications and a monitoring stack using Docker Compose.

  1. Clone the repository:

    git clone https://github.com/FelixDamrau/OpenLigaDbLlm.git
    cd OpenLigaDbLlm
    
  2. Start the monitoring stack with Docker Compose:

    docker-compose up -d
    

    This command will start the OpenTelemetry Collector, Loki, and Grafana containers in detached mode.

  3. Run the .NET projects:

    Before running the applications, ensure you have the following environment variables set:

    • HELICONE_API_KEY: Your Helicone API key. This is used for monitoring and logging API calls via Helicone.
    • OPENROUTER_API_KEY: Your OpenRouter API key. This is used for authenticating with the OpenRouter API.

    Navigate to the respective project directories and run the applications using the .NET CLI:

    cd src/McpServer
    dotnet run
    
    # In a new terminal:
    cd src/ChatWithTools
    dotnet run
    

    Ensure the McpServer is running before starting the ChatClient.

MCP Server

The McpServer project implements an MCP server that exposes tools for interacting with the OpenLigaDb API. These tools can be used by an MCP-compatible client (like the included ChatClient) to retrieve data from OpenLigaDb.

MCP Server Tools

The MCP server exposes the following tools:

  • getAvailableLeagues: Gets all available leagues
  • getFilteredLeagues: Gets all available leagues that match the given filter
  • getAllTeams: Gets all teams for the given league in the given season
  • echo: Echoes the given message. This tool is mainly for debugging purposes.

ChatClient

The ChatWithTools project is a .NET console application that acts as a client to the MCP Server. It demonstrates how to connect to an MCP server, discover available tools, and use them to perform actions (in this case, interacting with the OpenLigaDb API).

Ensure you have set the HELICONE_API_KEY and OPENROUTER_API_KEY environment variables before running the ChatClient.

To use the MCP tools via the ChatClient, you will interact with the running ChatWithTools console application. The specific commands or interface will depend on the implementation within the ChatWithTools project. Refer to the ChatClient's output or documentation (if any) for details on how to interact with it and utilize the MCP tools.

Monitoring (OpenTelemetry)

The project includes a Docker Compose setup for a monitoring stack using OpenTelemetry:

  • OpenTelemetry Collector: Collects telemetry data from the applications.
  • Loki: A log aggregation system.
  • Grafana: A data visualization and dashboarding tool.

You can access Grafana at http://localhost:3000 after starting the Docker containers.

Monitoring (Helicone)

The project also supports monitoring and logging API calls via Helicone. To enable this, ensure you have set the HELICONE_API_KEY environment variable.

Links

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.