MIT licence: using and redistributing code
Can you sell software that uses MIT code? The rights granted, notices to preserve and an example of preparing a delivery.
An MIT library in a paid application
You find a library that meets your need. Its LICENSE file says MIT and you want to integrate it into an application sold to clients. Can you keep your code private? Do you need to pay its author or display their name on every screen?
The MIT licence allows commercial use and redistribution without requiring you to open your application’s code. Its central condition concerns the notices accompanying the reused software. I would therefore start by reading the licence file of the version being used, then check what the deliverable sent to the client contains.
What a permissive licence allows
A licence states the permissions granted by the rights holders. MIT belongs to the permissive licences: it allows copying, modification and selling copies, among other things. You can adapt a library for an internal need, distribute your adaptation or integrate it into a proprietary product, provided you preserve the required notices.
It has no copyleft requirement, meaning no obligation to redistribute derived code under the same licence. It also does not require you to offer your changes to the original project. Publishing your product’s source code therefore remains a choice, within the limits of its other components’ licences.
MIT code retains its original terms. Adding commercial terms to your application does not allow you to remove the rights and notices attached to that part. The free use permitted by the licence does not prevent charging for a product or support.
The copyright and licence must follow the code
The MIT text requires the copyright notice and permission notice to be included in all copies or substantial portions of the software. In practice, I would preserve the complete text supplied with the component, including its warranty disclaimer. A repository link or the word ‘MIT’ alone does not replace that text.
Take a fictional example: an application delivered to a client includes an MIT library in its JavaScript. A third-party notices file included in the delivery can collect that library’s name, original copyrights and full licence text. The filename is an organisational choice; the notices must actually accompany the distributed copy.
The licence does not require an advertising banner on every page. A licences section can make this information accessible, but the distributed archives and packages also need checking. A build tool may remove the comments that contained those notices.
Putting your own project under MIT
For a project for which you hold the necessary rights, put the reference MIT text in a LICENSE file at the root. Fill in the year and copyright holder. Preserve existing notices when reusing third-party code: your name does not replace its authors’ names.
In an npm package, the license field can declare the SPDX identifier MIT. This standard identifier helps tools recognise the licence; it complements the file and must match its contents. Here is only the field to add to your own MIT project’s package.json.
{
"license": "MIT"
}Before publication, examine the included dependencies and resources separately. A licence at the root does not automatically change the rights to an image, font or file copied from another project. A public repository without an explicit licence does not, on its own, grant MIT’s permissions.
Limitations to know before choosing MIT
MIT provides for supply as is, with a warranty disclaimer and limitation of liability. The text promises neither maintenance nor bug fixes. For a product you operate, the ability to maintain the dependency therefore remains a question to examine.
It does not contain an explicit patent licence grant comparable to Apache 2.0. This difference matters if you want a specific clause covering contributors’ patents; it does not, on its own, establish whether implied rights exist or not.
These guidelines explain the standard text without deciding a particular contractual case. For your next delivery, choose an MIT dependency, find the notices for its exact version and open the final archive. You should be able to find the text supplied with the relevant code.
Sources and useful links
- Open Source Initiative: MIT licence text
- SPDX: MIT identifier and reference text
- GitHub Choose a License: MIT permissions and application
- GitHub: repository licensing and rights without a licence
- npm: the license field in package.json
- Apache 2.0: explicit patent grant, section 3
- Taking over a project: inventory what needs maintaining