OpenContracts
Self-hosted document intelligence links citations, annotations and AI agents in a shared graph. Open source under MIT, with a web UI and MCP server.
Alternative to:

OpenContracts is a self-hosted document intelligence platform for teams working with legal archives, research libraries or internal policies. It connects documents through citations and annotations, giving people and AI agents a shared record of how source material relates. The code is open source under the MIT license; the public website also provides collections readers can browse.
Human annotations anchor the graph. Teams can define their own labels, select precise passages across multiple pages, and record relationships between concepts. Agents can follow those relationships, cite the passages they use and propose connections for people to review and accept.
The platform combines structured extraction and vector search with configurable agents that search documents, query annotations and join discussions. That makes it useful for work such as comparing contract clauses or tracing references across a research collection. Threaded discussions sit alongside documents and collections, so analysis stays attached to its sources.
Document collections have folder hierarchies, fine-grained permissions and version history. Teams can restore earlier versions or fork public collections to build on existing annotations. Public sharing lets others add documents and refine the graph.
A React web interface gives teams a place to browse and annotate. Developers can use GraphQL and REST APIs to build research or drafting tools on the same data, while the built-in Model Context Protocol (MCP) server connects AI agents to the graph.
Docker Compose supports self-hosted deployment. Parsing, embedding and AI agent components require configuration for the services and models your deployment uses.