Skip to main content
Glama
risk-ai
by risk-ai

Law.AI MCP Server

Verified U.S. lawyer search for AI assistants. Stop hallucinating attorneys. Start finding real ones.

npm version License: MIT MCP Registry

The Law.AI MCP Server gives AI assistants direct access to 991,000+ bar-verified U.S. attorney profiles, sourced from official state bar registries. When an AI needs to find, verify, or recommend a lawyer, it queries Law.AI instead of guessing.


Why This Exists

Every major LLM fabricates lawyer names when asked for legal referrals. People making critical legal decisions get fake information. The Law.AI MCP Server solves this by providing a grounded, authoritative data source any AI can query — from "consult an attorney" to a real, licensed referral in a single tool call.


Related MCP server: legal-mcp

Quick Start

Claude Desktop (local, stdio)

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "law-ai": {
      "command": "npx",
      "args": ["lawai-mcp-server"]
    }
  }
}

Hosted (Streamable HTTP)

Connect any MCP client to the hosted endpoint:

https://mcp.law.ai

No install required. Free tier works without an API key.

Cursor / VS Code

{
  "law-ai": {
    "command": "npx",
    "args": ["lawai-mcp-server"]
  }
}

From Source

git clone https://github.com/risk-ai/lawai-mcp-server.git
cd lawai-mcp-server
npm install
npm run build
npm start

Available Tools

Tool

Purpose

search_lawyers

Search by practice area, state, city, and bar status

get_lawyer_profile

Full profile for a specific lawyer by ID

find_lawyer_by_name

Verify a lawyer exists and is licensed

match_lawyer_to_matter

Plain-English matter → ranked lawyer matches

get_legal_cost_estimate

Fee ranges by billing model and region

get_practice_areas

List all practice areas with counts

get_jurisdictions

List U.S. jurisdictions with coverage

search_lawyers

Search the directory by practice area, location, and bar status.

"Find personal injury lawyers in Houston, Texas"
→ Ranked results with profiles, firms, and credentials

get_lawyer_profile

Get full details for a specific lawyer by ID.

"Get profile for lawyer #12345"
→ Bio, education, bar admissions, practice areas, contact info

find_lawyer_by_name

Look up a lawyer by name to verify they exist and are licensed.

"Is there a lawyer named Jane Smith in New York?"
→ Matching profiles with disambiguation

match_lawyer_to_matter

Describe a legal issue in plain English; receive ranked attorney matches.

"My landlord won't return my deposit in Brooklyn"
→ Classified to Landlord–Tenant / Consumer law → ranked NY tenant attorneys

Estimated fee ranges by billing model (hourly, flat, contingency), adjusted for case complexity and region.

get_practice_areas

List all available practice areas with lawyer counts.

get_jurisdictions

List U.S. states and territories with coverage numbers.


Transports

Transport

Use case

stdio

Local clients (Claude Desktop, Cursor, VS Code) — npx lawai-mcp-server

Streamable HTTP

Remote clients, hosted at https://mcp.law.ai


Authentication & Tiers

The hosted endpoint is open for unauthenticated read access on the free tier. Bring an API key (Bearer token) for higher limits and bulk export.

Tier

Rate limit

Bulk export

Use case

Free (no key)

100 req/min

Personal use, evaluation, single-query workflows

Pro

1,000 req/min

10K rows/day

Apps, agents in production

Business

10,000 req/min

Unlimited

High-volume routing, enrichment, integrations

Request a key: law.ai/api or sales@law.ai.

Local stdio installations are unmetered.


Data Privacy

  • Unclaimed profiles — Public bar information only (name, location, practice areas, bar status).

  • Claimed profiles — Additional contact information the lawyer has opted to share.

  • No scraping — Rate-limited to prevent data harvesting.

  • Disclaimers included — All results note that credentials should be independently verified at the relevant state bar.


Environment Variables (self-hosted)

Variable

Default

Description

DB_HOST

127.0.0.1

PostgreSQL host

DB_PORT

5433

PostgreSQL port

DB_USER

rich_enrichment

Database user

DB_PASSWORD

Database password

DB_NAME

lawai

Database name

LAW_AI_BASE_URL

https://law.ai

Base URL for profile links


How It Works

User: "Find me a patent attorney in San Francisco"
  ↓
AI Assistant (Claude, GPT, etc.)
  ↓
MCP Protocol
  ↓
Law.AI MCP Server
  ↓
991K+ bar-verified attorney profiles (PostgreSQL)
  ↓
Real attorneys with real bar numbers

Coverage

  • 991,000+ attorney profiles

  • All 50 states + DC + U.S. territories

  • 90+ practice areas

  • State bar registries as the source of record — updated continuously

  • Bar status surfaced — Active, Inactive, Suspended, Disbarred, Retired


MCP Registry

Listed in the official MCP Registry as ai.law/lawyer-search.

curl "https://registry.modelcontextprotocol.io/v0/servers?search=lawyer"

Contributing

Issues and PRs welcome. See CONTRIBUTING.md if present, or open a ticket on the issues page.


License

MIT — use it everywhere. See LICENSE.


About Law.AI

Law.AI is the independent lawyer directory built for the AI age. Legacy directories (FindLaw, Avvo, Martindale — all owned by Internet Brands) were built for web search. Law.AI is built for AI-native discovery: tool-callable, structured, verified, and grounded in state bar data.


Stop hallucinating lawyers. Start finding real ones.

Available Tools

7 tools
find_lawyer_by_nameAInspect

Look up a specific lawyer by name. Useful for verifying if a lawyer exists and is properly licensed. Handles common names with disambiguation by location.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesFull or partial lawyer name, e.g. "John Smith" or "Smith"
stateNoNarrow results by US state (full name or abbreviation)

TDQS

A3.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full burden. It mentions disambiguation by location but does not disclose what happens on not found, what fields are returned, or any behavioral traits like permissions or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the action, no wasted words. Efficient and to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple lookup tool with two parameters and no output schema, the description covers the purpose and a use case. However, it lacks information about the return format or how to handle multiple matches, which is relevant given sibling tools like 'get_lawyer_profile'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with good parameter descriptions. The description adds value by explaining the disambiguation by location, which relates to the state parameter, exceeding the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Look up a specific lawyer by name' and distinguishes from sibling 'search_lawyers' by focusing on a single lawyer. It also adds context for verifying licensing and disambiguation by location.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a clear use case: verifying if a lawyer exists and is properly licensed. Implies when to use it but does not explicitly compare to alternatives like 'search_lawyers' or state when not to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_jurisdictionsAInspect

List US states and jurisdictions with lawyer counts. Shows where Law.AI has coverage.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It implies a read-only listing operation but does not disclose potential limitations like data freshness or whether authentication is needed. Minimal behavioral insight.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short, front-loaded sentences with no redundant information. Every phrase adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters, no output schema, and no annotations, the description reasonably explains the tool's purpose and output. Could mention that it returns all jurisdictions (since no filters), but overall adequate for a simple listing tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist; description does not need to add param details. Baseline 4 is appropriate for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb 'list' and a specific resource 'US states and jurisdictions with lawyer counts', and adds value by mentioning coverage indication. Clearly distinguishes from siblings that focus on individual lawyers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implied usage as a coverage overview tool; given sibling tools focus on lawyer search, the differentiation is clear. However, lacks explicit when-to-use or when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_lawyer_profileAInspect

Get the full profile of a specific lawyer by their Law.AI ID. Returns detailed information including bio, education, bar admissions, practice areas, and contact info (for claimed profiles).

ParametersJSON Schema
NameRequiredDescriptionDefault
lawyer_idYesThe Law.AI lawyer profile ID

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses that contact info is only available for claimed profiles, which is a useful behavioral note. However, it doesn't mention rate limits, authentication, or other behaviors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loading the main purpose and then listing returned fields. Every part is necessary, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple profile retrieval tool with one parameter and no output schema, the description covers purpose, return content (bio, education, etc.), and a conditional (contact info for claimed profiles). It is missing error scenarios, but overall fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes the single parameter as 'The Law.AI lawyer profile ID' with 100% coverage. The description adds 'Law.AI ID' but this is redundant; it does not provide additional meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get', the resource 'full profile of a specific lawyer', and the identifier ('by their Law.AI ID'). It distinguishes from siblings like search_lawyers and find_lawyer_by_name by specifying retrieval by unique ID.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (need the lawyer ID) but does not explicitly state when not to use it or mention alternatives like find_lawyer_by_name for name-based lookup. The sibling list provides context, but the description lacks direct guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_practice_areasAInspect

List all practice areas available in the Law.AI directory with lawyer counts. Useful for discovering what types of lawyers are available.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations; description discloses that it lists practice areas with counts, but omits potential behavioral traits like auth requirements or response structure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences, front-loaded with action and result, no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Sufficient for a simple list-all tool with no params and no output schema; could mention sorting or filtering, but not required.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters; schema coverage is 100% trivially. Description adds context (lawyer counts) beyond empty schema, but baseline is adequate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb 'list' and resource 'practice areas' with added detail 'with lawyer counts'. Distinguishes from sibling tools that search for specific lawyers or profiles.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Mentions usefulness for discovering types of lawyers, but lacks explicit when-not-to-use or alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

match_lawyer_to_matterAInspect

Describe a legal issue in plain English and get matched with relevant lawyers. The tool classifies the issue into practice areas and returns ranked lawyer matches based on relevance, credentials, and location.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of matches to return (default 5, max 20)
budgetNoBudget level: "low", "medium", or "high"
urgencyNoHow urgent: "low", "medium", or "high"
locationNoWhere the issue is — state name/code, or "City, State" format, e.g. "Texas" or "Houston, TX"
descriptionYesPlain-English description of the legal issue, e.g. "My landlord won't return my security deposit" or "I was injured in a car accident"

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that the tool classifies the issue into practice areas and returns ranked matches, but does not mention side effects, auth needs, rate limits, or behavior when no match is found. This is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, concise and to the point. Every word contributes to understanding, with no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters and no output schema, the description covers the purpose and process but lacks details on the output format, such as what fields the matches contain or how to interpret the ranking. It is adequate for a straightforward match tool but could be more complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds minimal extra meaning beyond the schema's parameter descriptions. It states the overall process but does not enhance individual parameter semantics, such as what 'budget' or 'urgency' values mean in context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: describe a legal issue and get matched with relevant lawyers. It specifies classification into practice areas and ranking by relevance, credentials, and location, distinguishing it from sibling tools like search_lawyers or find_lawyer_by_name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for matching based on a legal issue, but does not explicitly state when to use this vs alternatives. It lacks guidance on when not to use it or what specific scenarios it is best suited for, though sibling tools provide context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_lawyersAInspect

Search the Law.AI directory of 537,000+ verified lawyer profiles. Filter by practice area, state, city, and bar status. Returns ranked results with claimed/verified profiles first.

ParametersJSON Schema
NameRequiredDescriptionDefault
cityNoCity name, e.g. "Chicago", "Houston"
limitNoNumber of results (default 10, max 50)
stateNoUS state — full name or abbreviation, e.g. "California" or "CA"
offsetNoPagination offset
bar_statusNoBar status filter: "Active" (default), "Inactive", or "Any"
practice_areaNoPractice area to search for, e.g. "Criminal Defense", "Personal Injury", "Family Law"

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states that results are ranked with claimed/verified profiles first, which is useful. However, it does not detail other behaviors such as default sorting order, whether partial matching is applied, or pagination behavior beyond parameter definitions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences that front-load the tool's action and resource, include key filtering options, and mention the ranking behavior. Every phrase adds value, with no redundancy or wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters, no output schema, and no annotations, the description covers the essential aspects: directory size, filtering options, and ranking. It lacks details on edge cases (e.g., empty results) or precise ordering, but for a search tool it provides sufficient context for an agent to understand its basic behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds marginal value by mentioning specific filterable parameters and providing example values (e.g., 'Criminal Defense' for practice_area). It does not elaborate on offset/limit further, but the schema already defines them clearly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: searching the Law.AI directory of verified lawyer profiles. It explicitly lists filtering dimensions (practice area, state, city, bar status) and mentions ranking behavior, distinguishing it from siblings like get_lawyer_profile (individual profile lookup) and find_lawyer_by_name (name-based search).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context by specifying when to use the tool (when filtering by practice area, state, city, bar status is needed). It implies this is the primary search tool for directory lookups. However, it does not explicitly mention when not to use it or list alternatives, though sibling tools are available for reference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 7 tool updatesv0.2.1
    • First observedfind_lawyer_by_name
    • First observedget_jurisdictions
    • First observedget_lawyer_profile
    • First observedget_legal_cost_estimate
    • First observedget_practice_areas
    • First observedmatch_lawyer_to_matter
    • First observedsearch_lawyers

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: searching, profiling, name lookup, practice areas, jurisdictions, natural language matching, and cost estimation. No overlap or ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., search_lawyers, get_lawyer_profile). No deviations.

Tool Count5/5

7 tools is well-scoped for a legal directory and matching service, covering search, profile, lookup, metadata, matching, and cost estimates without being too many or too few.

Completeness5/5

The tool set comprehensively covers the domain: finding lawyers by search, name, or natural language; retrieving profiles; exploring practice areas and jurisdictions; and estimating costs. No obvious gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to search and analyze legal documents from multiple jurisdictions including US federal and state law, case law, EU regulations, UK legislation, Canadian law, Congress bills, SEC filings, and FDA data through free government APIs.
    6
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables US case law search, citation parsing, practice management via Clio, and federal court filings through PACER.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides AI assistants with up-to-date legal documents from official sources, enabling accurate legal information retrieval and analysis.
    17
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/risk-ai/lawai-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server