# Coin Identifier MCP Server (`mowell_labs/coin-identifier-mcp`) Actor

Vision-based coin and currency identification MCP server. Send a photo of any coin, paper money, or bullion piece and get structured identification data including country, denomination, year, mint mark, grade estimate, and market value. Powered by Claude Vision.

- **URL**: https://apify.com/mowell\_labs/coin-identifier-mcp.md
- **Developed by:** [Brian Mowell](https://apify.com/mowell_labs) (community)
- **Categories:** MCP servers, Agents, Automation
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 value lookups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Coin Identifier MCP Server

Vision-based coin and currency identification powered by Claude Vision. Send a photo of any coin, paper money, or bullion piece and get back structured identification data.

**By [Mowell Labs](https://github.com/mowell-labs)**

### What It Does

| Tool | Description | API Cost |
|------|-------------|----------|
| `identify_coin` | Photo → full coin/currency ID (country, year, denomination, mint, grade, value) | ~$0.02 |
| `identify_item` | Photo → auto-detect type (coin/currency/card/bullion) then ID | ~$0.03 |
| `estimate_value` | Coin attributes → web-searched market value from recent sales | ~$0.01 |
| `estimate_melt_value` | Metal + weight + spot price → melt value (no API call) | Free |
| `estimate_silver_melt` | Pre-1965 US coin denomination → silver melt value with grade premium | Free |

### Requirements

- Python 3.10+
- Anthropic API key (set as `ANTHROPIC_API_KEY` environment variable)

### Install

```bash
pip install coin-identifier-mcp
```

Or clone and install locally:

```bash
git clone https://github.com/mowell-labs/coin-identifier-mcp.git
cd coin-identifier-mcp
pip install -e .
```

### Run

#### stdio (default — for Claude Desktop, Cursor, etc.)

```bash
export ANTHROPIC_API_KEY="sk-ant-..."
python -m server
```

#### SSE (for web clients, Apify, MCPize)

```bash
export ANTHROPIC_API_KEY="sk-ant-..."
fastmcp run server.py --transport sse --port 8001
```

#### Claude Desktop config

Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "coin-identifier": {
      "command": "python",
      "args": ["-m", "server"],
      "cwd": "/path/to/coin-identifier-mcp",
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-..."
      }
    }
  }
}
```

### Tools

#### identify\_coin

Identify a coin or paper currency from a photograph.

**Input:**

- `image_base64` (string, required) — Base64-encoded image data
- `mime_type` (string, default "image/jpeg") — Image MIME type

**Output:**

```json
{
  "success": true,
  "coin": {
    "country": "United States",
    "denomination": "Quarter",
    "year": 1964,
    "mint_mark": "D",
    "composition": "90% silver, 10% copper",
    "variety": "",
    "errors": "",
    "grade_estimate": "VF",
    "condition_description": "Moderate wear on high points, all details visible",
    "name": "Washington Quarter",
    "description": "1964-D Washington Quarter, 90% silver",
    "estimated_value": 8.50,
    "is_graded": false,
    "grading_service": "",
    "grade_number": "",
    "certification_number": "",
    "sub_type": "",
    "friedberg_number": ""
  }
}
```

#### identify\_item

Auto-detect whether image is coin, card, or bullion, then identify.

**Input:** Same as `identify_coin`.

**Output:** Same as `identify_coin` with added `item_type` field.

#### estimate\_value

Look up current market value via web search.

**Input:**

- `name` (string, required) — e.g. "Morgan Silver Dollar"
- `year` (int, optional)
- `denomination` (string, optional)
- `mint_mark` (string, optional)
- `grade_estimate` (string, optional)
- `variety` (string, optional)
- `grading_service` (string, optional) — NGC, PCGS, etc.
- `grade_number` (string, optional) — MS-65, AU-58, etc.
- `certification_number` (string, optional)
- `sub_type` (string, optional) — fractional\_currency, etc.
- `friedberg_number` (string, optional)
- `country` (string, optional)

**Output:**

```json
{
  "success": true,
  "estimated_value": 42.50,
  "analysis": "Based on recent eBay sold listings...",
  "source": "web_search"
}
```

#### estimate\_melt\_value

Pure calculation — no API calls.

**Input:**

- `metal` (string) — gold, silver, platinum, etc.
- `weight_oz` (float) — Weight in troy ounces
- `spot_price_per_oz` (float) — Current spot price
- `purity` (float, default 0.999)

**Output:**

```json
{
  "metal": "gold",
  "weight_oz": 1.0,
  "purity": 0.999,
  "spot_price_per_oz": 2350.00,
  "melt_value_usd": 2347.65
}
```

#### estimate\_silver\_melt

Pre-1965 US silver coin melt value with grade premium.

**Input:**

- `denomination` (string) — dime, quarter, half dollar, dollar
- `year` (int) — Must be pre-1965
- `silver_spot_per_oz` (float) — Current silver spot price
- `grade_estimate` (string, optional) — Grade for premium multiplier

**Output:**

```json
{
  "denomination": "quarter",
  "year": 1958,
  "silver_content_oz": 0.1808,
  "silver_spot": 30.0,
  "melt_value_usd": 5.42,
  "grade_estimate": "VF",
  "grade_multiplier": 2.0,
  "estimated_value_usd": 10.85,
  "note": "Melt value is floor. Numismatic premium varies by date, mint, condition."
}
```

### Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `ANTHROPIC_API_KEY` | Yes | — | Your Anthropic API key |
| `COIN_ID_VISION_MODEL` | No | `claude-sonnet-4-20250514` | Model for vision identification |
| `COIN_ID_SEARCH_MODEL` | No | `claude-haiku-4-5-20251001` | Model for value web search |

### Test Commands

```bash
## Test with fastmcp CLI
export ANTHROPIC_API_KEY="sk-ant-..."

