You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+92-24Lines changed: 92 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,45 +1,60 @@
1
1
# MCP (Model Context Protocol) server for Dataverse
2
2
3
-
Credits: this work is funded by [SSHOC-NL](https://sshoc.nl) project developing [Semantic Croissant](https://docs.google.com/document/d/1fi9Lb6x5Wm0L9CZftqjSGElV_ifcSW_IT-H8ZlpbrtQ/edit?tab=t.0). First version of [Croissant ML](https://docs.mlcommons.org/croissant/docs/croissant-spec.html) export for Dataverse was implemented by Phil Durbin (Harvard IQSS) and Slava Tykhonov (DANS-KNAW).
3
+
Credits: this work is funded by the [SSHOC-NL](https://sshoc.nl) project developing [Semantic Croissant](https://docs.google.com/document/d/1fi9Lb6x5Wm0L9CZftqjSGElV_ifcSW_IT-H8ZlpbrtQ/edit?tab=t.0). The first version of [Croissant](https://docs.mlcommons.org/croissant/docs/croissant-spec.html) export for Dataverse was implemented by Philip Durbin (Harvard IQSS) and Slava Tykhonov (DANS-KNAW).
4
4
5
-
If you don't know what Croissant ML is — it's a special language for machines, built on top of Schema.org. With Croissant, we aim to solve multilingual challenges and finally speak the same language across the planet.
5
+
Croissant is a special language for machines, built on top of Schema.org. With Croissant, we aim to solve multilingual challenges and finally speak the same language across the planet.
6
6
Even if it's artificial.
7
7
8
-
Installation:
8
+
## Getting started with mcp.dataverse.org
9
+
10
+
When getting started, we recommend the public MCP server for Dataverse at <https://mcp.dataverse.org>. (Below you'll also find instructions on how to run the MCP server locally.) You can visit https://mcp.dataverse.org/tools for an inventory of available tools.
11
+
12
+
You will need an MCP client with AI agent support such as [Cursor](https://www.cursor.com), [Visual Studio Code](https://code.visualstudio.com), [Windsurf Editor](https://windsurf.com), or [Zed](https://zed.dev).
13
+
14
+
### (Optional) Command line test
15
+
16
+
Before you get too far into configuring your MCP client, you could try this quick test to get information about a dataset by passing its DOI.
17
+
9
18
```
10
-
cp .env-sample .env
11
-
docker-compose build
12
-
docker-compose up -d
19
+
curl -X POST "https://mcp.dataverse.org/tools/get_croissant_record" -H "Content-Type: application/json" -d '{"doi":"doi:10.7910/DVN/WGCRY7"}'
13
20
```
14
21
15
-
Go to http://127.0.0.1:8000/tools to get an overview of available tools. We have also deployed official Dataverse MCP server on https://mcp.dataverse.org
22
+
### Configuring your MCP Client
23
+
24
+
You'll be using https://mcp.dataverse.org/sse as the URL and SSE (Server-Sent Events) as the type of MCP server.
25
+
26
+
Click the arrow to expand instructions for your MCP client.
27
+
28
+
<details><summary>Cursor</summary>
29
+
30
+
Create a configuration file for Cursor at [~/.cursor/mcp.json](https://docs.cursor.com/context/model-context-protocol):
16
31
17
-
You can register MCP in Cursor, Visual Studio or Windsurf Editor, or other IDE with AI Agents support. For example, create configuration file for Cursor [~/.cursor/mcp.json](https://docs.cursor.com/context/model-context-protocol):
18
32
```
19
33
{
20
34
"mcpServers": {
21
35
"Croissant": {
22
-
"url": "http://127.0.0.1:8000/sse",
36
+
"url": "https://mcp.dataverse.org/sse",
23
37
"headers": {
24
38
"Content-Type": "application/json"
25
39
}
26
40
}
27
-
}
41
+
}
28
42
}
29
43
```
30
44
31
-
To register this MCP server in Visual Studio Code ([official docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)), open settings and search for "mcp". Click the link "edit in settings.json" under "Model Context Protocol server configurations" and paste the "mcp-dataverse" objects below, which are shown in a simplified version of that configuration file.
45
+
Ensure that "auto" is selected as the agent.
46
+
</details>
47
+
48
+
<details><summary>Visual Studio Code</summary>
49
+
50
+
To register the MCP server in Visual Studio Code ([official docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)), open settings and search for "mcp". Click the link "edit in settings.json" under "Model Context Protocol server configurations" and paste the "mcp-dataverse" object below, which is shown in a simplified version of that configuration file.
32
51
33
52
```
34
53
{
35
54
...
36
55
"mcp": {
37
56
"servers": {
38
-
"mcp-dataverse-local": {
39
-
"type": "sse",
40
-
"url": "http://127.0.0.1:8000/sse"
41
-
},
42
-
"mcp-dataverse-remote": {
57
+
"mcp-dataverse": {
43
58
"type": "sse",
44
59
"url": "https://mcp.dataverse.org/sse"
45
60
}
@@ -51,20 +66,57 @@ To register this MCP server in Visual Studio Code ([official docs](https://code.
51
66
52
67
Next, click "view", then "open chat". Choose "Agent" in the dropdown that offers "Ask", "Edit", and "Agent".
53
68
54
-
Your new MCP servers should be configured for use but you can check if they are enabled or disable one of them by clicking the "select tools" icon (just below the chat input area) and scrolling down to them (here you can also try the "add more tools" button).
69
+
Your new MCP server should be configured for use but you can check if it are enabled by clicking the "select tools" icon (just below the chat input area) and scrolling down (here you can also try the "add more tools" button).
70
+
</details>
71
+
72
+
<details><summary>Windsurf</summary>
55
73
56
-
Continue with the instructions below about what to try typing to the agent.
74
+
As explained in the [Windsurf docs](https://docs.windsurf.com/windsurf/cascade/mcp), configure
75
+
`~/.codeium/windsurf/mcp_config.json` with the following.
57
76
58
-
## Test Croissant ML support for Dataverse
59
77
```
60
-
curl -X POST "http://localhost:8000/tools/get_croissant_record" -H "Content-Type: application/json" -d '{"doi":"doi:10.7910/DVN/WGCRY7"}'
78
+
{
79
+
"mcpServers": {
80
+
"mcp-dataverse": {
81
+
"serverUrl": "https://mcp.dataverse.org/sse"
82
+
}
83
+
}
84
+
}
85
+
```
86
+
</details>
87
+
88
+
<details><summary>Zed</summary>
89
+
90
+
As explained in the [Zed docs](https://zed.dev/docs/ai/mcp), add the following to `settings.json` (the `...` indicates there are probably additional lines in your file):
Here are some suggested examples to use when chatting with the MCP server.
114
+
115
+
#### Explore a dataset
64
116
65
117
Type in the chat of Agent:
66
118
```
67
-
Connect to MCP server running on http://127.0.0.1:8000 and explore all tools with curl command.
119
+
Connect to the MCP server running at https://mcp.dataverse.org and explore all tools using the curl command.
68
120
69
121
Explore dataset doi:10.7910/DVN/6TFFPG
70
122
```
@@ -77,11 +129,12 @@ This dataset contains experimental data from research on Nitrogen-Vacancy (NV) c
77
129
It includes data shown in both the main text and supplemental material of the associated scientific paper
78
130
The research focuses on photoluminescence spectra at low magnetic fields
79
131
```
80
-
## Multilingual support
132
+
133
+
#### Multilingual support
81
134
82
135
Let's connect to a dataset in Dutch and ask questions in English. Example dataset is taken from [DANS Archaelogy Data Station](https://archaeology.datastations.nl/dataset.xhtml?persistentId=doi:10.17026/AR/IQZTRX):
83
136
```
84
-
give me overview of doi:10.17026/dans-xv2-dsx6
137
+
give me an overview of doi:10.17026/dans-xv2-dsx6
85
138
```
86
139
The response in English:
87
140
```
@@ -130,3 +183,18 @@ Historical geography
130
183
Environmental studies
131
184
Cultural heritage management
132
185
```
186
+
187
+
## Local installation
188
+
189
+
```
190
+
cp .env-sample .env
191
+
docker-compose build
192
+
docker-compose up -d
193
+
```
194
+
195
+
Go to http://127.0.0.1:8000/tools to get an overview of available tools.
196
+
197
+
### Test Croissant support for Dataverse
198
+
```
199
+
curl -X POST "http://localhost:8000/tools/get_croissant_record" -H "Content-Type: application/json" -d '{"doi":"doi:10.7910/DVN/WGCRY7"}'
0 commit comments