Contracts

Master services agreement template (MSA) for agencies and dev shops

A master services agreement sets the legal terms between an agency and a client once, so each new project needs only a short statement of work. This MSA template covers fees, late payment and suspension, IP ownership, confidentiality, warranties, a liability cap, indemnities, non-solicitation and termination with payment for work in progress.

Scope & Bill · Updated

The master services agreement is the contract you hope never to read again after signing. It sits behind every project and says what happens when something goes wrong: an invoice goes unpaid, a client cancels halfway, somebody claims the code infringes, a developer gets poached.

Agencies tend to meet the MSA in one of two ways. Either a large client sends theirs, forty pages written entirely for the buyer, or there is none and the “contract” is a proposal with a signature on it. Having your own changes the starting point of every negotiation. The party whose paper is on the table negotiates from its own defaults.

The template below is written from the agency’s side and is fair enough that most clients sign it with a handful of edits.

Master Services Agreement

This Master Services Agreement (the "Agreement") is made on [EFFECTIVE DATE] (the "Effective Date") between [AGENCY LEGAL NAME], a [STATE] [ENTITY TYPE] with its principal office at [AGENCY ADDRESS] (the "Agency"), and [CLIENT LEGAL NAME], a [STATE] [ENTITY TYPE] with its principal office at [CLIENT ADDRESS] (the "Client"). The Agency and the Client are each a "party" and together the "parties".

The Client wants to engage the Agency to provide software and related professional services from time to time. This Agreement sets the terms that apply to all of that work. The detail of each project is set out in a separate statement of work.

1.Definitions

1.1"SOW" means a statement of work that refers to this Agreement and is signed by both parties.

1.2"Services" means the work the Agency agrees to perform under an SOW.

1.3"Deliverables" means the work product that the Agency creates specifically for the Client under an SOW and that the SOW lists as a deliverable, including source code, designs and documentation.

1.4"Agency Materials" means all software, code, libraries, frameworks, components, modules, tools, scripts, templates, design systems, methods, processes and know-how that the Agency (a) owned or had developed before the start of the relevant SOW, (b) develops independently of the Services, or (c) develops during the Services and that are general-purpose in nature and reusable across clients, together with all improvements to any of them.

1.5"Client Materials" means all content, data, software, trademarks, credentials and other materials that the Client supplies to the Agency.

1.6"Third-Party Materials" means software, services, fonts, images and other materials owned by a third party, including open source software.

1.7"Fees" means the amounts payable to the Agency under an SOW.

1.8"Confidential Information" means any non-public business, technical or financial information that one party discloses to the other and that is marked confidential or would reasonably be understood to be confidential, including the terms of this Agreement and each SOW.

2.Services and statements of work

2.1The Agency will perform the Services described in each SOW. Neither party has any obligation to the other for a project until both have signed an SOW for it.

2.2Each SOW forms part of this Agreement and is governed by it. Each SOW is a separate contract, so the termination of one SOW leaves every other SOW in force.

2.3If an SOW conflicts with this Agreement, this Agreement prevails. An SOW may override a section of this Agreement only by naming that section and stating that it is overridden for that SOW.

2.4Any change to the Services, Deliverables, timeline or Fees in an SOW must be recorded in a written change request approved by both parties. The Agency has no obligation to perform work outside the SOW until the change request is approved.

2.5The Agency chooses the people who perform the Services and may use subcontractors. The Agency remains responsible for the work of its subcontractors and will bind them to confidentiality and intellectual property terms that protect the Client at least as well as this Agreement does.

2.6The Client will give the Agency the access, materials, decisions and approvals that the Services reasonably require, and will name one representative with authority to approve Deliverables and change requests. If the Client is late with any of these, the timeline in the SOW extends by at least the length of the delay, and the Agency may charge at its then-current rates for team time that the delay left idle, provided the Agency told the Client about the delay when it arose.

3.Acceptance

3.1Unless the SOW sets a different period, the Client has 5 business days after delivery of a Deliverable to review it (the "Review Period").

