DataProbe MCP
# DataProbe MCP
A minimal MCP server for DataProbe data question answering and read-only SQL queries.
It supports:
- stdio mode for local MCP clients.
- Streamable HTTP mode for a long-running remote MCP service.
## Tools
- `dataprobe_health`: check DataProbe service health.
- `dataprobe_list_datasets`: list available datasets.
- `dataprobe_ask`: ask a natural-language data question and poll for the final result.
- `dataprobe_get_ask_result`: get an ask result by query id.
- `dataprobe_query_sql`: execute a read SQL query through DataProbe.
## Runtime
- Node.js 18 or newer.
- No npm dependencies are required.
## Environment Variables
Required auth, choose one:
- `DATAPROBE_ACCESS_TOKEN`
- `DATAPROBE_USERNAME` and `DATAPROBE_PASSWORD`
Optional:
- `DATAPROBE_BASE_URL`, default: `http://10.0.12.186:8080`
- `DATAPROBE_DATASET_ID`, default dataset id used by query tools
- `DATAPROBE_REFRESH_TOKEN`
- `DATAPROBE_TIMEOUT_MS`, default: `120000`
- `DATAPROBE_MCP_DEBUG_LOG`, default: `./dataprobe-mcp-debug.log`
- `DATAPROBE_MCP_TRANSPORT`, set to `http` for remote service mode
- `DATAPROBE_MCP_HOST`, default: `0.0.0.0`
- `DATAPROBE_MCP_PORT`, default: `3000`
- `DATAPROBE_MCP_PATH`, default: `/mcp`
Compatible Ontology variable names are also supported:
- `ONTOLOGY_API_URL`
- `ONTOLOGY_DATASET_ID`
- `ONTOLOGY_PAT`
- `ONTOLOGY_API_KEY`
## Remote Server Deployment
Clone the repository on the server:
```bash
sudo mkdir -p /opt
sudo chown -R "$USER:$USER" /opt
cd /opt
git clone https://github.com/lck-001/dataprobe-mcp.git
cd /opt/dataprobe-mcp
```
Install Node.js if needed:
```bash
node -v
```
For Ubuntu/Debian:
```bash
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
```
Create the server environment file:
```bash
cat > /opt/dataprobe-mcp/.env <<'EOF'
export DATAPROBE_BASE_URL="http://10.0.12.186:8080"
export DATAPROBE_DATASET_ID="_ontology_a3f60d33_f34f_572b_9377_26aec3ac6eb1"
export DATAPROBE_USERNAME="admin"
export DATAPROBE_PASSWORD="change-me"
export DATAPROBE_TIMEOUT_MS="120000"
export DATAPROBE_MCP_TRANSPORT="http"
export DATAPROBE_MCP_HOST="0.0.0.0"
export DATAPROBE_MCP_PORT="3000"
export DATAPROBE_MCP_PATH="/mcp"
EOF
chmod 600 /opt/dataprobe-mcp/.env
```
Create a systemd service so the MCP server stays online:
```bash
sudo tee /etc/systemd/system/dataprobe-mcp.service >/dev/null <<'EOF'
[Unit]
Description=DataProbe MCP Streamable HTTP Server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
WorkingDirectory=/opt/dataprobe-mcp
EnvironmentFile=/opt/dataprobe-mcp/.env
ExecStart=/usr/bin/node /opt/dataprobe-mcp/server.mjs
Restart=always
RestartSec=3
User=root
[Install]
WantedBy=multi-user.target
EOF
```
Start it:
```bash
sudo systemctl daemon-reload
sudo systemctl enable --now dataprobe-mcp
sudo systemctl status dataprobe-mcp
```
Test on the server:
```bash
curl http://127.0.0.1:3000/health
```
Test the MCP endpoint:
```bash
curl -s http://127.0.0.1:3000/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
```
If users connect from other machines, open the port or put it behind Nginx:
```bash
sudo ufw allow 3000/tcp
```
## Codex Client Configuration
Each user can add this to their Codex config file.
Windows:
```text
C:\Users\<username>\.codex\config.toml
```
macOS/Linux:
```text
~/.codex/config.toml
```
Config:
```toml
[mcp_servers.dataprobe]
url = "http://SERVER_IP:3000/mcp"
startup_timeout_sec = 20.0
tool_timeout_sec = 120.0
[mcp_servers.dataprobe.tools.dataprobe_health]
approval_mode = "approve"
[mcp_servers.dataprobe.tools.dataprobe_list_datasets]
approval_mode = "approve"
[mcp_servers.dataprobe.tools.dataprobe_query_sql]
approval_mode = "approve"
```
Restart Codex after updating the config.
For production, prefer HTTPS and a private network, VPN, or reverse proxy allowlist.
TDQS
Scored across 5 tools
Tools are mostly distinct: health, list datasets, submit NL query, retrieve result, and execute SQL. The only slight overlap is between 'dataprobe_ask' and 'dataprobe_get_ask_result', but 'ask' includes polling and 'get_ask_result' is for fetching by ID, so the boundary is clear.
All names share the 'dataprobe_' prefix and use snake_case, which is consistent. However, 'dataprobe_ask' is a bare verb and 'dataprobe_health' is a noun, deviating from the verb_noun pattern seen in list_datasets, get_ask_result, and query_sql.
With 5 tools, the surface is tightly scoped for a data query service. It covers health, dataset discovery, natural-language querying, result retrieval, and SQL execution without unnecessary bloat.
Core workflows are covered: checking health, listing datasets, submitting and retrieving ask results, and running SQL. Minor gaps like a cancel operation or dataset schema access are missing but do not hinder the primary query/retrieve pattern.