MCP documentation
How to connect an agent to the Data.co MCP server, which tools exist, and which LAW.co can back today. The server is live at api.data.co/mcp.
Configure your client
{
"mcpServers": {
"dataco": {
"type": "http",
"url": "https://api.data.co/mcp",
"headers": { "Authorization": "Bearer ${DATACO_API_KEY}" }
}
}
}Setup for common clients
Claude Code
Add the server from your terminal, then run /mcp inside Claude Code to confirm it connected and list its tools.
claude mcp add --transport http dataco \
https://api.data.co/mcp \
--header "Authorization: Bearer $DATACO_API_KEY"Cursor
Add the block to .cursor/mcp.json in your project, or to the global file in your home directory, then enable the server in Cursor's MCP settings.
{
"mcpServers": {
"dataco": {
"url": "https://api.data.co/mcp",
"headers": { "Authorization": "Bearer ${env:DATACO_API_KEY}" }
}
}
}VS Code
Add the server to .vscode/mcp.json. VS Code can prompt for the key once and store it, instead of keeping it in the file.
{
"inputs": [
{ "type": "promptString", "id": "dataco-key",
"description": "Data.co API key", "password": true }
],
"servers": {
"dataco": {
"type": "http",
"url": "https://api.data.co/mcp",
"headers": { "Authorization": "Bearer ${input:dataco-key}" }
}
}
}Client configuration formats change between releases; check your client's own MCP documentation if a field is not recognized.
Tool reference
| Tool | What it does | Input | LAW.co today | Notes |
|---|---|---|---|---|
search_legal_corpus | Keyword search across all legal datasets. | query, type?, dataset?, jurisdiction?, court?, date_from?, date_to?, limit? | Partial | Backed by LAW.co's legacy search: randomly sampled (≤50), not paginated or stable. |
get_legal_document | Fetch one legal document with provenance and enrichment. | id | Supported by LAW.co | Single case records via LAW.co's public case endpoint. |
search_statutes | Search statute data. | query?, state?, limit? | Unavailable | Would serve estate-planning statute reference values only; LAW.co's production table is not yet populated. LAW.co holds no statute corpus. |
search_case_law | Search court opinions with court, date and citation filters. | query, jurisdiction?, court?, date_from?, date_to?, citation?, limit? | Partial | Same sampled upstream search; court and date filters applied to the sample. |
get_citation | Resolve a citation string to a record. | citation | Unavailable | LAW.co has no citation-resolution endpoint yet (proposed in the integration plan). |
list_jurisdictions | List jurisdictions covered. | none | Partial | Catalog-level coverage only; no verified per-court breakdown. |
list_legal_datasets | List legal datasets and their access status. | none | Supported by LAW.co | Served from the Data.co catalog. |
get_dataset_metadata | Full descriptor and schema for one dataset. | slug | Supported by LAW.co | Served from the Data.co catalog. |
What a tool returns
{
"items": [
{
"id": "lawco:case:<id>",
"title": "<case name>",
"citations": ["<reporter cite>"],
"court": "<court>",
"date": "YYYY-MM-DD",
"snippet": "<opinion excerpt>",
"provenance": { "provider": "lawco", "licenseId": "us-gov-edicts-public-domain", "isDerived": false }
}
],
"next_cursor": null,
"warnings": ["Upstream search is sampled (≤50); results are not stable across calls."]
}MCP examples
Tool calls as an agent would issue them. Against production they return live LAW.co records with demo: false; synthetic records are always marked demo: true.
{
"name": "list_legal_datasets",
"arguments": {}
}
// → each dataset with access status, e.g.
// { "slug": "lawco-court-opinions", "rest": "available", "download": "awaiting-rights-confirmation", ... }Example tool calls · placeholders in angle brackets
When a tool cannot answer
| Code | Meaning for the agent | What it should do |
|---|---|---|
not_configured | The provider channel is not connected (for example statute reference values, not yet populated). | Tell the user the source is not connected yet. |
unsupported_operation | The provider cannot back this tool (for example get_citation). | Fall back to search_case_law with the citation as a filter. |
not_entitled | The plan does not include this dataset's tier. | Answer from the entitled data and say what was not available. |
rate_limited | The key's rate limit is exhausted (quota_exceeded means the monthly plan quota is used up). | Wait and retry later; do not loop. |
MCP setup FAQ
Which scopes does the key need?
mcp:invoke to call tools at all, plus legal:read for the legal tools.
Can I limit which tools an agent sees?
Most clients let you enable or disable individual tools from a server. Use that to hide tools you do not want an agent to call.
How should an agent handle sampled search warnings?
Pass them on. A good system prompt tells the agent to mention when results may be incomplete instead of presenting them as exhaustive.
Start building with live data.
API and MCP access is live. Sign up at app.data.co, create a scoped key, or talk to us about your use case.