3.2The Client may reject a Deliverable only by written notice, given within the Review Period, that identifies each way in which the Deliverable materially fails to meet the specifications or acceptance criteria in the SOW.

3.3The Agency will correct the failures identified and resubmit the Deliverable. The Client then has a further Review Period limited to the corrected items.

3.4A Deliverable is accepted on the earliest of (a) the Client's written acceptance, (b) the end of the Review Period without a valid rejection notice, and (c) the Client's use of the Deliverable in production or its release to end users.

4.Fees and expenses

4.1The Client will pay the Fees set out in each SOW. Time and materials work is charged at the rates in the SOW for time actually worked. Fixed-fee work is charged according to the payment schedule in the SOW.

4.2Any estimate of time or cost is an estimate only, unless the SOW expressly states that the Fees are fixed.

4.3The Client will reimburse reasonable out-of-pocket expenses at cost, including travel, third-party licenses, hosting and stock assets, provided the expense is listed in the SOW or approved by the Client in writing before it is incurred.

4.4Fees exclude sales, use, value added and similar taxes. The Client is responsible for those taxes, other than taxes on the Agency's income.

4.5The Agency may change its rates on 60 days' written notice, no more than once in any 12-month period. A rate change does not affect fixed Fees in an SOW already signed.

5.Invoicing and late payment

5.1The Agency will invoice as stated in the SOW or, if the SOW is silent, monthly in arrears. Each invoice is due [15] days after the invoice date.

5.2If the Client disputes an invoice in good faith, it must notify the Agency in writing within 10 days of the invoice date, explain the dispute in reasonable detail, and pay the undisputed portion on time. An invoice with no dispute raised in that period is treated as agreed.

5.3Overdue amounts bear interest at 1.5% per month, or the highest rate the law allows if that is lower, from the due date until paid.

5.4If any undisputed amount is more than [10] days overdue, the Agency may suspend all Services under every SOW after giving 5 business days' written notice. Suspension is not a breach by the Agency. All timelines extend by the length of the suspension plus a reasonable period to reassemble the team.

5.5The Client will reimburse the reasonable costs the Agency incurs in collecting overdue amounts, including attorneys' fees.

5.6The Client may not set off or withhold any amount it owes the Agency against any claim it has against the Agency.

6.Intellectual property

6.1The Client owns the Client Materials. The Client grants the Agency a non-exclusive license to use the Client Materials during the term solely to perform the Services.

6.2On the Agency's receipt of full payment of all Fees due under an SOW, the Agency assigns to the Client all right, title and interest in the Deliverables under that SOW, excluding any Agency Materials and Third-Party Materials contained in them. Until that payment is received, the Agency owns the Deliverables and the Client may use them only to review and test them.

6.3The Agency owns the Agency Materials at all times. Where Agency Materials are incorporated into a Deliverable, the Agency grants the Client, effective on the payment described in section 6.2, a non-exclusive, perpetual, irrevocable, worldwide, royalty-free license to use, copy, modify and maintain those Agency Materials as part of the Deliverable, and to allow the Client's employees, contractors and successors to do the same. The Client may not extract Agency Materials from the Deliverables in order to sell, license or distribute them as a standalone product.

6.4Third-Party Materials are licensed to the Client by their owners on their own terms. The Agency will list the material Third-Party Materials in a Deliverable on request. The Agency will obtain the Client's written approval before including any Third-Party Materials whose license would require the Client to publish the source code of the Deliverables.

6.5Nothing in this Agreement restricts the Agency from using the general skills, knowledge, experience, ideas and techniques that its people gain while performing the Services, or from building similar products for other clients, provided the Agency does not use or disclose the Client's Confidential Information in doing so.

6.6The Agency may name the Client as a client and describe the Services in general terms in its portfolio and marketing materials, unless the Client objects in writing.

6.7Each party will sign any further documents reasonably needed to give effect to this section 6.

7.Confidentiality

7.1Each party will keep the other's Confidential Information confidential, use it only to perform or receive the Services, and disclose it only to its employees, contractors and advisers who need to know it and are bound by equivalent obligations.

