Technical Details
The Pandects MCP is a read-only remote MCP server at https://api.pandects.org/mcp.
It is designed for human users working through LLM clients, but this page describes the technical surface available behind the scenes.
High-Level Capability Areas
The current MCP surface covers:
- Agreement discovery and retrieval
- Section search and section listing within one agreement
- Section-level retrieval
- Concept-to-taxonomy mapping and focused snippet extraction
- Tax clause retrieval
- Filter and taxonomy lookup
- Counsel, NAICS, summary, trend, and server-introspection reference data
Tool Groups
Agreement Discovery And Retrieval
search_agreementslist_agreementsget_agreement
Use these when the client needs to find the right agreement first or fetch one agreement directly.
Section Research
search_sectionslist_agreement_sectionslist_agreement_sections_batchget_sectionget_section_snippetget_section_snippets_batchget_sections_batch
Use these when the client needs to search clause language across the corpus, navigate sections inside one agreement, inspect a known section directly, or extract a shorter plain-text excerpt from one section. list_agreement_sections_batch, get_section_snippets_batch, and get_sections_batch accept a list of agreement or section UUIDs and return results in a single call, reducing round-trips for multi-agreement workflows. get_sections_batch returns full section XML (capped by default at 10 000 characters per section); get_section_snippets_batch returns focused plain-text excerpts and is the right choice when the full XML is not needed.
Discovery Helpers
suggest_clause_families
Use this when the client knows the business or legal concept but does not know the right taxonomy standard_id yet. The tool returns ranked clause-family candidates with their taxonomy paths and matched terms.
Each match also reports whether it is a canonical fit, a proxy, or a broader semantic match.
Tax Clause Research
get_agreement_tax_clausesget_section_tax_clauses
Use these when the task is specifically about extracted tax-module clauses rather than the full agreement or section text.
Research Bootstrap
list_filter_optionsget_clause_taxonomyget_tax_clause_taxonomy
Use these when the client needs valid structured inputs before searching.
Reference And Context
get_counsel_catalogget_naics_catalogget_agreements_summaryget_agreement_trendsget_server_capabilitiesget_server_metrics
Use these when the client needs canonical lookup data, corpus-level context, or MCP introspection metadata.
Current Tool List
The current MCP tools are:
search_agreementssearch_sectionslist_agreementslist_agreement_sectionslist_agreement_sections_batchget_agreementget_sectionget_section_snippetget_section_snippets_batchget_sections_batchget_agreement_tax_clausesget_section_tax_clauseslist_filter_optionssuggest_clause_familiesget_server_metricsget_server_capabilitiesget_clause_taxonomyget_tax_clause_taxonomyget_counsel_catalogget_naics_catalogget_agreements_summaryget_agreement_trends
Design Notes
- The server is read-only
- Clients should typically choose the right tools automatically
search_agreementsis the discovery-oriented agreement search; accepts astandard_idlist to filter to agreements that contain at least one section tagged with any of the given taxonomy idslist_agreementsis the exact-filter, cursor-based agreement listing surface; also acceptsstandard_idfor taxonomy-based agreement filteringlist_agreement_sectionsis an MCP convenience tool for within-agreement navigationsearch_sectionsis a clause-language retrieval surface, not a normalized document-facts surface; it has no free-text/keyword parameter — it searches by clause-familystandard_idand the structured M&A filters only. Usesuggest_clause_families(orget_clause_taxonomy) to translate a plain-English concept into astandard_id, then filter by itsearch_sectionsexposescount_modeand returnscount_metadataplusinterpretationso clients can tell when totals are exact versus estimated and when taxonomy is acting as a proxysearch_agreementsreturns exact totals today and also includescount_metadataplusinterpretationstandard_idvalues are opaque 16-character hex node IDs obtained fromget_clause_taxonomyorsuggest_clause_families— they are not dotted decimal numbers. Unrecognized IDs are ignored (they silently match nothing) and are echoed back underinterpretation.unrecognized_standard_ids, alongsideinterpretation.taxonomy_filters, so clients can detect a mistyped or stale ID rather than mistaking an empty result for "no matches"suggest_clause_familiesexists to bridge plain-English concepts to taxonomy ids and now reports fit/confidence metadata so clients can distinguish canonical matches from broader proxiesget_section_snippetis a focused reading aid, not a replacement forget_sectionor a canonical extracted-facts surfaceget_section_snippets_batchandlist_agreement_sections_batchaccept arrays of UUIDs and collapse multiple single-item calls into one round-trip; use them when a workflow would otherwise fan out across many agreements or sectionsget_sections_batchfetches full section XML for up to 10 sections in one call; XML is capped atmax_xml_charsper section (default 10 000, range 500–20 000) to prevent context overload; when a section is truncated the result includesxml_truncated: true; passmax_xml_chars: nullonly if uncapped XML is explicitly neededsearch_sectionsresults includefiling_dateandtransaction_price_totalinline on every result without needing to request them viametadataget_section_snippet,get_section_snippets_batch, andget_sections_batchall include amonetary_valueslist — dollar amounts and value expressions extracted from the section text — so clients can surface deal economics without parsing XMLsearch_sectionsandsearch_agreementsboth acceptfiled_afterandfiled_before(ISO 8601 date strings,YYYY-MM-DD) for sub-year filing-date precision;year/year_min/year_maxfilter on the agreement year;filed_after/filed_beforefilter on the exact filing dateget_agreementreturns metadata only by default (the response reportsxml_included: false) to keep the payload small; passinclude_xml: trueto also return the agreement XML, which preserves the existing redaction and full-text access behavior (focus_section_uuid/neighbor_sectionsonly take effect wheninclude_xmlis true and the response is redacted)get_agreement_trendsaccepts asectionsselector (ownership,target_industries,pairings,naics_catalog) and defaults to[ownership, target_industries]; the largepairings(every industry-by-industry cell) andnaics_catalog(full NAICS hierarchy) sections are opt-in, and the response echoessections_returnedget_server_capabilitiesis the main machine-readable semantics surface; it includes auth guidance, field inventory, concept notes, and negative guidance about when not to use a tool- The server exposes a small set of MCP resources (
pandects://capabilities,pandects://auth-help) that mirrorget_server_capabilitiesfor clients that prefer theresources/readprimitive over calling a tool - The server exposes curated MCP prompts (
compare_agreements,clause_family_survey,deal_trend_brief) as research templates; they orchestrate the primitive retrieval tools rather than introducing new functionality
Transport
POST /mcpis the primary JSON-RPC endpoint. It supports content negotiation: clients that advertiseAccept: text/event-streamreceive an SSE-framed response; clients that preferapplication/jsonreceive a plain JSON body. This matches the Streamable HTTP behaviour required by Claude Code.GET /mcpreturns an SSE retry probe for clients that opportunistically open a server-to-client stream.DELETE /mcpis accepted as an authenticated session-termination signal and returns204.initializeresponses carry anMcp-Session-Idheader. The server is stateless, so the id is informational — clients are not required to echo it, but Claude Code does.- Every response carries an
MCP-Protocol-Versionheader echoing the negotiated protocol version. - Advertised server capabilities:
tools,resources(listChanged=false, subscribe=false),prompts(listChanged=false), andlogging(logging/setLevelis accepted as a no-op).
Tool error codes
tools/call failures use distinct JSON-RPC error codes so a client can tell a fixable request from a server-side fault. The codes are identical across the JSON and SSE response paths:
-32602— invalid tool arguments (schema/validation failure or a malformed identifier)-32002— the tool ran but the requested resource was not found (e.g. an unknown agreement or section UUID); the errordatais{"category": "not_found", "status_code": 404}. Verify the identifier with a search or list tool and retry — this is not a transient error.-32003— missing scope / authorization-32603— the tool result violated its advertised output schema-32004— a genuine tool failure (server-side)
In get_server_metrics, a not-found tool result is counted under its own not_found error category (not the generic http_exception), since a bad identifier is a client mistake rather than a server fault. Note that metrics counters are per-process: in a multi-worker deployment each get_server_metrics call reports only the worker that served it, not a server-wide total.
Progress notifications
When a tools/call request includes params._meta.progressToken and the client advertises Accept: text/event-stream, the server returns a multi-event SSE stream:
notifications/progresswithprogress=0,total=1, and aStarting <tool>messagenotifications/progresswithprogress=1,total=1, and a<tool> completemessage- The final
tools/callJSON-RPC result (or error)
This keeps intermediary proxies and client UIs aware of in-flight work on long calls. Clients that do not set a progress token, or do not accept SSE, receive the usual single-response behaviour.
OAuth discovery and Dynamic Client Registration
The server is protected by an embedded OAuth authorization server whose issuer lives under /v1/auth/oauth. To make OAuth discovery work with clients that implement RFC 8414 strictly (including Claude Code), authorization-server metadata is exposed at three locations:
GET /.well-known/oauth-authorization-server— host-root fallbackGET /.well-known/oauth-authorization-server/v1/auth/oauth— RFC 8414 host-root + issuer-path formGET /v1/auth/oauth/.well-known/oauth-authorization-server— issuer-prefixed form (original)
GET /.well-known/openid-configuration is also exposed at the host root for OIDC-leaning clients.
The metadata document advertises registration_endpoint (/v1/auth/oauth/register), so compliant clients can self-register via Dynamic Client Registration (RFC 7591) without a manual out-of-band step. Only public, PKCE (S256), authorization-code clients are supported.
Authentication
- MCP uses normal Pandects account login
- MCP does not use Pandects API keys
codex mcp addonly registers the server; in Codex,codex mcp login <name>starts OAuth- Auth failures return structured remediation metadata so clients can distinguish missing-token, expired-token, unverified-account, and unlinked-subject cases