Firn

finance MCP Server

Auditable AI agent for financial analysis — 3-phase audit pipeline with deterministic verdicts, multi-agent equity research, and versioned research memory.

Verified
financefinance
3 views3 stars0 forksAGPL-3.0

Why This Matters

Discovered via github-topic:mcp and last synced 3mo ago.

Verified
Source
github-topic:mcp
Stars
3
Last synced
3mo ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
15
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (15)

Metric

Value

High

"Uranium supply squeeze" — from KB themes/uranium-supply

Highest

"P/E of 18.9x" — specialist stated it, R1 confirmed it traces to raw API data

Layer

Technology

None

Claim exists in report but cannot be traced

5098

5100"`) so the agent can bridge these format gaps in a single query. Each grep result is automatically annotated with the originating tool call (`[@ tool_call #3: get_income_statement]`), giving the agent immediate provenance without manual cross-referencing. And every grep call is recorded — when the agent attempts to submit evidence, the system verifies it against actual grep history, closing the loop on fabrication. --- ## The Audit Pipeline The audit runs in three phases. Each phase has a clear purpose, constrained scope, and machine-verified outputs. <p align="center"> <img src="docs/images/audit-pipeline.png" alt="Three-Phase Audit Pipeline" width="100%"/> </p> ### Phase 1 — Specialist Fidelity: "Did each specialist faithfully report its data?" Four parallel audit agents, one per specialist (fundamental, technical, value, macro). Each agent: 1. Reads the specialist's output (`trace/specialist_outputs/fundamental_output.md`) 2. For every factual claim, searches the specialist's raw tool data (`tools/fundamental_tool_calls.json`) 3. Records a fidelity verdict: **found** (grep matched), **derived** (inputs present, arithmetic by LLM), or **not-found** ``` Example — Specialist Fidelity Check: Specialist output: "Current ratio improved to 1.47x from 1.32x" Agent searches: grep_trace("1.47", "tools/fundamental_tool_calls.json") Grep result: line 186: "currentRatio": 1.4692 [@ tool_call #3: get_financial_metrics] Agent searches: grep_trace("1.32", "tools/fundamental_tool_calls.json") Grep result: line 204: "currentRatio": 1.3218 [@ tool_call #3: get_financial_metrics] Verdict: FOUND — both values trace to get_financial_metrics, tool call #3 ``` **Enforcement**: The agent must paste actual grep output into `grep_evidence`. The tool programmatically verifies this matches the agent's grep history — fabricated evidence is rejected. **Output**: `specialist_citations/{agent}.jsonl` — one entry per claim, with grep coordinates. --- ### Phase 2a — Report-to-Specialist Tracing: "Can each report claim be traced to a specialist?" A single agent reads the final report and searches specialist outputs: 1. Identifies every factual claim in the report (numbers, dates, metrics, comparisons) 2. For each claim, greps all specialist outputs to find a match 3. Records the specialist excerpt and grep coordinates **Scope constraint**: This agent can _only_ search `trace/specialist_outputs/` — it cannot access raw tool data. This forces a clean separation of evidence paths. ``` Example — Report-to-Specialist Trace: Report says: "Revenue grew 26% YoY to $5.1B" Agent searches: grep_trace("26%

Phase

Can search

Verdict

Meaning

Medium-High

"Implied growth 9.2%" — from reverse DCF sidecar

FastAPI

SSE streaming, cookie auth, execution traces

Medium

"Fair value ~$150" — specialist's DCF estimate

pytest

1,000+ tests (880 agent + 138 MCP)

Concept

Firn Mapping

LangGraph

Multi-agent orchestration, parallel fan-out/fan-in, ReAct loops

Multi-provider

DeepSeek, Gemini, Claude — provider-agnostic design