Skip to main content
Glama
p-pouget

watch-materials-mcp

by p-pouget

watch-materials-mcp — Serveur MCP de veille scientifique en science des matériaux

Premier serveur Model Context Protocol (MCP) construit from scratch en JavaScript, branché sur Claude Desktop. Objectif : comprendre le protocole MCP de bout en bout et fournir un outil de veille technique souveraine sur la science des matériaux et les alliages.

Le serveur tourne en local (process Node.js, communication via stdio) et expose 5 tools que Claude découvre et orchestre automatiquement.


Pourquoi ce projet

Construire un serveur MCP minimal mais réel, qui :

  • couvre deux types de sources et donc deux formats de réponse : XML (ArXiv) et JSON (OpenAlex) ;

  • reste lisible et appropriable (code commenté, chaque tool autonome) ;

  • apporte une vraie valeur métier : croiser preprints et publications validées, et identifier qui publie où (angle souverain).


Related MCP server: arxiv-reader-mcp

Les deux sources

Source

Format

Nature

Particularité

ArXiv

XML (Atom)

Preprints (non validés par les pairs)

Parsing via fast-xml-parser

OpenAlex

JSON

Articles publiés (validés par les pairs)

Citations, institutions, accès libre

Travailler les deux formats était un objectif assumé : ArXiv impose un parsing XML (et son piège objet/tableau), OpenAlex se consomme directement en .json().


Les 5 tools

Tool

Source

Rôle

search_arxiv_materiaux

ArXiv

Recherche de preprints par matériau, triés par date

last_articles_arxiv_materiaux

ArXiv

Veille large : derniers preprints, tous matériaux confondus

search_openalex_materiaux

OpenAlex

Recherche d'articles publiés par matériau, info accès libre

last_articles_openalex_materiaux

OpenAlex

Veille large : dernières publications parues

intel_openalex_materiaux

OpenAlex

Recherche avancée : filtre par pays d'institution + choix du tri (citations ou date) — l'angle souverain


Installation

Cloner le dépôt puis installer les dépendances (déclarées dans package.json : dotenv, zod, @modelcontextprotocol/sdk, fast-xml-parser, @types/node) :

```bash git clone cd materials-mcp npm install ```

ℹ️ Le package.json contient "type": "module" : le SDK MCP fonctionne en ESM (import/export), pas en CommonJS.

Variable d'environnement

Créer un fichier .env à la racine :

OPENALEX_MAILTO=ton@email.fr

Le mailto n'est pas un secret : il sert à intégrer le polite pool d'OpenAlex (requêtes plus stables). Optionnel mais recommandé.


Branchement sur Claude Desktop

Dans claude_desktop_config.json (mcpServers à la racine, pas dans preferences) :

{
  "mcpServers": {
    "materials-mcp": {
      "command": "node",
      "args": ["CHEMIN_ABSOLU/watch-materials-mcp/src/server.js"]
    }
  }
}

Puis quitter Claude Desktop complétement et le relancer. Le serveur doit apparaître dans Réglages → Développeur avec le statut running.


Campagne de test réalisé

Test 1 — Recherche preprints par matériau

Requête : Cherche des preprints récents sur le titane Tool attendu : search_arxiv_materiaux Vérifier : tri par date, XML parsé (titre/auteurs/date/lien/résumé), ~10 résultats. Statut : Réussi

Test 2 — Veille large preprints

Requête : Donne-moi les 20 derniers preprints en science des matériaux Tool attendu : last_articles_arxiv_materiaux Vérifier : pas de filtre matériau, tri par date, 20 résultats. Statut : Réussi

Test 3 — Recherche publiés par matériau

Requête : Quels sont les articles publiés sur les superalliages ? Tool attendu : search_openalex_materiaux Vérifier : JSON, info accès libre affichée, reste dans le domaine matériaux. Statut : Réussi

Test 4 — Veille large publiés

