Skip to main content
Glama
srikar-pasumarthy

data.world MCP

README.md
# data.world MCP server

MCP server that exposes data.world's catalog, glossary, lineage (via SPARQL),
and SQL/SPARQL query APIs to LLM agents. Designed to run as a Databricks App.

## Tools exposed

| Tool | What it does |
|---|---|
| `health` | Liveness + token configured check |
| `whoami` | Current data.world user |
| `list_my_datasets` / `list_contributing_datasets` | Scope discovery |
| `get_dataset` | Full dataset metadata |
| `search_catalog` | Search public data.world catalog (`POST /v0/search`) |
| `list_metadata_properties` | List custom catalog properties for an owner |
| `lookup_term` | Ground-truth definition + formula + canonical table for a business term (CSV-backed glossary) |
| `run_sql` | SQL against a dataset/project |
| `run_sparql` | SPARQL against a dataset |
| `create_insight` | Persist agent findings to a data.world project |

All tools work against any data.world account, including free tier.
Eureka-style tools (`get_resource`, `resolve_glossary_term`, `sparql_catalog`)
were removed — their endpoint paths in the public API could not be
verified empirically against the live service.

## Local dev

```bash
uv venv && source .venv/bin/activate
uv pip install -r requirements.txt

export DATA_WORLD_TOKEN=<your data.world API token>
python -m server.app
```

Then exercise the server with any MCP client. The MCP HTTP transport is
mounted at `http://localhost:8000/mcp` and the health route at
`http://localhost:8000/health`.

## Deploy as a Databricks App

```bash
# 1) Create the app (name must start with mcp- to surface in AI Playground)
databricks apps create mcp-data-world -p srikar.pasumarthy

# 2) Sync source
databricks sync . /Workspace/Users/srikar.pasumarthy@databricks.com/mcp-data-world \
  --exclude .venv --exclude __pycache__ --exclude .git -p srikar.pasumarthy

# 3) Deploy
databricks apps deploy mcp-data-world \
  --source-code-path /Workspace/Users/srikar.pasumarthy@databricks.com/mcp-data-world \
  -p srikar.pasumarthy

# 4) Configure the data.world token in the App UI (App > Edit > Environment)
#    or wire it as a Databricks secret reference in app.yaml.
```

Once deployed, the MCP endpoint is at `https://<app-url>/mcp`. Add it as a
custom MCP server in AI Playground / Mosaic AI agents.

## Configuration

Required:
- `DATA_WORLD_TOKEN` — API token (Settings → Integrations → Python on data.world)

Optional:
- `DATA_WORLD_API_BASE` — defaults to `https://api.data.world/v0`
- `DATABRICKS_APP_PORT` — defaults to 8000

## Notes on Eureka endpoints

Some catalog endpoint paths (e.g. `/metadata/search/{owner}`) follow public
documented conventions but vary by tenant entitlement. If a tool returns 404,
check your org's catalog enablement and the exact endpoint path in the
[data.world API reference](https://developer.data.world/docs/api-reference).