Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions containers/eic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,8 @@ COPY eic-env.sh /etc/eic-env.sh
COPY profile.d/* /etc/profile.d
COPY singularity.d /.singularity.d

## System-level Copilot MCP server defaults.
## /opt/local/bin/xrootd-mcp-server is the Spack view path for the
## xrootd-mcp-server package (installed like github-copilot via npm --global).
COPY copilot/mcp-config.json /etc/copilot/mcp-config.json
## System-level Copilot server defaults.
COPY copilot/ /etc/copilot/

## set ROOT TFile forward compatibility
RUN sed --in-place --follow-symlinks 's/# \(TFile.v630forwardCompatibility:\) no/\1 yes/' /opt/local/etc/root/system.rootrc
Expand Down
42 changes: 42 additions & 0 deletions containers/eic/copilot/mcp-config.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## Container Environment: Available MCP Servers
Comment thread
wdconinc marked this conversation as resolved.
Comment thread
wdconinc marked this conversation as resolved.

This session is running inside a container that has the following MCP servers
pre-installed and ready to use. They are **not active by default** — the user
must add them to their personal configuration once.
Comment thread
wdconinc marked this conversation as resolved.

### Available servers

| Name | Description |
|------|-------------|
| `eic-xrootd-mcp-server` | Access EIC data via XRootD from the JLab data transfer node (`root://dtn-eic.jlab.org`) |
| `eic-zenodo-mcp-server` | Browse and retrieve EIC datasets and publications from Zenodo (`https://zenodo.org`) |

### How to enable

If the user asks about EIC data, simulation inputs, published datasets, or anything
that would benefit from remote file or repository access, suggest they enable the
relevant server(s) by editing `~/.copilot/mcp-config.json`.

If the file does not exist, create it. Add or merge the following:

```json
{
"mcpServers": {
"eic-xrootd-mcp-server": {
"command": "/opt/local/bin/xrootd-mcp-server",
"env": {
"XROOTD_SERVER": "root://dtn-eic.jlab.org"
}
},
"eic-zenodo-mcp-server": {
"command": "/opt/local/bin/zenodo-mcp-server",
"env": {
"ZENODO_BASE_URL": "https://zenodo.org"
}
}
}
}
```

After saving the file, run /mcp show to confirm the servers are active. The configuration persists across
Comment thread
wdconinc marked this conversation as resolved.
sessions in the user's home directory.
14 changes: 6 additions & 8 deletions containers/eic/profile.d/z23_copilot_mcp.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
#!/bin/sh

## Set COPILOT_HOME to /etc/copilot so github-copilot reads MCP server
## configuration directly from the system-level config, rather than from
## ~/.copilot. This works for Singularity/Apptainer users whose home
## directory is bind-mounted from the host at runtime.
## Set COPILOT_CUSTOM_INSTRUCTIONS_DIRS to /etc/copilot so github-copilot
## reads custom instructions with a pointer to MCP server configuration.
##
## To revert to ~/.copilot (or any other directory), add the following
## to your ~/.bashrc:
## unset COPILOT_HOME
## unset COPILOT_CUSTOM_INSTRUCTIONS_DIRS

if [ -z "${COPILOT_HOME:-}" ]; then
export COPILOT_HOME=/etc/copilot
if [ -z "${COPILOT_CUSTOM_INSTRUCTIONS_DIRS:-}" ]; then
export COPILOT_CUSTOM_INSTRUCTIONS_DIRS=/etc/copilot
else
case "$-" in
*i*) printf '%s\n' "Note: COPILOT_HOME is already set to '${COPILOT_HOME}'; not overriding with /etc/copilot." >&2 ;;
*i*) printf '%s\n' "Note: COPILOT_CUSTOM_INSTRUCTIONS_DIRS is already set to '${COPILOT_CUSTOM_INSTRUCTIONS_DIRS}'; not overriding with /etc/copilot." >&2 ;;
esac
fi
Loading