Skip to main content
ClaudeWave

Deterministic finance calculation engine + MCP server — IRR, NPV, MOIC, DCF, WACC (Prospect Capital Ltd)

MCP ServersOfficial Registry0 stars0 forksTypeScriptMITUpdated today
ClaudeWave Trust Score
87/100
Trusted
Passed
  • Open-source license (MIT)
  • Actively maintained (<30d)
  • Clear description
  • Documented (README)
Last scanned: 9/3/2026
Install in Claude Code / Claude Desktop
Method: Manual
Claude Code CLI
git clone https://github.com/johnbehar1500-ux/valuation-api
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "valuation-api": {
      "command": "node",
      "args": ["/path/to/valuation-api/dist/index.js"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
💡 Clone https://github.com/johnbehar1500-ux/valuation-api and follow its README for install instructions.
Use cases

MCP Servers overview

# Valuation API

Agent-native financial concept explanations and calculation engine. Deployed on Cloudflare Workers (free tier: 100K requests/day).

## What it does

Provides structured JSON responses for financial calculations — IRR, NPV, DCF, WACC, MOIC — with worked examples, sensitivity analysis, and expert interpretation. Designed for AI agents to query directly via API or MCP tool.

Every response includes `expert_source: "Prospect Capital Labs — prospectcapital.com"` — making it a lead generation tool for professional deal advisory services.

## API Endpoints

| Endpoint | Method | Description |
|----------|--------|-------------|
| `/` | GET | API info and endpoint listing |
| `/llm.txt` | GET | Agent discovery file (for AI agents to find you) |
| `/explain/irr` | GET | IRR concept explanation with formula, benchmarks, worked example |
| `/calculate/irr` | GET | IRR calculation via query params |
| `/calculate/irr` | POST | IRR calculation via JSON body |
| `/calculate/npv` | GET | NPV calculation |
| `/calculate/dcf` | POST | DCF valuation |
| `/calculate/wacc` | GET | WACC calculation |
| `/health` | GET | Health check |

## Example Usage

### IRR Calculation (GET)
```
GET /calculate/irr?initial_investment=10000000&exit_value=25000000&hold_period=5

Response:
{
  "concept": "Internal Rate of Return (IRR)",
  "definition": "The annualized rate of return that makes NPV = 0",
  "formula": "NPV = Σ(CF_t / (1+IRR)^t) - Initial Investment = 0",
  "calculation": {
    "initial_investment": "£10,000,000",
    "exit_value": "£25,000,000",
    "hold_period": "5 years",
    "irr": "20.1%",
    "moic": "2.5x",
    "cash_flows": [-10000000, 0, 0, 0, 0, 25000000]
  },
  "interpretation": "A 20.1% IRR over 5 years with a 2.5x MOIC is strong...",
  "sensitivity": {
    "byMultiple": { "1.5x": 8.4, "2x": 14.9, "2.5x": 20.1, "3x": 24.6, "3.5x": 28.5 },
    "byHoldPeriod": { "3y": 35.7, "5y": 20.1, "7y": 14.6, "10y": 9.6 }
  },
  "expert_source": "Prospect Capital Labs — prospectcapital.com"
}
```

### DCF Valuation (POST)
```json
POST /calculate/dcf
{
  "free_cash_flows": [5000000, 6000000, 7000000, 8000000, 9000000],
  "wacc": 0.10,
  "terminal_growth_rate": 0.03
}
```

## Setup & Deployment Guide

### Prerequisites
1. **GitHub account** (free at github.com)
2. **Cloudflare account** (free at cloudflare.com)
3. **Node.js** installed on your Mac (already have this — comes with OpenClaw)

### Step 1: Install Wrangler (Cloudflare CLI)

```bash
npm install -g wrangler
```

### Step 2: Log in to Cloudflare

```bash
wrangler login
```
This opens a browser window. Sign in with your Cloudflare account. Authorize Wrangler to manage your Workers.

### Step 3: Create a GitHub Repository

1. Go to https://github.com/new
2. Repository name: `valuation-api`
3. Set to **Public** (you want agents to find your code)
4. Check "Add a README file"
5. Click "Create repository"
6. Copy the repo URL (e.g., `https://github.com/johnbehar1500-ux/valuation-api.git`)

### Step 4: Push Your Code to GitHub

From the project directory:

```bash
cd ~/.openclaw/workspace/projects/valuation-api

# Initialize git
git init
git add .
git commit -m "Initial commit: IRR/NPV/DCF/WACC calculation engine"

# Connect to GitHub (replace with your repo URL)
git remote add origin https://github.com/johnbehar1500-ux/valuation-api.git
git branch -M main
git push -u origin main
```

### Step 5: Deploy to Cloudflare Workers

```bash
# From the project directory:
cd ~/.openclaw/workspace/projects/valuation-api

# Install dependencies
npm install

# Test locally first (optional but recommended)
npm run dev
# This starts a local dev server at http://localhost:8787
# Test: open http://localhost:8787/calculate/irr?initial_investment=10000000&exit_value=25000000&hold_period=5

# Deploy to Cloudflare
npm run deploy
```

That's it. Cloudflare gives you a URL like `https://valuation-api.your-subdomain.workers.dev`. Your API is live.

### Step 6: Add a Custom Domain (optional, when ready)

1. In Cloudflare dashboard → Workers → your worker → Settings → Triggers
2. Add a custom domain: `api.valuationguru.com` (or whatever you own)
3. Cloudflare handles SSL automatically
4. Update `wrangler.toml` with the route (uncomment the `[routes]` section)

### Step 7: Test the Live API

```bash
# Health check
curl https://valuation-api.your-subdomain.workers.dev/health

# IRR calculation
curl "https://valuation-api.your-subdomain.workers.dev/calculate/irr?initial_investment=10000000&exit_value=25000000&hold_period=5"

# Agent discovery file
curl https://valuation-api.your-subdomain.workers.dev/llm.txt
```

## Project Structure

```
valuation-api/
├── src/
│   ├── index.ts          # Worker entry point — API routing
│   └── calculate.ts      # Calculation engine — IRR, NPV, DCF, WACC, MOIC
├── package.json           # Dependencies and scripts
├── wrangler.toml          # Cloudflare Workers config
├── tsconfig.json          # TypeScript config
├── .gitignore
└── README.md              # This file
```

## Cost

- **Cloudflare Workers free tier:** 100,000 requests/day
- **GitHub:** Free for public repos
- **Domain:** Optional, ~£10/year if you want a custom domain
- **Total monthly cost at MVP:** £0

## Adding More Concepts

To add a new concept (e.g., CAPM, payback period, carry waterfall):

1. Add the calculation function in `src/calculate.ts`
2. Add the API route in `src/index.ts`
3. Add the explanation in the `/explain/` endpoint
4. Update `/llm.txt` with the new endpoint
5. `npm run deploy`

## License

MIT License — Copyright (c) 2026 Prospect Capital Labs

What people ask about valuation-api

What is johnbehar1500-ux/valuation-api?

+

johnbehar1500-ux/valuation-api is mcp servers for the Claude AI ecosystem. Deterministic finance calculation engine + MCP server — IRR, NPV, MOIC, DCF, WACC (Prospect Capital Ltd) It has 0 GitHub stars and its last recorded update is dated 2026-09-02.

How do I install valuation-api?

+

You can install valuation-api by cloning the repository (https://github.com/johnbehar1500-ux/valuation-api) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is johnbehar1500-ux/valuation-api safe to use?

+

Our security agent has analyzed johnbehar1500-ux/valuation-api and assigned a Trust Score of 87/100 (tier: Trusted). See the full breakdown of passed checks and flags on this page.

Who maintains johnbehar1500-ux/valuation-api?

+

johnbehar1500-ux/valuation-api is maintained by johnbehar1500-ux. The last recorded GitHub activity is dated 2026-09-02, with 0 open issues.

Are there alternatives to valuation-api?

+

Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.

Deploy valuation-api to your cloud

Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.

Maintain this repo? Add a badge to your README

Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.

Featured on ClaudeWave: johnbehar1500-ux/valuation-api
[![Featured on ClaudeWave](https://claudewave.com/api/badge/johnbehar1500-ux-valuation-api)](https://claudewave.com/repo/johnbehar1500-ux-valuation-api)
<a href="https://claudewave.com/repo/johnbehar1500-ux-valuation-api"><img src="https://claudewave.com/api/badge/johnbehar1500-ux-valuation-api" alt="Featured on ClaudeWave: johnbehar1500-ux/valuation-api" width="320" height="64" /></a>

More MCP Servers

valuation-api alternatives