7.2Section 7.1 does not apply to information that (a) is or becomes public through no fault of the receiving party, (b) the receiving party already knew or independently developed without using the Confidential Information, or (c) the receiving party lawfully received from a third party free of any confidentiality duty.

7.3A party may disclose Confidential Information where the law or a court requires it, after giving the other party as much notice as the law allows.

7.4On written request after termination, each party will return or destroy the other's Confidential Information, except for copies held in routine backups or kept to meet legal obligations.

7.5The obligations in this section 7 last for the term of this Agreement and for [3] years after it ends. For any information that qualifies as a trade secret, they last for as long as it remains a trade secret.

8.Warranties and disclaimer

8.1The Agency warrants that (a) it will perform the Services in a professional and workmanlike manner, (b) each Deliverable will materially conform to its specifications in the SOW for [30] days after acceptance (the "Warranty Period"), and (c) to the Agency's knowledge, the Deliverables as delivered will not infringe the copyright or trade secrets of any third party.

8.2If the Client reports a breach of section 8.1(b) in writing during the Warranty Period, the Agency will correct the nonconformity at no charge. If the Agency cannot correct it within a reasonable time, the Agency will refund the Fees paid for the affected Deliverable. This is the Client's exclusive remedy for a breach of section 8.1(b).

8.3The warranty in section 8.1(b) does not cover problems caused by Client Materials, Third-Party Materials, changes made by anyone other than the Agency, or use of a Deliverable outside the environment described in the SOW.

8.4The Client warrants that it has all rights needed to supply the Client Materials to the Agency for use in the Services.

8.5EXCEPT AS STATED IN THIS SECTION 8, THE AGENCY MAKES NO WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. THE AGENCY DOES NOT WARRANT THAT THE DELIVERABLES WILL BE FREE OF ERRORS, WILL RUN WITHOUT INTERRUPTION, OR WILL PRODUCE ANY PARTICULAR COMMERCIAL RESULT.

9.Limitation of liability

9.1NEITHER PARTY IS LIABLE TO THE OTHER FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR PUNITIVE DAMAGES, OR FOR ANY LOSS OF PROFITS, REVENUE, DATA OR GOODWILL, ARISING OUT OF THIS AGREEMENT, EVEN IF IT WAS ADVISED THAT SUCH DAMAGES WERE POSSIBLE.

9.2EACH PARTY'S TOTAL LIABILITY ARISING OUT OF THIS AGREEMENT AND ALL SOWS, WHETHER IN CONTRACT, TORT OR OTHERWISE, IS LIMITED TO THE FEES THE CLIENT PAID TO THE AGENCY UNDER THIS AGREEMENT IN THE 12 MONTHS BEFORE THE EVENT THAT GAVE RISE TO THE CLAIM.

9.3Sections 9.1 and 9.2 do not limit (a) the Client's obligation to pay Fees, expenses, interest and collection costs, (b) liability for fraud or willful misconduct, or (c) any liability that the law does not allow to be limited.

9.4Any claim arising out of this Agreement must be brought within 12 months after the claiming party first knew, or should reasonably have known, of the facts behind it.

10.Indemnities

10.1The Agency will defend the Client against any third-party claim that a Deliverable, as delivered by the Agency, infringes a United States copyright or misappropriates a trade secret, and will pay the damages and costs finally awarded or agreed in settlement.

10.2Section 10.1 does not apply to a claim that arises from Client Materials, Third-Party Materials, specifications or instructions given by the Client, changes made by anyone other than the Agency, or the combination of a Deliverable with anything the Agency did not supply.

10.3If a claim under section 10.1 is made or appears likely, the Agency may obtain the right for the Client to keep using the Deliverable, modify it so that it no longer infringes, or, if neither is commercially reasonable, refund the Fees paid for it.

10.4The Client will defend the Agency against any third-party claim that arises from the Client Materials, from the Client's products or business, or from the Client's use of a Deliverable in breach of this Agreement or the law, and will pay the damages and costs finally awarded or agreed in settlement.

