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.
Lens MCP Server
Section titled “Lens MCP Server”Install
Section titled “Install”pip install dataspoc-lens[mcp]dataspoc-lens mcpClaude Desktop Configuration
Section titled “Claude Desktop Configuration”Add to your claude_desktop_config.json:
{ "mcpServers": { "dataspoc-lens": { "command": "dataspoc-lens", "args": ["mcp"], "env": { "DATASPOC_BUCKET": "s3://my-data" } } }}Available Tools
Section titled “Available Tools”| Tool | Description |
|---|---|
list_tables | List all tables in the data lake |
describe_table | Get schema, row count, and partitions for a table |
query | Execute a SQL query and return results |
ask | Ask a natural language question about the data |
cache_status | Show cache freshness and size |
cache_refresh | Refresh all cached data from the bucket |
cache_refresh_stale | Refresh only tables with stale cache |
Available Resources
Section titled “Available Resources”| Resource | Description |
|---|---|
lens://tables | Full table catalog with schemas and metadata |
Pipe MCP Server
Section titled “Pipe MCP Server”Install
Section titled “Install”pip install dataspoc-pipe[mcp]dataspoc-pipe mcpClaude Desktop Configuration
Section titled “Claude Desktop Configuration”{ "mcpServers": { "dataspoc-pipe": { "command": "dataspoc-pipe", "args": ["mcp"], "env": { "DATASPOC_BUCKET": "s3://my-data" } } }}Available Tools
Section titled “Available Tools”| Tool | Description |
|---|---|
list_pipelines | List all configured pipelines |
pipeline_config | View configuration for a pipeline |
run_pipeline | Execute a pipeline |
pipeline_status | Check run status and last sync time |
pipeline_logs | View execution logs |
show_manifest | Read the bucket manifest |
validate_pipeline | Validate pipeline configuration |
Available Resources
Section titled “Available Resources”| Resource | Description |
|---|---|
pipe://pipelines | Full pipeline catalog with configurations |
Using Both Servers Together
Section titled “Using Both Servers Together”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.
Cursor and Windsurf
Section titled “Cursor and Windsurf”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.