Metadata-Version: 2.4
Name: investgame-mcp
Version: 0.5.1
Summary: MCP server for InvestGame Arcadia — gaming industry investment deals and company data
Project-URL: Homepage, https://app.investgame.net
Project-URL: Repository, https://github.com/InvestGameLtd/Arcadia
Author-email: InvestGame Ltd <info@investgame.net>
License: Proprietary
Keywords: arcadia,deals,gaming,investgame,investment,mcp
Requires-Python: >=3.12
Requires-Dist: fastmcp>=2.0
Requires-Dist: httpx>=0.27
Description-Content-Type: text/markdown

# investgame-mcp

MCP server for [InvestGame Arcadia](https://app.investgame.net) — gaming industry investment deals and company data.

Search 8,600+ gaming companies, 5,200+ M&A/investment deals, investor analytics, and portfolio exits.

## Quick Start (recommended)

Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "investgame": {
      "command": "uvx",
      "args": ["investgame-mcp"],
      "env": {
        "INVESTGAME_API_KEY": "your-api-key"
      }
    }
  }
}
```

Restart Claude Desktop. Done — 6 tools available.

## All Installation Methods

### 1. uvx (recommended, no install needed)

```json
{
  "mcpServers": {
    "investgame": {
      "command": "uvx",
      "args": ["investgame-mcp"],
      "env": { "INVESTGAME_API_KEY": "your-key" }
    }
  }
}
```

### 2. pip install

```bash
pip install investgame-mcp
```

```json
{
  "mcpServers": {
    "investgame": {
      "command": "investgame-mcp",
      "env": { "INVESTGAME_API_KEY": "your-key" }
    }
  }
}
```

### 3. Claude Code (.mcp.json in project root)

```json
{
  "mcpServers": {
    "investgame": {
      "command": "uvx",
      "args": ["investgame-mcp"],
      "env": { "INVESTGAME_API_KEY": "your-key" }
    }
  }
}
```

### 4. From source

```bash
git clone https://github.com/InvestGameLtd/Arcadia.git
cd Arcadia
INVESTGAME_API_KEY=your-key python -m investgame_mcp.server
```

## Get API Key

1. Sign up at [app.investgame.net](https://app.investgame.net)
2. Go to **Profile → API Key → Generate**
3. Copy the key immediately (shown once)
4. Set as `INVESTGAME_API_KEY` in your MCP config

## Tools

| Tool | Credits | What it does |
|------|---------|-------------|
| `search_companies` | **Free** | Search and filter companies by name, type, sector, region, platform, features |
| `get_company` | 1 | Full company profile: sector, platforms, deals, metrics, contacts, LinkedIn |
| `get_company_investment_stats` | 1 | Investment analytics: activity, focus, portfolio exits (VC/PE/Strategic) |
| `get_company_exits` | 1 | Portfolio exit details — M&A and IPO deals |
| `search_deals` | **Free** | Search deals by type, period, sector, size range, company |
| `get_deal` | 1 | Full deal details: ~50 fields including participants, terms, financials |

### Example Queries

- "Find all VC firms investing in mobile gaming"
- "Show me M&A deals over $100M in the last quarter"
- "Get investment stats for Tencent"
- "What are the recent IPOs in gaming?"

## Credits & Limits

| Limit | Value |
|-------|-------|
| Weekly credits | 350 |
| Monthly credits | 1,200 |
| Rate limit | 30 requests/min |
| Search tools | Free (0 credits) |
| Detail tools | 1 credit each |
| Repeat access | Free (same entity = no charge) |

Credit balance is included in every response (`_credits` field).

## Environment Variables

| Variable | Required | Default |
|----------|----------|---------|
| `INVESTGAME_API_KEY` | Yes | — |
| `INVESTGAME_API_URL` | No | `https://app.investgame.net/api/v1` |

## Changelog

### 0.5.1 (2026-04-02)

**Improved error diagnostics:**

- 5xx errors now include `detail`/`message` from JSON body (was generic "Try again later.")
- `ConnectError` shows `base_url` + connection failure reason in logs
- All error branches in `_call_api_dict()` log `warning`/`error` before raising `ToolError`
- DRY: unified `_extract_detail()` helper for error detail extraction across all status codes
- Safety: `isinstance(val, str)` guard prevents DRF dict/list values from leaking into messages
- Error detail truncated to 300 chars (prevents HTML dump from Django DEBUG=True)

### 0.5.0 (2026-03-31)

- 10 tools: search_companies, get_company, get_company_investment_stats, get_company_exits, get_company_stats, search_deals, get_deal, get_deal_stats, get_multiples_stats, compare_deal_segments
- 15 resources: enum values for all filter fields
- Smart date parsing (Q1 2024, H2 2025, YTD, last_quarter)
- Credit tracking with `_credits` in every response
- PII redaction (email, linkedin)

### 0.4.0 (2026-03-26)

- Credit monetization: per-item charging, dedup (same entity = free), cache miss billing
- `x-credits-charged`, `x-credits-weekly-remaining`, `x-credits-monthly-remaining` headers

### 0.3.0 (2026-03-24)

- Server split: `app.py`, `types.py`, `validators.py`, `resources.py`
- Security: `follow_redirects=False`, PII redaction, error truncation
- 19 fixes from deep code review (PR #386)

### 0.2.1 (2026-03-22)

- Hotfix: `DEFAULT_API_URL` pointed to old domain (`arcadia.investgame.net` → `app.investgame.net`)

### 0.2.0 (2026-03-18)

- Initial PyPI release: 6 tools, 7 resources, 4 prompts

## Coming Soon

- **Remote server** — connect via URL without local install (`"url": "https://..."`)
- **More tools** — market data, company charts, XLSX export
- **Smithery listing** — one-click install from [smithery.ai](https://smithery.ai)
- **MCP resources** — enum values, field descriptions for better agent understanding
- **MCP prompts** — pre-built query templates for common use cases

## License

Proprietary. [InvestGame Ltd](https://investgame.net).