Requête : Les dernières publications parues en science des matériaux Tool attendu : last_articles_openalex_materiaux Vérifier : pas de filtre matériau, info accès libre. (Voir la note OpenAlex ci-dessous.) Statut : Echec (Cause: API OpenAlex qui remonte des dates aberrantes)

Test 5 — Angle souverain (le test clé)

Requête : Quels articles sur le titane sont publiés par des labos français ? Tool attendu : intel_openalex_materiaux avec pays: "fr" Vérifier : filtre pays appliqué, institutions affichées, en-tête « pays = fr ». Statut : Réussi

Test 6 — Tri par citations explicite

Requête : Les articles les plus cités sur les alliages d'aluminium Tool attendu : intel_openalex_materiaux (triParCitations: true) Vérifier : tri par citations décroissant. Statut : Réussi


Note sur l'API OpenAlex (limite connue)

Le tool last_articles_openalex_materiaux (veille large triée par date) remonte des dépôts institutionnels (thèses, datasets) dont les métadonnées de date sont parfois erronées (publications datées 2029–2032 lors d'une recherche effectuée en 2026). Le tri par date s'en trouve pollué et le résultat est peu exploitable en l'état.

Ce n'est pas un bug du serveur : le code fait ce qui est demandé, c'est la qualité de la donnée source qui est en cause. La recherche ciblée par matériau (search_openalex_materiaux) contourne le problème en remontant des articles de revues sérieuses.

Piste d'amélioration : ajouter type:article au filtre pour exclure thèses et datasets.


Choix d'architecture

Le formatage des réponses est volontairement dupliqué dans chaque tool plutôt que factorisé dans un utilitaire commun. Ce choix assumé pour ce premier serveur privilégie l'apprentissage, la lisibilité et l'autonomie de chaque tool : on lit un tool de bout en bout sans naviguer entre fichiers.

La factorisation d'un formatResponse mutualisé est prévue pour le serveur suivant.


Stack

  • JavaScript (ESM) + Node.js

  • @modelcontextprotocol/sdk — protocole MCP

  • zod — validation des paramètres des tools

  • fast-xml-parser — parsing du XML d'ArXiv

  • dotenv — variable d'environnement (mailto OpenAlex)

  • Client : Claude Desktop (transport stdio)

Available Tools

5 tools
intel_openalex_materiauxA

Recherche avancée d'articles PUBLIÉS en science des matériaux sur OpenAlex (validés par les pairs). Permet de filtrer par pays d'institution (angle souverain : qui publie sur un sujet dans un pays donné) et de choisir le tri (par citations ou par date). Indique pour chaque article s'il est disponible en accès libre. Pour une recherche simple par matériau, utiliser le tool de recherche OpenAlex standard.

ParametersJSON Schema
NameRequiredDescriptionDefault
paysNoCode pays ISO 2 lettres pour filtrer par institution, ex: 'fr', 'us', 'de'. Si absent, tous pays confondus.
materiauYesLe matériau ou sujet recherché, ex: 'titanium alloy', 'superalloy'
maxResultsNoNombre de résultats à retourner (défaut 10)
triParCitationsNoSi true (défaut) trie par citations décroissant ; si false trie par date de publication décroissante.

TDQS

A3.9/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 mentions open access indication but lacks details on auth needs, rate limits, or other behavioral traits. Some transparency is present 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.

Conciseness4/5

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

The description is a single paragraph of three sentences, concise and front-loaded with key functionality. Slightly more structure could improve readability, but it is efficient.

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 output schema, the description explains function adequately for a search tool. It mentions open access indication but omits return value details. Overall sufficient for the complexity.

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 covers 100% of parameters. The description adds little beyond the schema, restating filtering and sorting options. Baseline score of 3 is appropriate as the description does not enrich parameter meaning.

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 it is for advanced search of peer-reviewed articles in materials science on OpenAlex, specifying filtering by country and sorting options. It distinguishes itself from a simpler search tool, fulfilling the specific verb+resource criterion.

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 explicitly mentions when to use advanced search and provides an alternative for simple search ('utiliser le tool de recherche OpenAlex standard'). It implies usage context but does not explicitly 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.

last_articles_arxiv_materiauxA

Récupère les derniers PREPRINTS parus en science des matériaux sur ArXiv (tous matériaux confondus, sans filtre), triés par date. Couvre les travaux émergents non encore validés par les pairs. Pour cibler un matériau précis, utiliser le tool de recherche ArXiv par matériau. Pour des articles PUBLIÉS en revues, utiliser les tools OpenAlex.

ParametersJSON Schema
NameRequiredDescriptionDefault
maxResultsNoNombre d'articles récents à retourner (défaut 30)

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 discloses the 'no filter' and sorting behavior but lacks details on pagination, rate limits, or any side effects. Since it's a read-only fetch, the missing info is not critical but still leaves gaps.

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 purpose and followed by usage guidelines. No unnecessary words or repetition.

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?

Tool is simple with one optional parameter and no output schema. Description explains what is returned (list of preprints sorted by date) but does not describe the output format or fields. Slight gap but not severely incomplete.

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 coverage is 100% for the single parameter maxResults, which already includes a description. Description does not add any additional meaning beyond the schema, so baseline 3 applies.

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?

Description clearly states verb 'Récupère', resource 'PREPRINTS', domain 'science des matériaux', and sorting by date. Distinguishes from siblings like search_arxiv_materiaux (specific material search) and last_articles_openalex_materiaux (published articles).

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

Usage Guidelines5/5

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

Explicitly tells when to use (emerging works) and when not to (for specific material, use search; for published articles, use OpenAlex tools). No ambiguity.

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

last_articles_openalex_materiauxA

Récupère les dernières publications PARUES en science des matériaux (articles publiés dans des revues, via OpenAlex), triées par date, tous matériaux confondus. Différent des tools ArXiv qui retournent des preprints non encore validés : ici ce sont des articles parus. Indique pour chaque article s'il est disponible en accès libre. Pour une recherche ciblée par matériau, utiliser le tool de recherche OpenAlex.

ParametersJSON Schema
NameRequiredDescriptionDefault
maxResultsNoNombre d'articles récents à retourner (défaut 30)

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the tool returns published articles (not preprints), sorted by date, and indicates open access status. It does not mention rate limits or auth, but for a read-only retrieval tool, the core behavioral traits are covered. A score of 4 is appropriate as it adds value beyond the name.

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 concise with three sentences. The first sentence states the main purpose, the second distinguishes from siblings, and the third gives a usage hint. 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?

Given the simplicity (one optional param, no output schema, no annotations), the description covers purpose, usage, and distinction adequately. It could mention return format but is otherwise complete for agent decision-making.

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 single parameter maxResults is fully described in the input schema (default 30). The tool description does not add additional meaning beyond the schema. With 100% schema coverage, baseline 3 is appropriate.

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 it retrieves the latest published articles in materials science via OpenAlex, sorted by date, covering all materials. It explicitly distinguishes from ArXiv tools (preprints) and mentions the open access indicator. The verb 'Récupère' and resource are specific.

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

Usage Guidelines5/5

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

The description explicitly tells when to use (latest published articles in materials science) and when not to use (for preprints, use ArXiv tools; for targeted material search, use search OpenAlex tool). It provides clear alternatives.

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

search_arxiv_materiauxA

Recherche des PREPRINTS récents sur ArXiv (recherche non encore validée par les pairs) dans le domaine des matériaux et alliages, filtrés par un matériau précis (fer, nickel, cobalt, aluminium, chrome, titane...). À utiliser pour explorer les travaux émergents sur un matériau donné. Pour des articles PUBLIÉS et validés, utiliser plutôt les tools OpenAlex.

ParametersJSON Schema
NameRequiredDescriptionDefault
materiauYesLe matériau ou alliage recherché, ex: 'titanium', 'nickel alloy'
maxResultsNoNombre de résultats à retourner (défaut 10)

TDQS

A4.5/5.0
Behavior4/5

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

Discloses that the tool searches preprints not yet peer-reviewed, which is a key behavioral trait. No annotations exist, so description carries the burden; it could mention authorization or rate limits but overall adequate.

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

Conciseness4/5

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

Two concise sentences that front-load the tool's purpose. Could be slightly more structured, but every sentence contributes meaningfully without repetition.

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 output schema, the description could elaborate on return format, but the core function is clear. Context of usage and alternative tools are provided, making it fairly complete for a search 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?

Schema coverage is 100% so baseline 3. The description adds an example for 'materiau' ('titanium', 'nickel alloy') beyond the schema description, helping interpretation. maxResults is documented in schema but not elaborated in description, yet still adds value.

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 specifies a concrete action (search for recent preprints on ArXiv) and a distinct domain (materials and alloys), differentiating it from sibling tools like search_openalex_materiaux. It uses a specific verb and resource.

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

Usage Guidelines5/5

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

Explicitly states when to use (exploring emerging work on a material) and when not to use (for published articles, use OpenAlex tools). Clearly guides the agent toward alternative sibling tools.

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

search_openalex_materiauxA

Recherche des articles PUBLIÉS en science des matériaux sur OpenAlex (validés par les pairs), filtrés par un matériau précis et triés par nombre de citations. Indique pour chaque article s'il est disponible en accès libre. À utiliser pour les références établies sur un matériau donné. Pour des travaux émergents non encore publiés, utiliser les tools ArXiv (preprints).

ParametersJSON Schema
NameRequiredDescriptionDefault
materiauYesLe matériau ou sujet recherché, ex: 'titanium alloy', 'superalloy'
maxResultsNoNombre de résultats à retourner (défaut 10)

TDQS

A4.5/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that results are peer-reviewed, sorted by citations, and open access status indicated. However, it does not mention rate limits, authentication, or error handling.

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 concise with two sentences, front-loaded with purpose and usage context, no wasted words.

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

Completeness5/5

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

Given no output schema and two parameters, the description is complete: explains source, filtering, sorting, access indication, and provides usage guidance and sibling differentiation.

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 coverage is 100%, so schema already describes both parameters. Description adds no extra semantic information beyond what the schema provides.

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 it searches for published, peer-reviewed articles in materials science on OpenAlex, filtered by material, sorted by citations, and indicates open access. It distinguishes from sibling tools like ArXiv for preprints.

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

Usage Guidelines5/5

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

Explicitly says to use for established references on a material, and for emerging works to use ArXiv tools, providing clear when-to-use and 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.

Tool Schema Changelog

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

  1. 5 tool updatesv1.0.0
    • First observedintel_openalex_materiaux
    • First observedlast_articles_arxiv_materiaux
    • First observedlast_articles_openalex_materiaux
    • First observedsearch_arxiv_materiaux
    • First observedsearch_openalex_materiaux

TDQS

A4.3/5.0

Scored across 5 tools

Disambiguation5/5

Each tool clearly targets a specific source (ArXiv vs OpenAlex) and operation (search, recent, advanced), with descriptions emphasizing their distinct roles. There is no overlap in purpose.

Naming Consistency5/5

All tool names follow a consistent pattern: verb_prefix_source_materiaux (e.g., search_arxiv_materiaux, last_articles_openalex_materiaux). The pattern is predictable and uniform.

Tool Count5/5

With 5 tools, the server is well-scoped for its domain (materials science literature). It covers the essential operations (search, recent, advanced) for two key sources without being excessive or insufficient.

Completeness4/5

The tool set covers searching and retrieving recent articles from both ArXiv and OpenAlex, plus an advanced search for OpenAlex. Minor gaps exist (e.g., no direct retrieval by ID, no author-based search), but core workflows are complete.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A MCP server for academic literature retrieval, aggregating multiple data sources like arXiv, Crossref, OpenAlex, PubMed, and Semantic Scholar to provide search, details, citations, trends, and recommendations.
    4
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for discovering, triaging, and monitoring arXiv papers with transparent interest modeling and inspectable ranking.
    MIT