10.5The party seeking an indemnity must notify the other promptly, give it sole control of the defense and settlement, and cooperate at the indemnifying party's expense. The indemnifying party may not settle a claim in a way that admits fault on behalf of the other party without that party's written consent.

11.Non-solicitation

11.1During the term of this Agreement and for 12 months after it ends, neither party will solicit for employment or engagement any employee or contractor of the other party who worked on the Services, without the other party's written consent. Hiring a person who responds to a general advertisement that was not aimed at them does not breach this section.

11.2If a party hires or engages a person in breach of section 11.1, it will pay the other party a fee equal to [30]% of that person's first-year total compensation in the new role. The parties agree that this amount is a reasonable estimate of the cost of replacing and retraining that person.

12.Term and termination

12.1This Agreement starts on the Effective Date and continues until either party terminates it under this section 12.

12.2Either party may terminate this Agreement or any SOW for convenience on [30] days' written notice.

12.3Either party may terminate this Agreement or any SOW immediately by written notice if the other party (a) materially breaches it and does not cure the breach within 15 days after written notice, or 10 days where the breach is a failure to pay, or (b) becomes insolvent, makes an assignment for the benefit of creditors, or becomes subject to bankruptcy proceedings.

12.4On termination of an SOW for any reason, the Client will pay (a) all Fees for Services performed up to the termination date, including work in progress toward any fixed-fee milestone not yet invoiced, valued in proportion to the work completed, and (b) all expenses and third-party commitments that the Agency incurred for the SOW and cannot cancel.

12.5If the Client terminates an SOW for convenience, or the Agency terminates it for the Client's breach, the Client will also pay an early termination fee equal to [25]% of the Fees that would have been payable for the rest of the SOW. The parties agree that this fee is a reasonable estimate of the Agency's cost of holding its team for the SOW and of the time needed to redeploy it.

12.6Once the Client has paid all amounts due under sections 12.4 and 12.5, the Agency will deliver all completed Deliverables and work in progress under the terminated SOW, and section 6 applies to them.

12.7Sections 4, 5, 6, 7, 8.5, 9, 10, 11, 12.4 to 12.7, 14 and 15 survive termination. If this Agreement is terminated while an SOW is still in force, this Agreement continues to govern that SOW until it ends.

13.Independent contractor

13.1The Agency is an independent contractor. Nothing in this Agreement creates an employment, partnership, joint venture or agency relationship between the parties.

13.2The Agency is solely responsible for the pay, benefits, taxes and insurance of its own personnel. Neither party has authority to bind the other or to make commitments on the other's behalf.

14.Governing law and disputes

14.1This Agreement is governed by the laws of the State of [STATE], without regard to its conflict of laws rules.

14.2Before starting legal proceedings, the parties will refer any dispute to a senior executive of each party, who will meet within 15 days to try to resolve it. This section does not prevent either party from seeking urgent injunctive relief or from collecting undisputed Fees.

14.3The state and federal courts located in [COUNTY], [STATE] have exclusive jurisdiction over any dispute arising out of this Agreement, and each party submits to that jurisdiction.

14.4In any action to enforce this Agreement, the prevailing party is entitled to recover its reasonable attorneys' fees and costs.

15.General provisions

15.1This Agreement and the SOWs are the entire agreement between the parties on their subject matter and replace all earlier proposals, discussions and agreements. Terms printed on a purchase order or similar Client document have no effect.

15.2This Agreement may be amended only in a written document signed by both parties.

15.3Neither party may assign this Agreement without the other's written consent, which may not be unreasonably withheld. Either party may assign it without consent to a successor that acquires all or substantially all of its business.

15.4Notices must be in writing and sent to the addresses above or to the email addresses in the signature block. A notice sent by email is effective on the next business day after it is sent.

15.5Neither party is liable for a delay or failure caused by events beyond its reasonable control. This section does not excuse any obligation to pay money.

15.6If any provision of this Agreement is held unenforceable, it will be enforced to the greatest extent the law allows and the rest of this Agreement remains in effect.

15.7A failure or delay in enforcing a right under this Agreement is not a waiver of that right.

15.8This Agreement may be signed in counterparts and by electronic signature, each of which is an original.