## List tools
fastmcp dev server.py --list-tools

## Test melt value (no API key needed)
echo '{"metal": "silver", "weight_oz": 1.0, "spot_price_per_oz": 30.0, "purity": 0.999}' | \
  fastmcp run server.py --tool estimate_melt_value

## Test silver melt
echo '{"denomination": "quarter", "year": 1958, "silver_spot_per_oz": 30.0, "grade_estimate": "VF"}' | \
  fastmcp run server.py --tool estimate_silver_melt

## Test coin identification (requires API key + image)
python3 -c "
import base64, json
with open('test_coin.jpg', 'rb') as f:
    b64 = base64.b64encode(f.read()).decode()
print(json.dumps({'image_base64': b64, 'mime_type': 'image/jpeg'}))
" | fastmcp run server.py --tool identify_coin
```

### Typical Agent Workflow

```
1. Agent receives coin photo from user
2. Call identify_item → gets structured ID + rough value
3. Call estimate_value with the returned attributes → gets market-verified price
4. (Optional) Call estimate_silver_melt for pre-1965 silver → gets melt floor
5. Agent presents complete identification + valuation to user
```

### Cost Per Use

| Operation | Model | Approximate Cost |
|-----------|-------|-----------------|
| Classify item type | Sonnet | ~$0.005 |
| Identify coin | Sonnet | ~$0.02 |
| Value lookup | Haiku + web search | ~$0.01 |
| Melt calculation | None | Free |
| **Full pipeline** | — | **~$0.03-0.04** |

### License

MIT

### Platform Deployment

#### Apify

See `apify/` directory (coming soon) for Actor wrapper.

#### MCPize

```bash
## Direct deploy via MCPize CLI
mcpize deploy server.py --name coin-identifier --transport sse
```

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("mowell_labs/coin-identifier-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("mowell_labs/coin-identifier-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call mowell_labs/coin-identifier-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mowell_labs/coin-identifier-mcp"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YpfP9sriqkMNl3DJN/builds/0H2Tjj16Y5BYVzPhO/openapi.json
