ResearchTwin MCP Server

Federated platform for researcher digital twins and scientific discovery

README.md

ResearchTwin: Federated Agentic Web of Research Knowledge

ResearchTwin is an open-source, federated platform that transforms a researcher's publications, datasets, and code repositories into a conversational Digital Twin. Built on a Bimodal Glial-Neural Optimization (BGNO) architecture, it enables dual-discovery where both humans and AI agents collaborate to accelerate scientific discovery.

Live at researchtwin.net | Join the Network


Project Vision

The exponential growth of scientific outputs has created a "discovery bottleneck." Traditional static PDFs and siloed repositories limit knowledge synthesis and reuse. ResearchTwin addresses this by:

  • Integrating multi-modal research artifacts from Semantic Scholar, Google Scholar, GitHub, and Figshare
  • Computing a real-time S-Index metric (Quality × Impact × Collaboration) across all output types
  • Providing a conversational chatbot interface for interactive research exploration
  • Exposing an Inter-Agentic Discovery API with Schema.org types for machine-to-machine research discovery
  • Enabling a federated, Discord-like architecture supporting local nodes, hubs, and hosted edges

Architecture Overview

BGNO (Bimodal Glial-Neural Optimization)

Data Sources          Glial Layer          Neural Layer         Interface
┌──────────────┐    ┌─────────────┐    ┌──────────────┐    ┌────────────┐
│Semantic Scholar│───▶│             │    │              │    │  Web Chat  │
│Google Scholar │───▶│  SQLite     │───▶│  RAG with    │───▶│  Discord   │
│GitHub API     │───▶│  Cache +    │    │  Claude API  │    │  Agent API │
│Figshare API   │───▶│  Rate Limit │    │              │    │  Embed     │
└──────────────┘    └─────────────┘    └──────────────┘    └────────────┘
  • Connector Layer: Pulls papers (S2+GS with deduplication), repos (GitHub), datasets (Figshare), and ORCID metadata
  • Glial Layer: SQLite caching with 24h TTL, rate limiting, S2+GS title-similarity merge (0.85 threshold)
  • Neural Layer: RAG with Claude — context assembly, prompt engineering, conversational synthesis
  • Interface Layer: D3.js knowledge graph, chat widget, Discord bot, REST API

Federated Network Tiers

Tier Name Description Status
Tier 1 Local Nodes Researchers run python run_node.py locally Live
Tier 2 Hubs Lab aggregators federating multiple nodes Planned
Tier 3 Hosted Edges Cloud-hosted at researchtwin.net Live

Inter-Agentic Discovery API

Machine-readable endpoints with Schema.org @type annotations:

Endpoint Schema.org Type Purpose
GET /api/researcher/{slug}/profile Person Researcher profile with HATEOAS links
GET /api/researcher/{slug}/papers ItemList of ScholarlyArticle Papers with citations
GET /api/researcher/{slug}/datasets ItemList of Dataset Datasets with QIC scores
GET /api/researcher/{slug}/repos ItemList of SoftwareSourceCode Repos with QIC scores
GET /api/discover?q=keyword&type=paper SearchResultSet Cross-researcher search

Getting Started

Hosted (Tier 3) — Zero Setup

  1. Visit researchtwin.net/join.html
  2. Register with your name, email, and research identifiers
  3. Your Digital Twin is live immediately

Local Node (Tier 1) — Full Control

git clone https://github.com/martinfrasch/researchtwin.git
cd researchtwin
pip install -r backend/requirements.txt
cp node_config.json.example node_config.json
# Edit node_config.json with your details
python run_node.py --config node_config.json

Docker Deployment

cp .env.example .env  # Add your API keys
docker-compose up -d --build

Required API keys: ANTHROPIC_API_KEY (for Claude RAG) Optional: S2_API_KEY, GITHUB_TOKEN, DISCORD_BOT_TOKEN, SMTP credentials


Repository Structure

researchtwin/
├── backend/
│   ├── main.py              # FastAPI endpoints (REST + Discovery API)
│   ├── researchers.py        # SQLite researcher CRUD + token management
│   ├── database.py           # SQLite schema, WAL mode, migrations
│   ├── models.py             # Pydantic models for all endpoints
│   ├── rag.py                # RAG context assembly for Claude
│   ├── qic_index.py          # S-Index / QIC computation engine
│   ├

Tools 5

get_researcher_profileRetrieves a researcher's profile and metadata.
get_researcher_papersFetches a list of scholarly articles and citations for a researcher.
get_researcher_datasetsRetrieves datasets associated with a researcher including QIC scores.
get_researcher_reposFetches software source code repositories for a researcher.
discover_researchPerforms a cross-researcher search for papers or datasets based on keywords.

Environment Variables

ANTHROPIC_API_KEYrequiredAPI key for Claude RAG operations
S2_API_KEYAPI key for Semantic Scholar
GITHUB_TOKENGitHub personal access token
DISCORD_BOT_TOKENToken for Discord bot integration

Try it

Find the most impactful papers published by [Researcher Name] in the last two years.
Compare the dataset quality scores between [Researcher A] and [Researcher B].
Search for recent research papers related to 'Bimodal Glial-Neural Optimization'.
List all GitHub repositories associated with [Researcher Name] and summarize their impact.

Frequently Asked Questions

What are the key features of ResearchTwin?

Integrates multi-modal research artifacts from Semantic Scholar, Google Scholar, GitHub, and Figshare.. Computes real-time S-Index metrics based on quality, impact, and collaboration.. Provides a conversational RAG interface for interactive research exploration.. Exposes an Inter-Agentic Discovery API using Schema.org types.. Supports a federated architecture for local nodes and lab-based hubs..

What can I use ResearchTwin for?

Researchers synthesizing knowledge across disparate publication and code repositories.. AI agents performing automated literature reviews and cross-disciplinary discovery.. Lab managers aggregating research outputs from multiple team members into a single hub.. Developers looking to integrate machine-readable research profiles into custom applications..

How do I install ResearchTwin?

Install ResearchTwin by running: git clone https://github.com/martinfrasch/researchtwin.git && cd researchtwin && pip install -r backend/requirements.txt

What MCP clients work with ResearchTwin?

ResearchTwin works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep ResearchTwin docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare