MCP Server

Setup guide and tool reference for the TEA Techniques MCP server

What is MCP?

The Model Context Protocol (MCP) is an open standard that lets AI assistants like Claude connect to external data sources. The TEA Techniques MCP server gives Claude direct access to our knowledge graph—enabling conversational discovery of all TEA techniques.

Why Use the MCP Server?

Instead of manually browsing pages or writing API queries, you can ask an AI agent questions in natural language:

TaskManual ApproachWith MCP
Find fairness techniques for neural networksBrowse categories, filter manually, read each page"Find fairness techniques that work with neural networks"
Compare SHAP vs LIMEOpen two tabs, compare side by side"Compare SHAP and LIME and help me evaluate which is the best one for my use case"
Find evidence for an assurance claimSearch docs, map techniques to claims"What techniques support the claim that our model treats all groups fairly?"
Explore related techniquesFollow links manually"What techniques are related to SHAP?"

How It Works

Architecture diagram showing Claude connected to MCP Server which fetches from the Knowledge Graph

The MCP server runs locally on your machine and provides 10 tools that Claude can call. When you ask a question, Claude selects the appropriate tools, the server queries the knowledge graph, and Claude synthesises the results into a helpful response.

Quick Start

No installation needed — run directly with npx:

Shell
npx @chrisdburr/tea-techniques-mcp

Add to your project's .mcp.json:

JSON
{
  "mcpServers": {
    "tea-techniques": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@chrisdburr/tea-techniques-mcp"]
    }
  }
}

After configuring, restart Claude. You should see 10 tools prefixed with mcp__tea-techniques__.

First-use setup

On first run, the server fetches the knowledge graph and its precomputed vectors from GitHub Pages and caches them locally for 24 hours. Semantic search also downloads the MiniLM-L12 embedding model (about 130 MB) from Hugging Face the first time you ask for techniques for a claim. The model needs the package's optional dependencies (@huggingface/transformers and onnxruntime-node, installed by default); without them, or if the download fails, the server falls back to keyword search.

Local development (from source)

If you want to contribute or run from the monorepo:

Shell
git clone https://github.com/alan-turing-institute/tea-techniques.git
cd tea-techniques/mcp-server
pnpm install

Then use npx tsx ./mcp-server/src/index.ts as the command in your MCP config, with --local to load data from project files instead of fetching remotely.


Workflow Examples

Discovering Techniques for a Use Case

Scenario: Building a credit scoring model that needs explainable decisions

You: I'm building a credit scoring model using gradient boosting. What techniques can help me explain individual decisions to applicants?

Claude uses find_techniques with goals=["explainability"], tags=["tree-based"]

Claude: Based on your needs, here are relevant techniques:

  • SHAP — Quantifies each feature's contribution using game-theoretic principles.
  • LIME — Creates simple local explanations by approximating the model.
  • Permutation Importance — Measures feature importance by shuffling values.

You: How do SHAP and LIME compare?

Claude uses compare_techniques with slugs=["shapley-additive-explanations", "local-interpretable-model-agnostic-explanations"]

Claude: SHAP provides theoretically grounded explanations with consistency guarantees but is more computationally expensive. LIME is simpler and faster but may produce less stable explanations.

Building Assurance Evidence

Scenario: Demonstrating your model doesn't discriminate

You: What types of evidence can fairness techniques produce?

Claude uses find_evidence_types

Claude: Fairness techniques can produce:

  • Fairness metrics (16 techniques) — Demographic parity, equalised odds
  • Quantitative metrics (98 techniques) — Statistical measures of behaviour
  • Qualitative reports (15 techniques) — Human review and documentation

You: Show me techniques that produce fairness metrics for neural networks.

Claude uses find_techniques with goals=["fairness"], tags=["neural-network", "quantitative-metric"]

Research and Exploration

Scenario: Understanding the AI assurance landscape

You: Give me an overview of the TEA Techniques knowledge graph.

Claude uses get_knowledge_graph_summary

Claude: The knowledge graph contains 121 techniques across 7 assurance goals, with 456 academic resources and 194 tags in a hierarchical taxonomy.

You: Which goal has the most techniques?

Claude uses coverage_statistics with dimension="goals"

Claude: Reliability has the most coverage (75 techniques), followed by Transparency (69) and Fairness (61). Privacy has the least (11).


Tool Reference

Discovery Tools

Tools for finding and exploring techniques.

find_techniques

Primary Search

Search and filter techniques by query text, assurance goals, and tags.