The parties have signed this Agreement as of the Effective Date.

The AgencyThe Client
[AGENCY LEGAL NAME][CLIENT LEGAL NAME]
Signature:Signature:
Name: [NAME]Name: [NAME]
Title: [TITLE]Title: [TITLE]
Email for notices: [EMAIL]Email for notices: [EMAIL]
Date: [DATE]Date: [DATE]

Download the editable .docx

Master services agreement, as a Word file you can change, with the clause notes at the back. Free. No email, no sign-up.

Download the file

How the MSA works with a statement of work

The MSA does not describe any work. Section 2.1 says neither party owes the other anything until a statement of work is signed. Each project then gets its own statement of work covering deliverables, milestones, fees and change control, and the SOW inherits every legal term from the MSA.

Section 2.3 sets the order of precedence. The MSA prevails unless a SOW overrides a section by name. That lets you make a deliberate exception for one project, such as a different payment term, without letting a carelessly written SOW undo your liability cap.

For a one-off build where the client wants a single document, a combined software development agreement does both jobs. For ongoing monthly work, a retainer agreement sits alongside the MSA.

The clauses that get you paid

Four sections of this template do most of the work when a client is slow to pay.

Deemed acceptance, section 3.4. A deliverable is accepted when the review period ends without a specific written rejection, or when the client puts it into production. A client cannot stall an invoice by staying silent.

Dispute window, section 5.2. The client has 10 days to dispute an invoice in writing and must pay the undisputed part on time. This ends the tactic of raising a vague quality complaint on day 44 of a 45-day term.

Suspension, section 5.4. If an undisputed amount is more than 10 days overdue, you can stop all work across every SOW on five business days’ notice:

Suspension is not a breach by the Agency. All timelines extend by the length of the suspension plus a reasonable period to reassemble the team.

Interest at 1.5% per month, in section 5.3, signals that you are serious. Suspension is what works. A client with a launch date pays quickly when the team stops.

No set-off, section 5.6. The client cannot deduct an amount it thinks you owe from an invoice it does owe.

When payment has already gone wrong, the practical sequence is in the guide to a client not paying. Every step in it relies on these clauses being in the signed agreement.

The IP clause: what the client gets and what you keep

Section 6 is the part of this template I would defend hardest, and the part most agencies currently give away.

The standard client-drafted MSA says all work product belongs to the client. It sounds reasonable. It also sweeps in everything you brought to the project and everything general-purpose you wrote during it: your starter framework, your authentication module, your build and deployment scripts, the internal library that makes your team faster than the next shop. Sign that clause with five clients and you have assigned the same toolkit to five different owners, which should worry all six of you.

The template divides the codebase into three parts.

WhatWho owns itClient’s rights
Deliverables: code and designs created specifically for the clientClient, on full paymentFull ownership
Agency Materials: pre-existing and general-purpose code, tools, libraries, know-howAgencyPerpetual, irrevocable, royalty-free license to use, copy, modify and maintain as part of the deliverables
Third-Party Materials: open source and licensed componentsTheir ownersWhatever the third-party license grants

Test this against what a client needs. It needs to run the software forever. It needs to change it. It needs to hand it to an in-house team or a different agency. It needs to sell the software along with the company. The license in section 6.3 grants every one of those, including to contractors and successors. The one thing the client cannot do is pull your library out and sell it as its own product, which no client was planning to do.

So the client loses nothing it would use, and you keep the right to your own tools. Most agencies give away far more than the client needs, simply because nobody separated the two categories in the contract.

Two details make the clause work. The definition of Agency Materials in section 1.4 includes general-purpose code developed during the services, so a reusable utility written on this project stays yours. And the assignment in section 6.2 takes effect on full payment:

Until that payment is received, the Agency owns the Deliverables and the Client may use them only to review and test them.

A client that has not paid does not own what it is running. That is a stronger collection tool than interest.

When a client pushes for full ownership of everything, ask what it is worried about. Usually the fear is being locked in or being unable to sell the business, and the license answers both. If it still wants outright ownership, quote it as a separate line, because you would be selling an asset you otherwise keep. More on the reasoning in who owns the code, on the wording in the guide to the IP clause, and on why retained code has value in what your old code is worth.

