File size: 2,625 Bytes
d6b2a9a
714d5dd
d6b2a9a
 
 
 
 
 
714d5dd
d6b2a9a
 
 
 
229c8f6
d6b2a9a
250d62e
d6b2a9a
250d62e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229c8f6
250d62e
 
 
229c8f6
250d62e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
---
title: MCP Research
emoji: πŸš€
colorFrom: red
colorTo: red
sdk: docker
app_port: 8501
tags:
- streamlit
pinned: false
short_description: Streamlit template space
---

# AI-Powered Scientific Research Companion

Welcome to your AI-driven research assistantβ€”hosted as a Hugging Face Space!

---

## πŸš€ Live Demo

πŸ‘‰ https://huggingface.co/spaces/your-username/MCP_Research

---

## Features

- πŸ” **One-Click Discovery**  
  Search academic articles, preprints, and the open web via MCP servers (`pskill9/web-search`, `metatool-ai/metatool-app`).

- πŸ““ **Reproducible Notebook**  
  Fetch and run code snippets for core experiments using a Python-run MCP sandbox.

- πŸ”— **Interactive Knowledge Graph**  
  Build and explore concept‐and‐method graphs via a vector-store MCP (Chroma).

- πŸ› οΈ **Provenance Tracking**  
  Store metadata and execution history in a SQL database via MCP.

- 🎨 **Light & Dark Themes**  
  Toggle UI themes for day/night readability.

---

## πŸ”§ Setup

1. **Fork or Clone**  
   ```bash
   git clone https://huggingface.co/spaces/your-username/MCP_Research.git
   cd MCP_Research
Configure Endpoints
Copy and edit config.example.yaml β†’ config.yaml:

yaml
Copy code
mcp_servers:
  web_search:  http://localhost:3000
  pubmed:      http://localhost:3001
  chroma:      http://localhost:3002
  python_run:  http://localhost:3003
db_url:       sqlite:///embeddings.db
Install Dependencies

bash
Copy code
pip install -r requirements.txt
Run Locally (optional)

bash
Copy code
streamlit run app.py --server.port 8501 --server.address 0.0.0.0
πŸ“¦ Deployment on Hugging Face
Create a New Space

Choose Streamlit as the runtime.

Push your repo to the Space.

Environment Variables / Secrets
In your Space’s Settings β†’ Secrets, add any API keys or credentials required by your MCP endpoints.

Automatic Build & Launch
HF will install from requirements.txt and launch app.py automatically.

πŸ“ Project Layout
arduino
Copy code
β”œβ”€β”€ .gitignore
β”œβ”€β”€ README.md
β”œβ”€β”€ config.yaml
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ app.py
β”œβ”€β”€ orchestrator/
β”‚   β”œβ”€β”€ client.py
β”‚   β”œβ”€β”€ dispatcher.py
β”‚   └── provenance.py
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ sidebar.py
β”‚   β”œβ”€β”€ paper_list.py
β”‚   β”œβ”€β”€ notebook_view.py
β”‚   └── graph_view.py
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ ingest.py
β”‚   └── reindex.py
└── demo.ipynb
🀝 Contribute
⭐ Star this Space

πŸ› Report issues or suggest features

πŸ”€ Submit PRs β€” we welcome enhancements and new MCP integrations!

πŸ“œ License
MIT Β© 2025