LicenseGuard is designed to help you easily understand the software licenses of your project's dependencies.
Here's what it offers:
- Effortless License Checking: Simply provide your project's
requirements.txt, and LicenseGuard will analyze it for you. - Clear License Identification: The system identifies the software licenses associated with your dependencies.
- Understandable Reports: Get a straightforward JSON report detailing the licenses found, along with a confidence score.
- Simple Integration: You can interact with LicenseGuard through a user-friendly API to submit your dependency list and retrieve the analysis results.
LicenseGuard simplifies the process of checking software licenses, giving you a quick and clear picture of your project's licensing landscape.
This repository contains the source code for the MCP server, which is responsible for processing and analyzing the licenses of your project's dependencies.
- The MCP server relies on an existing REST-server to function. The REST-server is available in a separate repository (https://github.com/cassiama/LicenseGuard-API).
- You must ensure that the REST-server is running before starting the MCP server. The MCP server communicates with the REST-server to fetch and process data.
- For more details about the REST-server, refer to its repository: REST-server Repository.
- There is a sample Agent that includes an MCP-Client available in this repository: LicenseGuard-AI. You can use this sample agent to test the MCP server.
- Alternatively, you can use any off-the-shelf MCP-server tester to test the MCP server.
The fastest and easiest way to get this running on your machine is to use Docker.
In short:
- Have Docker Desktop/Engine installed on your local machine.
- Ensure the REST-server is running and accessible.
- Set the required environment variables for calling the backend API server's URL.
Make sure you have Docker Desktop (or Docker Engine) installed on your machine. If you don't, download it from Docker's website.
You will need to provide the following, otherwise the server will fail to run and you will see errors:
BACKEND_URL_HOST: Refers to the host that your backend REST API server is running on. Your host should be an HTTP/HTTPS domain (e.g.,http://localhost).BACKEND_URL_PORT: Refers to the port that your REST-server is running on. Your port should be a number from 0 to 65535 (16-bit number) that doesn't conflict with a port already in use on the computer.
For the purposes of this guide, we're going to assume that you want to pull the image from Docker Hub. However, you can also download the image from the GitHub Container Registry (GHCR) instead if you'd like.
Run the following command to download the image from Docker Hub on your machine:
docker pull licenseguard/license-guard:mcp-latestNOTE: If you want a specific version, then pull the
licenseguard/license-guard:mcp-v{x.y.z}image instead (x.y.zrefers to the semantic versioning number).
NOTE: For those who prefer GHCR, replace any reference to
licenseguard/license-guardwithghcr.io/cassiama/license-guardfor any of the commands below, and you'll be good. 👍🏿
If you'd like to build the Docker image from the source code, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/your-repo/LicenseGuard-MCP.git cd LicenseGuard-MCP -
Build the Docker image:
docker build -t licenseguard/license-guard:mcp-latest .NOTE: Replace
mcp-latestwith a specific version tag (e.g.,mcp-v1.0.0) if needed. -
Run the Docker image:
- With
.envfile:docker run -p 8000:8000 --env-file .env licenseguard/license-guard:mcp-latest
- With environment variables:
docker run -p 8000:8000 -e BACKEND_URL_HOST=http://localhost -e BACKEND_URL_PORT=80 licenseguard/license-guard:mcp-latest
- With
Once you get the server running, you can access all of the MCP-related resources at http://localhost:8000/mcp.
To run the MCP server, follow these steps:
-
Start the REST-server:
- Clone the REST-server repository and follow its setup instructions.
- Ensure the REST-server is running and accessible at the host and port specified in the
BACKEND_URL_HOSTandBACKEND_URL_PORTenvironment variables.
-
Run the MCP server:
- Use the Docker image or build it locally as described above.
- Ensure the environment variables point to the running REST-server.
Once both servers are running, you can access all MCP-related resources at http://localhost:8000/mcp.
You can test the MCP server using one of the following methods:
-
Using the Sample Agent:
- A sample agent with an MCP-Client is available in the LicenseGuard-AI repository.
- Clone the repository and follow the instructions to set up and run the agent.
- The agent will interact with the MCP server and provide test results.
-
Using an Off-the-Shelf MCP-Server Tester:
- You can use any standard MCP-server testing tool to verify the functionality of the MCP server.
- Ensure the tester is configured to communicate with the MCP server at the correct host and port.