{"id":28952833,"url":"https://github.com/materializeinc/materialize-mcp-server","last_synced_at":"2025-06-23T17:30:52.910Z","repository":{"id":289573315,"uuid":"971018369","full_name":"MaterializeInc/materialize-mcp-server","owner":"MaterializeInc","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-28T17:42:40.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T02:44:34.209Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaterializeInc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-22T22:18:16.000Z","updated_at":"2025-04-28T17:42:44.000Z","dependencies_parsed_at":"2025-04-24T01:16:30.911Z","dependency_job_id":"02b84677-e5d0-4361-8430-5f2113886b4d","html_url":"https://github.com/MaterializeInc/materialize-mcp-server","commit_stats":null,"previous_names":["materializeinc/materialize-mcp-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MaterializeInc/materialize-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaterializeInc%2Fmaterialize-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaterializeInc%2Fmaterialize-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaterializeInc%2Fmaterialize-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaterializeInc%2Fmaterialize-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaterializeInc","download_url":"https://codeload.github.com/MaterializeInc/materialize-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaterializeInc%2Fmaterialize-mcp-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261522392,"owners_count":23171807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-23T17:30:48.311Z","updated_at":"2025-06-23T17:30:52.817Z","avatar_url":"https://github.com/MaterializeInc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Materialize MCP Server\n\nInstantly transform your Materialize indexed views into fully-typed, callable tools via the Model Context Protocol (MCP).\n\nDefine stable, versioned, and secure data tools simply by creating SQL views and indexing them—no additional code required.\n\n## Installation\n\nThe package can be installed locally. We recommend using [uv](https://docs.astral.sh/uv/) as your build tool.\n\n```bash\ngit clone https://github.com/MaterializeInc/materialize-mcp-server\ncd materialize-mcp-server\nuv run materialize-mcp-server\n```\n\n## Why not `execute_sql`?\n\nMany database MCP servers ship a single `execute_sql` tool.\nIt is great for prototyping but brittle in production.\nGenerated SQL queries by LLMs and agents can introduce performance bottlenecks, unpredictable costs, and inconsistent results.\n\nBy shifting to **operational data products**  we remove variability and ensure that each tool is:\n\n* **Stable:** define once, used repeatedly, ensuring consistent business logic.\n* **Typed:** input and output schemas are derived from the index.\n* **Observable:** usage is logged per‑tool, making cost and performance explicit.\n* **Secure:** if you don't create a view/index, it isn't callable.\n\n## Quickstart\n\nRun the server with default settings:\n\n```bash\nuv run materialize-mcp\n```\n\n## Configuration\n\n\n| Argument | Environment Variable | Default | Description |\n|----------|---------------------|---------|-------------|\n| `--mz-dsn` | `MZ_DSN` | `postgresql://materialize@localhost:6875/materialize` | Materialize DSN |\n| `--transport` | `MCP_TRANSPORT` | `stdio` | Communication transport (`stdio` or `sse`) |\n| `--host` | `MCP_HOST` | `0.0.0.0` | Server host |\n| `--port` | `MCP_PORT` | `3001` | Server port |\n| `--pool-min-size` | `MCP_POOL_MIN_SIZE` | `1` | Minimum connection pool size |\n| `--pool-max-size` | `MCP_POOL_MAX_SIZE` | `10` | Maximum connection pool size |\n| `--log-level` | `MCP_LOG_LEVEL` | `INFO` | Logging level |\n\n\n## Defining a Tool\n\n1. **Write a view** that expresses your business logic.\n2. **Index** the columns you want to query by.\n3. **Comment** the view for discoverability.\n\n```sql\nCREATE VIEW order_status_summary AS\nSELECT  o.order_id,\n        o.status,\n        s.carrier,\n        c.estimated_delivery,\n        e.delay_reason\nFROM orders o\nLEFT JOIN shipments           s ON o.order_id = s.order_id\nLEFT JOIN carrier_tracking    c ON s.shipment_id = c.shipment_id\nLEFT JOIN delivery_exceptions e ON c.tracking_id = e.tracking_id;\n\nCREATE INDEX ON order_status_summary (order_id);\n\nCOMMENT ON order_status_summary IS 'Look up the status, shipment, and delivery info for a given order.';\n```\n\nRefresh the server and the tool now appears in `tools/list`:\n\n```json\n{\n  \"name\": \"order_status_summary\",\n  \"description\": \"Look up the status, shipment, and delivery info for a given order.\",\n  \"inputSchema\": {\n    \"type\": \"object\",\n    \"required\": [\"order_id\"],\n    \"properties\": {\n      \"order_id\": { \"type\": \"text\" }\n    }\n  }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaterializeinc%2Fmaterialize-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaterializeinc%2Fmaterialize-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaterializeinc%2Fmaterialize-mcp-server/lists"}