Limiting what a bad project can cost you

Section 9 caps each party’s total liability at the fees the client paid in the 12 months before the claim. Without a cap, a $60,000 project that goes wrong can produce a claim for the client’s lost revenue, which could be many times that.

Run the arithmetic for your own agency. If your largest client pays you $300,000 a year, the cap is $300,000. Check that against your professional liability insurance limit. The cap should sit inside it.

Clients negotiate this section more than any other. Expect requests to carve confidentiality breaches and indemnities out of the cap entirely. Unlimited liability on any item is a risk a small firm cannot carry. The usual compromise is a higher separate cap for those items, such as two or three times the annual fees.

The warranty in section 8 is deliberately narrow: professional workmanship and conformity to the SOW for 30 days after acceptance, with repair or refund as the remedy. The disclaimer in 8.5 says you do not promise error-free software or a commercial result. No honest developer can promise either.

Termination and the kill fee

Either side can leave on 30 days’ notice. What matters is what the client owes on the way out. Section 12.4 covers work done, including the unfinished milestone, valued by how much of it is complete. Section 12.5 adds an early termination fee:

The Client will also pay an early termination fee equal to [25]% of the Fees that would have been payable for the rest of the SOW.

Here is how that plays out. A $100,000 fixed-fee SOW is cancelled for convenience with $40,000 invoiced and a further $15,000 of work in progress toward the next milestone. The client owes the $15,000 for work in progress, plus 25% of the remaining $45,000, which is $11,250. Total on exit: $26,250, on top of the $40,000 already billed.

The fee compensates you for a team you reserved and now have to redeploy. Clients push to remove it. A fair trade is to waive it when the client gives longer notice, such as 60 days. Hold on to payment for work in progress whatever else you concede.

What clients change, and what to accept

Client asks forReasonable response
Net 30 or net 45 instead of net 15Accept net 30. Take a larger deposit in the SOW for anything longer
Their state’s governing lawAccept if the deal justifies it. Ask for remote hearings or a neutral venue
Warranty of 90 daysMeet at 60
Patent indemnityDecline, or cap it at fees paid
One-way non-solicitation in their favorKeep it mutual or delete it
Approval rights over subcontractorsAgree to notify. Agree to approval only for named roles
Removal of portfolio rights in 6.6Accept. It costs you little

Notes for the UK and EU

The template defaults to US law. Three differences change decisions elsewhere. In the UK, statutory interest applies to late commercial payments by default, so you can refer to the statute. Liability caps in standard terms can be tested for reasonableness, and liability for death or personal injury caused by negligence cannot be excluded, so the cap needs local wording. And in several EU countries an author’s moral rights cannot be fully assigned, which affects how the IP section is drafted. Get a local review before you use this outside the US.

The rest of the set, including the consulting agreement, is on the contracts hub.

This is a working document from a practitioner. Have a lawyer in your jurisdiction review it before you sign.

Common questions

What is a master services agreement?
It is a contract that sets the standing legal terms between a service provider and a client: payment, intellectual property, confidentiality, warranties, liability and termination. Individual projects are then added as statements of work that refer back to it.
What is the difference between an MSA and a SOW?
The MSA governs the relationship and is signed once. The SOW governs one project and is signed each time. The MSA holds the legal terms. The SOW holds deliverables, milestones, fees and change control.
Does a small agency really need an MSA?
If you expect more than one project with a client, yes. Without one, every project renegotiates liability, ownership and payment terms, or leaves them out. A single small job can run on one combined agreement.
What liability cap is normal in an MSA?
For a services firm, the usual starting point is the fees the client paid in the 12 months before the claim. Larger clients often negotiate a higher separate cap for confidentiality breaches and indemnities.
Who owns the work under this MSA template?
The client owns the project-specific deliverables once it has paid in full. The agency keeps its pre-existing and general-purpose code, tools and know-how and gives the client a perpetual license to use them inside the deliverables.