Skip to content

MCP Server Setup

DataSpoc exposes MCP (Model Context Protocol) servers for both Lens and Pipe. This lets AI assistants discover tables, run queries, manage pipelines, and more --- directly from the conversation.

Terminal window
pip install dataspoc-lens[mcp]
Terminal window
dataspoc-lens mcp

Add to your claude_desktop_config.json:

{
"mcpServers": {
"dataspoc-lens": {
"command": "dataspoc-lens",
"args": ["mcp"],
"env": {
"DATASPOC_BUCKET": "s3://my-data"
}
}
}
}
ToolDescription
list_tablesList all tables in the data lake
describe_tableGet schema, row count, and partitions for a table
queryExecute a SQL query and return results
askAsk a natural language question about the data
cache_statusShow cache freshness and size
cache_refreshRefresh all cached data from the bucket
cache_refresh_staleRefresh only tables with stale cache
ResourceDescription
lens://tablesFull table catalog with schemas and metadata
Terminal window
pip install dataspoc-pipe[mcp]
Terminal window
dataspoc-pipe mcp
{
"mcpServers": {
"dataspoc-pipe": {
"command": "dataspoc-pipe",
"args": ["mcp"],
"env": {
"DATASPOC_BUCKET": "s3://my-data"
}
}
}
}
ToolDescription
list_pipelinesList all configured pipelines
pipeline_configView configuration for a pipeline
run_pipelineExecute a pipeline
pipeline_statusCheck run status and last sync time
pipeline_logsView execution logs
show_manifestRead the bucket manifest
validate_pipelineValidate pipeline configuration
ResourceDescription
pipe://pipelinesFull pipeline catalog with configurations

You can run both MCP servers simultaneously. Add both to your Claude Desktop config:

{
"mcpServers": {
"dataspoc-lens": {
"command": "dataspoc-lens",
"args": ["mcp"],
"env": {
"DATASPOC_BUCKET": "s3://my-data"
}
},
"dataspoc-pipe": {
"command": "dataspoc-pipe",
"args": ["mcp"],
"env": {
"DATASPOC_BUCKET": "s3://my-data"
}
}
}
}

This gives the agent full control: ingest new data with Pipe, then query it with Lens --- all from a single conversation.

Both Cursor and Windsurf support MCP servers. Add the same configuration to their respective settings files. Refer to the Cursor or Windsurf documentation for the exact config file location.