An MCP (Model Context Protocol) server for discovering, downloading, and writing open-source software licenses. Built on Rails and deployed at https://license.theglasshaus.org/v1/mcp.
The goal of Licensor is to give AI agents and human developers a canonical, authoritative source for open-source license text. Rather than generating license text from training data (which risks drift, omissions, or paraphrasing), Licensor fetches exact text from GitHub's license API and exposes it through a standardized MCP interface.
- Discover — List all licenses available on GitHub with metadata (key, name, SPDX ID)
- Recommend — Suggest a license based on project philosophy (permissive, copyleft, public domain, etc.)
- Fetch — Retrieve the exact canonical text for any license
- Write — Save a license file to disk with optional template variable substitution
- Guide — Provide structured MCP prompts for common licensing workflows
- Provide legal advice (it is not a law firm)
- Modify or interpret license terms
- Enforce license compliance
- Host its own license text (always fetches from GitHub's upstream API)
The server is available over MCP Streamable HTTP transport at:
https://license.theglasshaus.org/v1/mcp
| Tool | Description |
|---|---|
list_licenses |
List all available open-source licenses with metadata from GitHub's license API |
get_license |
Fetch the full text of a specific license (e.g., mit, apache-2.0, cc0-1.0) |
recommend_license |
Get a license recommendation based on your requirements (permissive, copyleft, patent grant, etc.) |
write_license |
Fetch a license and write it to a file, with optional template variable substitution ([year], [fullname], [project], [description]) |
-
List available licenses
{ "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "list_licenses" } } -
Fetch the text
{ "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "get_license", "arguments": { "license_key": "mit" } } } -
Write it to disk
{ "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "write_license", "arguments": { "license_key": "mit", "year": "2026", "fullname": "Jane Doe" } } }
| Prompt | Description |
|---|---|
add_license |
Step-by-step workflow for adding a license to a project |
choose_license |
Guidance for selecting the right license based on goals and use case |
license_workflow |
End-to-end workflow for add, replace, compare, or verify actions |
Prompts are retrieved via prompts/get and provide structured guidance that agents can use as context before invoking tools.
- Ruby 4.0+
- Rails 8+
- Bundler
bundle installbundle exec rspecbin/rails serverThe MCP endpoint will be available at http://localhost:3000/v1/mcp.
Interactive Swagger UI is available at the root path / when running locally, documenting all MCP protocol endpoints (initialize, tools/list, tools/call, prompts/list, prompts/get).
This project itself is licensed under CC0 1.0 Universal — dedicated to the public domain.