Inspiration

I talked with a lawyer, my old high school teacher, who told me about a case she had won. The other party was a woman who did not speak English. She signed a contract she could not read and agreed to terms she did not understand. She later lost her home. I kept thinking about how often contracts decide serious parts of someone’s life. A lease can affect where you live. A job offer can affect your income and obligations. A service agreement can decide what you pay and how hard it is to leave. Most people do not have a lawyer beside them when they need to sign something. They need a way to ask clear questions and understand the answer.

What it does

ContractClarity accepts pasted text, PDFs, and Word documents. It extracts practical details such as the parties, effective date, contract term, notice period, payment terms, amounts, and governing law. It also looks for clauses that often deserve attention, including automatic renewal, termination rights, indemnification, late fees, non-competes, arbitration, intellectual-property assignment, and liability limits. Each finding includes the relevant quote, section, severity, confidence, and a plain explanation of why it may matter. The page also creates a 0-to-100 review score so you can see which agreements may need closer attention. Through WebMCP, your AI agent can read the contract, retrieve the findings, compare two agreements, inspect a specific clause, and explain the result in clear language.

How we built it

ContractClarity is a static HTML app with no backend and no API keys. PDF.js reads PDFs in the browser. Mammoth extracts text from Word documents. A JavaScript term extractor and clause rulebook create the analysis. The document stays in the browser unless you choose to share it with a connected agent. I registered 13 WebMCP tools through document.modelContext.registerTool(). They range from broad actions such as analyze_contract and compare_contracts to focused actions such as get_clause_by_id and explain_flag. I also added a WebMCP polyfill for browsers without native support and a manual tool tester for development and demos.

Challenges we ran into

The hardest part was deciding what the page should do and what the agent should do. At first, it was easy to make the agent summarize the contract. But that didn't feel reliable because a summary without evidence doesn't really provide any practical value.

I moved the document work into the page. ContractClarity extracts terms, finds clauses, calculates the review signal, and keeps the exact quote that caused each finding. The agent then uses those results to explain the contract and answer questions.

Accomplishments that we're proud of

I built a working WebMCP experience where the page and the agent can work on the same contract. I wanted to leverage AI as a thought partner and collaborator and I think this accomplishes that in a very practical way.

For example, I am proud that the app works for different levels of experience without changing the core flow. Someone can ask, “Can I leave this lease early?” but a more technical user such as a lawyer or contract manage,r can ask for the termination clause, the review signal, and the evidence behind it.

What we learned

I learned that MCP lets a webpage give an AI agent tools and structured information. Which I believe can help AI become a better collaborator. In ContractClarity, the agent can be asked focused questions and explain the result clearly because MCP makes the page and the agent work together. The page provides the data and capabilities. The agent helps the user understand and use them.

This was my first time thinking about MCP at scale, and it was fun! In general, I learned about what MCP was and thought of more business models that can use MCP.

What's next for ContractClarity

I want to add translations so people can understand agreements in the language they use every day, which would be less work on the model the user uses to access the site and more accurate for less hallucinations. I think also providing more specific prompting format/formatted responses would help with token usage when an agent is accessing the cite and generating a response.

Built With

Share this project:

Updates

Submission history