Skip to main content
Glama
README.md
# API Triangle MCP

A local [Model Context Protocol](https://modelcontextprotocol.io) server for the api-triangle.com x402 feeds. It is not imported by the website process and is not started by `npm start` in the repository root.

Tools:

- `quote_triangle_leads` calls free `GET /api/v1/leads/quote`
- `fetch_triangle_leads` calls paid `GET /api/v1/leads`
- `search_triangle_surplus` calls paid `GET /api/v1/surplus`

## Run locally

```bash
cd mcp
npm install
API_TRIANGLE_BASE_URL=http://127.0.0.1:3000 npm start
```

The process speaks MCP over stdin and stdout. Leave `API_TRIANGLE_BASE_URL` unset to use `https://api-triangle.com`.

## Wallet key

Paid tools read `X402_PRIVATE_KEY`, a hex private key for a Base wallet that holds USDC. The tool uses `x402-fetch` to answer the HTTP 402 challenge. The website charges the amount in `X402_AMOUNT_ATOMIC` (6 decimal USDC) to `X402_PAY_TO`.

Do not commit the key. If the variable is unset, `fetch_triangle_leads` and `search_triangle_surplus` return the 402 body so you can see the price and wallet before paying. `quote_triangle_leads` never needs the key.

## Claude Desktop

Add this to `~/Library/Application Support/Claude/claude_desktop_config.json` and restart Claude. Replace the path and the key.

```json
{
  "mcpServers": {
    "api-triangle": {
      "command": "node",
      "args": ["/absolute/path/to/api-triangle/mcp/index.js"],
      "env": {
        "API_TRIANGLE_BASE_URL": "https://api-triangle.com",
        "X402_PRIVATE_KEY": "0xYOUR_BASE_PRIVATE_KEY"
      }
    }
  }
}
```

## Cursor

Add the same command to `~/.cursor/mcp.json` (or the project `.cursor/mcp.json`) under `mcpServers`. Cursor starts the process when the chat needs the tools. Quote a county and distress first, then fetch the paid page only if the count is worth the USDC.

TDQS

A3.5/5.0

Scored across 3 tools

Disambiguation4/5

quote_triangle_leads and fetch_triangle_leads both target Triangle leads but form a clear free-quote vs. paid-fetch pair, with descriptions that spell out the difference (counts/price vs. actual records). search_triangle_surplus targets a distinct resource (municipal surplus auctions), so misselection risk is low, though the two lead tools could momentarily be confused by a hasty agent.

Naming Consistency5/5

All three names follow the same snake_case verb_triangle_resource pattern (quote/fetch/search + triangle + leads/surplus). The shared domain prefix makes the grouping obvious and predictable.

Tool Count4/5

Three tools is at the low end but well matched to a narrow niche surface: quote, paid fetch, and a separate surplus search. Each earns its place, though the small set leaves little room for filtering or pagination options.

Completeness4/5

The core monetization flow (free quote → x402 payment → fetch leads) plus surplus search covers the stated domain end to end. Minor gaps remain: no way to check payment/balance status or manage an existing x402 session, and no explicit filtering parameters for either lead or surplus results.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues