Skip to main content
Glama
opensanctions-mcp
by scka-de

opensanctions-mcp

MCP server for sanctions screening and PEP checks via the OpenSanctions API.

Lets AI agents (Claude, Cursor, Windsurf, GPT) screen persons and companies against 320+ sanctions and PEP lists from OFAC, EU, UN, UK HMT, and more.

Disclaimer: This tool provides informational data only. It is not legal or compliance advice. Always verify matches with official sources before taking action.

Quick Start

Add to your MCP client config:

{
  "mcpServers": {
    "opensanctions": {
      "command": "npx",
      "args": ["-y", "opensanctions-mcp"],
      "env": {
        "OPENSANCTIONS_API_KEY": "your-key-here"
      }
    }
  }
}

Get a free API key at opensanctions.org/api.

Where to add this config

  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

  • Cursor: Settings > MCP Servers

  • Windsurf: ~/.windsurf/config.json

Related MCP server: mcp-sanctions-check

Tools

search_entities

Search the OpenSanctions database by name or keyword.

"Search for entities named Viktor Bout"
"Find companies related to Iran sanctions"

match_entity

Screen a person or company against sanctions and PEP lists using structured properties. This is the primary screening tool.

"Screen Viktor Bout, born 1967-01-13, Russian national, against sanctions lists"
"Check if Acme Corp is on any EU sanctions list"

get_entity

Fetch complete details for a specific entity, including relationships to other entities (companies, associates, family members).

"Get full details for entity NK-2Ciy8EG7jz1YHMGCxYLb25"

list_datasets

List available sanctions and PEP datasets. No API key required.

"What sanctions lists are available?"
"Show me EU-related datasets"

get_dataset

Get details about a specific dataset (publisher, entity count, last updated). No API key required.

"Tell me about the OFAC SDN list"

investigate_entity

Run a full compliance investigation in one call: match, fetch details, map relationships, and return structured data.

"Investigate Viktor Bout for sanctions exposure"
"Run a compliance check on Acme Corp, jurisdiction Belgium"

Configuration

Environment Variable

Required

Default

Description

OPENSANCTIONS_API_KEY

Yes*

—

API key for the hosted OpenSanctions API. Get one at opensanctions.org/api.

OPENSANCTIONS_API_URL

No

https://api.opensanctions.org

API URL. Set to your self-hosted yente instance.

OPENSANCTIONS_DATASET

No

default

Dataset to screen against. default includes all 320+ sources.

OPENSANCTIONS_MAX_RETRIES

No

3

Max retries for failed API calls.

DEBUG

No

—

Set to any value to enable debug logging.

*Not required for list_datasets, get_dataset, or when using a self-hosted yente instance without auth.

Self-hosted yente

If you run your own yente instance, point the server at it:

{
  "mcpServers": {
    "opensanctions": {
      "command": "npx",
      "args": ["-y", "opensanctions-mcp"],
      "env": {
        "OPENSANCTIONS_API_URL": "http://localhost:8000"
      }
    }
  }
}

No API key needed for self-hosted yente.

Development

git clone https://github.com/scka-de/opensanctions-mcp.git
cd opensanctions-mcp
npm install
npm test          # run tests (fixtures, no API key needed)
npm run build     # compile to dist/
npm run dev       # run in dev mode
npm run lint      # check code style

License

MIT

Available Tools

6 tools
get_datasetA

Get full details about a specific dataset: description, publisher, entity count, last updated, and coverage information. No API key required.

Use list_datasets first to find dataset names, then this tool for details.

Inputs: name (required).

get_entityA

Fetch complete details for a specific entity by ID, including all properties, dataset memberships, and relationships to other entities.

Use this after finding an entity via search or match to get the full picture: aliases, addresses, birth dates, related companies, family members, associates.

Relationships come from the OpenSanctions knowledge graph. Types include: ownershipOwner, familyRelative, associate, directorshipDirector, and more.

Inputs: entityId (required).

investigate_entityA

Run a multi-step compliance investigation on a person or company. This is the most powerful tool — it combines matching, entity details, and relationship traversal in one call.

Steps: (1) Match the name against sanctions/PEP lists, (2) Fetch full details and relationships for top matches, (3) Return structured data with scores, datasets, and connected entities.

Returns data only — no risk judgments. You (the AI) should interpret the scores, dataset memberships, and relationships to provide context to the user.

Requires both name and schema (Person/Company). Provide additional properties like birthDate or nationality for better match precision.

Inputs: name (required), schema (required), birthDate, nationality, +4 more.

list_datasetsA

List available sanctions and PEP datasets in OpenSanctions. No API key required.

Returns dataset names, titles, summaries, and entity counts. Use the optional query parameter to filter. Examples of datasets: "us_ofac_sdn" (US OFAC), "eu_fsf" (EU Financial Sanctions), "un_sc_sanctions" (UN Security Council), "gb_hmt_sanctions" (UK HMT).

Inputs: query.

match_entityA

Screen a person or company against sanctions and PEP (Politically Exposed Person) lists using structured properties.

This is the primary screening tool. Provide a schema type and properties for precise matching. The matching algorithm uses name comparison, birth dates, nationalities, and identifiers for scoring.

Scores: 0.0-1.0. Above 0.9 = very high confidence match. 0.7-0.9 = likely match, investigate further. Below 0.7 = possible but uncertain.

PEP = Politically Exposed Person (senior government officials, their families, close associates). PEP status appears in the "topics" property as "role.pep".

Inputs: schema (required), properties (required), dataset.

search_entitiesA

Search the OpenSanctions database by name or keyword. Returns matching entities ordered by relevance.

Use this for exploratory queries: "find entities named Goldman", "search for companies in Russia". For formal sanctions screening with confidence scores, use match_entity instead.

Results include entity type, datasets (which sanctions lists), and properties. For numeric match scores, use match_entity.

Inputs: query (required), schema, dataset, limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with minimal overlap: list_datasets enumerates datasets, get_dataset retrieves dataset details, search_entities performs keyword searches, match_entity conducts structured screening with scores, get_entity fetches full entity details, and investigate_entity runs comprehensive investigations. The descriptions explicitly differentiate them, such as noting that search_entities is for exploratory queries while match_entity is for formal screening.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case: list_datasets, get_dataset, search_entities, match_entity, get_entity, and investigate_entity. This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming conventions.

    Tool Count5/5

    With 6 tools, the server is well-scoped for its domain of sanctions and PEP data access. Each tool serves a specific function in the workflow, from listing and getting datasets to searching, matching, and investigating entities, without being overly sparse or bloated.

    Completeness5/5

    The tool set provides complete coverage for the OpenSanctions domain, including dataset enumeration (list_datasets, get_dataset), entity discovery (search_entities, match_entity), detailed retrieval (get_entity), and advanced analysis (investigate_entity). There are no obvious gaps; agents can perform full workflows from initial screening to in-depth investigation.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      AML Watcher MCP Server gives AI agents direct, real-time access to AML Watcher's proprietary sanctions, watchlist, and PEP databases. Connect your agentic workflows to 215+ sanctions regimes, 2.6M+ PEP profiles, and coverage across 235+ countries, no complex integrations required.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for OFAC SDN sanctions screening. Check names against US Treasury sanctions lists with automatic cache refresh. No API key needed for the check itself.
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server for U.S. public-records data, enabling AI agents to search business registrations, screen names against government watchlists, and pull federal awards.
      4
      47 npm
      MIT