{"id":"f7d74da9-77af-4c9c-9bde-15096040b036","slug":"finance-analytics","kind":"mcp","name":"finance-analytics","summary":"Finance analytics dbt project built with Snowflake Cortex Code CLI","owner":"saurabhkr0","repoUrl":"https://github.com/saurabhkr0/finance-analytics","license":"MIT","licenseTier":"permissive","trust":"community","stars":5,"match":null,"fewStars":false,"format":"mcp","createdAt":"2026-04-24T13:00:21.000Z","addedAt":"2026-10-21T17:16:01.157Z","logoUrl":"https://avatars.githubusercontent.com/u/270276788?u=7c6ed98921bc98d2d71b32d5badef9d31b0d2abd&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["data-analytics","databases","developer-tools"],"tags":[],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-25T22:23:08.495Z","sample":false,"url":"https://conduits.dev/tools/finance-analytics","language":"Python","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# finance-analytics\n\n> A Self-Governing, AI-Augmented Data Platform on Snowflake using Snowflake CoCo CLI's full extensibility stack.\n\nThis repository is the companion project to a 7-part Medium series on **Snowflake CoCo CLI**. It demonstrates how to build a governed, automated finance analytics platform from scratch using Skills, Subagents, Agent Teams, Hooks, and MCP integrations.\n\n# the business problem it solves\nIn regulated finance, undetected drift is expensive. A duplicate transaction key skews a regulatory filing. An over-privileged role exposes customer PII. An oversized warehouse quietly burns budget and the checks only run when a senior engineer remembers.\n\nWhat's at stake\n- Misstated regulatory filings\n- Customer PII & access exposure\n- Runaway Snowflake credit spend\n\n---\n\n## The Series\n\n| Part | Title | Link |\n|------|-------|------|\n| 1 | Build a Production-Ready dbt Project | [Read →](https://medium.com/@saurabh.kr/build-a-production-ready-dbt-project-using-snowflake-cortex-code-cli-c51fb8556f66) |\n| 2 | Build Custom Skills | [Read →](https://medium.com/@saurabh.kr/build-custom-skills-in-snowflake-cortex-code-cli-e5e7fe287c9c) |\n| 3 | Build Custom Subagents | [Read →](https://medium.com/@saurabh.kr/build-custom-subagent-in-snowflake-cortex-code-cli-part-3-4d2b1f478e11) |\n| 4 | Build and Run Agent Teams | [Read →](https://medium.com/@saurabh.kr/build-and-run-agent-teams-in-snowflake-cortex-code-cli-part-4-97e836acdc49) |\n| 5 | Build Guardrails with Hooks | [Read →](https://medium.com/@saurabh.kr/add-guardrails-to-your-ai-agents-with-hooks-in-snowflake-cortex-code-cli-part-5-77525986ccf5) |\n| 6 | Build MCP Integrations | [Read →](https://medium.com/@saurabh.kr/build-mcp-integrations-in-snowflake-cortex-code-cli-part-6-9d029a749393) | \n| 7 | Ship to Production | [Read →](https://medium.com/@saurabh.kr/ship-your-ai-augmented-data-platform-to-production-with-snowflake-cortex-code-cli-part-7-c368c8c4120d) | \n\n---\n\n## What's Inside\n\n```\nfinance-analytics/\n├── .cortex/\n│   ├── agents/\n│   │   ├── data-quality-inspector.md   # Profiles raw tables, flags anomalies\n│   │   ├── dbt-optimizer.md            # Reviews dbt project for best practices\n│   │   ├── rbac-auditor.md             # Audits Snowflake roles and access grants\n│   │   ├── finops-analyst.md           # Analyses credit consumption\n│   │   └── issue-router.md             # Routes findings to GitHub, Jira, Slack\n│   ├── skills/\n│   │   ├── source-onboard/             # Automates raw source onboarding into dbt\n│   │   └── dbt-model-generator/        # Generates dbt models from source tables\n│   ├── hooks/\n│   │   ├── block-destructive-sql.sh    # Blocks DROP/TRUNCATE/DELETE at runtime\n│   │   ├── cost-guard.sh               # Prevents queries exceeding credit threshold\n│   │   ├── audit-logger.sh             # Logs every tool call with timestamp\n│   │   ├── pii-scanner.sh              # Scans file writes for PII patterns\n│   │   └── log-mcp-call.sh             # Audit trail for all external MCP calls\n│   └── settings.json                   # Hook configuration\n├── finance_warehouse/                  # dbt project (3-layer architecture)\n│   ├── models/\n│   │   ├── staging/                    # Views over raw sources\n│   │   ├── intermediate/               # Ephemeral business logic\n│   │   └── marts/                      # Final tables for consumption\n│   └── dbt_project.yml\n├── reports/                            # Agent-generated output\n├── AGENTS.md                           # Project conventions for Cortex Code\n└── README.md\n```\n\n---\n\n## The Extensibility Stack\n\n| Layer | What It Does | Introduced |\n|-------|-------------|------------|\n| `AGENTS.md` | Project context and conventions | Part 1 |\n| Skills | Reusable playbooks your team can invoke | Part 2 |\n| Subagents | Autonomous specialist agents | Part 3 |\n| Agent Teams | Coordinated multi-agent execution | Part 4 |\n| Hooks | Lifecycle interceptors and policy enforcement | Part 5 |\n| MCP | External tool integration (GitHub, Jira, Slack) | Part 6 |\n\n---\n\n## Prerequisites\n\n- Snowflake account (trial works)\n- [Snowflake Cortex Code CLI](https://docs.snowflake.com/en/user-guide/cortex-code) installed\n- dbt Core with `dbt-snowflake` adapter\n- Node.js (for MCP servers via `npx`)\n\n---\n\n## Getting Started\n\n**1. Clone the repo**\n\n```bash\ngit clone https://github.com/saurabhkr0/finance-analytics.git\ncd finance-analytics\n```\n\n**2. Set up dbt credentials**\n\nCreate `finance_warehouse/profiles.yml` (not committed — see `.gitignore`):\n\n```yaml\nfinance_warehouse:\n  target: dev\n  outputs:\n    dev:\n      type: snowflake\n      account: your_account\n      user: your_user\n      authenticator: externalbrowser\n      role: YOUR_ROLE\n      warehouse: YOUR_WAREHOUSE\n      database: FINANCE_DEMO\n      schema: RAW\n      threads: 4\n```\n\n**3. Install dbt packages**\n\n```bash\ncd finance_warehouse\ndbt deps\n```\n\n**4. Configure MCP servers (Part 6+)**\n\nSet environment variables in your shell profile:\n\n```bash\nexport GITHUB_PERSONAL_ACCESS_TOKEN=\"ghp_...\"\nexport ATLASSIAN_SITE_NAME=\"yourcompany\"\nexport ATLASSIAN_USER_EMAIL=\"your@email.com\"\nexport ATLASSIAN_API_TOKEN=\"...\"\nexport SLACK_BOT_TOKEN=\"xoxb-...\"\nexport SLACK_TEAM_ID=\"T...\"\n```\n\nThen add MCP servers:\n\n```bash\ncortex mcp add github npx -y @modelcontextprotocol/server-github \\\n  -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PERSONAL_ACCESS_TOKEN\n\ncortex mcp add jira npx -y @aashari/mcp-server-atlassian-jira \\\n  -e ATLASSIAN_SITE_NAME=$ATLASSIAN_SITE_NAME \\\n  -e ATLASSIAN_USER_EMAIL=$ATLASSIAN_USER_EMAIL \\\n  -e ATLASSIAN_API_TOKEN=$ATLASSIAN_API_TOKEN\n\ncortex mcp add slack npx -y @modelcontextprotocol/server-slack \\\n  -e SLACK_BOT_TOKEN=$SLACK_BOT_TOKEN \\\n  -e SLACK_TEAM_ID=$SLACK_TEAM_ID\n```\n\n**5. Launch Cortex Code**\n\n```bash\ncortex\n```\n\n---\n\n## Running the Health Check Swarm\n\nFrom a Cortex Code session, run the full four-agent audit + issue routing in one prompt:\n\n```\nLaunch a swarm of agents:\n1. data-quality-inspector agent to profile FINANCE_DEMO.RAW\n2. dbt-optimizer agent to review the dbt project\n3. rbac-auditor agent to audit all roles and access\n4. finops-analyst agent to analyze credit consumption for the last 30 days\n\nWhen all four agents complete, launch the issue-router agent to\nread all reports in reports/ and route findings to GitHub, Jira, and Slack.\n```\n\nReports are written to `reports/`. GitHub issues, Jira tickets, and a Slack summary are created automatically.\n\n---\n\n## CI/CD\n\nThis repo includes a GitHub Actions workflow (`.github/workflows/cortex-ci.yml`) that validates the Cortex Code stack on every pull request:\n\n- Agent definitions present and correctly structured\n- Hooks present and free of hardcoded secrets\n- `settings.json` is valid JSON\n- `dbt_project.yml` and `AGENTS.md` exist\n\n---\n\n## Author\n\n**Saurabh Kumar** — Senior Manager, Data & AI at Accenture Australia, Snowflake Data Superhero  \n[Medium](https://medium.com/@saurabh.kr) · [LinkedIn](https://www.linkedin.com/in/saurabh-kr15/)\n\n---\n\n## Licence\n\nMIT\n"}