ParameterTypeDescription
querystringFree-text search across names and descriptions
goalsstring[]Filter by goal slugs (e.g. ["explainability", "fairness"])
tagsstring[]Filter by tag fragments (e.g. ["model-agnostic", "tabular"])
limitnumberMax results (default 20)

get_technique

Detail View

Get full details of a technique: goals, tags, use cases, limitations, related techniques, and resources.

ParameterTypeDescription
slugstringTechnique slug (e.g. shapley-additive-explanations)

compare_techniques

Side-by-Side

Compare 2-5 techniques across goals, tags, and resources.

ParameterTypeDescription
slugsstring[]Array of 2-5 technique slugs

Exploration

Find techniques related via explicit links, shared goals, or shared tags.

ParameterTypeDescription
slugstringTechnique slug to find relatives for
depthnumber1 = explicit + same-goal, 2 = also same-tag (default 1)

Platform Integration Tools

Tools for connecting techniques to assurance arguments.

suggest_techniques_for_claim

Claim Matching

Given an assurance claim, suggest relevant techniques using embedding-based semantic search with hybrid RRF ranking.

ParameterTypeDescription
claimstringAssurance claim text (e.g. "the model treats all groups fairly")
modelTypestringModel type context (e.g. neural-network)
dataTypestringData type context (e.g. tabular)
lifecycleStagestringLifecycle stage (e.g. model-development)
excludeModelTypesstring[]Exclude techniques for these model architectures
queryEmbeddingobjectOptional. model (the catalogue's model id) and vector (the claim embedded as a query by that model), for the semantic search

Each result has the technique's slug, name, a one-sentence summary (at most 200 characters), its goals and tags, a score and a url. The response also has semanticUsed, which is true when the semantic search contributed to the ranking and false when the result comes from keyword matching alone.

Where the question vector comes from. The stdio server embeds the claim itself with MiniLM-L12 and compares it with the published MiniLM vectors, so you do not need queryEmbedding. A caller that has its own embeddings can send one: it is used instead of the built-in model, but only if model equals the model id of the loaded vectors, the vector has the right number of values (at most 4096), every value is a finite number, and the vector is not all zeros. Otherwise the search falls back to keywords and semanticUsed is false.

The HTTP service. The offline HTTP image runs no embedding model. It holds vectors made by Qwen3-Embedding-4B, which is too large to run in the stdio server, and expects the caller to send queryEmbedding. GET /embedding-spec returns the model id, dimensions, query prefix and document format, with four probe sentences and their vectors, so a caller can embed the same sentences with its own copy of the model and confirm that its vectors match before it sends any.


find_evidence_types

Evidence Discovery

Explore what types of evidence techniques can produce, with example techniques for each type.

No parameters required.


Research Tools

Tools for analysing the dataset and finding resources.

explore_taxonomy

Navigation

Navigate the hierarchical tag taxonomy. Call with no path to see top-level categories.

ParameterTypeDescription
pathstringTag path to explore (e.g. applicable-models)
includeTechniquesbooleanInclude technique names for each tag

coverage_statistics

Analysis

Analyse dataset coverage across a chosen dimension.

ParameterTypeDescription
dimensionenumOne of: goals, tags, lifecycle, evidence, model-types, complexity, cross-goal

search_resources

Literature

Search academic resources (papers, software, documentation).

ParameterTypeDescription
querystringFree-text search across titles, abstracts, and authors
typeenumFilter by type: technical_paper, software_package, documentation, tutorial
techniquestringFilter by technique slug to get its cited resources
limitnumberMax results (default 20)

get_knowledge_graph_summary

Overview

High-level statistics: entity counts and relationship counts across the entire graph.

No parameters required.


Data Source

The server fetches from the public knowledge graph:

https://alan-turing-institute.github.io/tea-techniques/data/ld/graph.jsonld

The vectors for semantic search come from the file beside it, https://alan-turing-institute.github.io/tea-techniques/data/ld/embeddings.json. The website build makes that file from the graph it publishes and checks, before it publishes either, that the file's corpus hash equals the graph's.

Data is cached locally in ~/.cache/tea-techniques-mcp/ for 24 hours. Use --local to load from project files during development:

Shell
npx tsx mcp-server/src/index.ts --local

A clone holds the graph but not the vectors file. To use semantic search with --local, make the file first with the MiniLM command under "Regenerating the vectors" in the package README. Without the file the server uses keyword search and says so in its log.