Skip to content

Commit 2cbcedd

Browse files
committed
Merge branch 'main' into navigator
2 parents 27816de + 184e8fe commit 2cbcedd

1 file changed

Lines changed: 92 additions & 24 deletions

File tree

README.md

Lines changed: 92 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,60 @@
11
# MCP (Model Context Protocol) server for Dataverse
22

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).
44

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.
66
Even if it's artificial.
77

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+
918
```
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"}'
1320
```
1421

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):
1631

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):
1832
```
1933
{
2034
"mcpServers": {
2135
"Croissant": {
22-
"url": "http://127.0.0.1:8000/sse",
36+
"url": "https://mcp.dataverse.org/sse",
2337
"headers": {
2438
"Content-Type": "application/json"
2539
}
2640
}
27-
}
41+
}
2842
}
2943
```
3044

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.
3251

3352
```
3453
{
3554
...
3655
"mcp": {
3756
"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": {
4358
"type": "sse",
4459
"url": "https://mcp.dataverse.org/sse"
4560
}
@@ -51,20 +66,57 @@ To register this MCP server in Visual Studio Code ([official docs](https://code.
5166

5267
Next, click "view", then "open chat". Choose "Agent" in the dropdown that offers "Ask", "Edit", and "Agent".
5368

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>
5573

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.
5776

58-
## Test Croissant ML support for Dataverse
5977
```
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):
91+
6192
```
93+
{
94+
"context_servers": {
95+
"mcp-dataverse": {
96+
"command": {
97+
"path": "npx",
98+
"args": ["-y", "mcp-remote", "https://mcp.dataverse.org/sse"],
99+
"env": null
100+
},
101+
"settings": {}
102+
}
103+
}
104+
...
105+
}
106+
107+
```
108+
109+
</details>
110+
111+
### Chat examples
62112

63-
## Connect MCP to your favourite IDE
113+
Here are some suggested examples to use when chatting with the MCP server.
114+
115+
#### Explore a dataset
64116

65117
Type in the chat of Agent:
66118
```
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.
68120
69121
Explore dataset doi:10.7910/DVN/6TFFPG
70122
```
@@ -77,11 +129,12 @@ This dataset contains experimental data from research on Nitrogen-Vacancy (NV) c
77129
It includes data shown in both the main text and supplemental material of the associated scientific paper
78130
The research focuses on photoluminescence spectra at low magnetic fields
79131
```
80-
## Multilingual support
132+
133+
#### Multilingual support
81134

82135
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):
83136
```
84-
give me overview of doi:10.17026/dans-xv2-dsx6
137+
give me an overview of doi:10.17026/dans-xv2-dsx6
85138
```
86139
The response in English:
87140
```
@@ -130,3 +183,18 @@ Historical geography
130183
Environmental studies
131184
Cultural heritage management
132185
```
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"}'
200+
```

0 commit comments

Comments
 (0)