> ## Documentation Index
> Fetch the complete documentation index at: https://docs.credprotocol.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Connect your AI agent or application to Cred Protocol MCP services

# Getting Started with MCP Services

This guide shows you how to connect to Cred Protocol's MCP services using different methods.

## Prerequisites

All MCP endpoints require an API key. Generate one from the [Cred Protocol Dashboard](https://app.credprotocol.com/dashboard).

## Method 1: HTTP Endpoints (Simplest)

The easiest way to use MCP services is through the HTTP endpoints.

### Base URL

```
https://api.credprotocol.com/mcp
```

### Quick Test

```bash theme={null}
# Get a credit score
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.credprotocol.com/mcp/score/vitalik.eth"

# List available tools
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.credprotocol.com/mcp/tools"
```

### Response

```json theme={null}
{
  "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "score": 774,
  "decile": 5,
  "range": "good",
  "model_version": "andromeda_1.0",
  "timestamp": "2026-03-31T06:21:16.423948Z",
  "source": "live"
}
```

## Method 2: Cursor IDE Integration

If you're using [Cursor](https://cursor.sh), you can integrate Cred Protocol as an MCP server.

### Step 1: Configure Cursor

Add to your `.cursor/mcp.json` file:

```json theme={null}
{
  "mcpServers": {
    "cred-protocol": {
      "url": "https://api.credprotocol.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

### Step 2: Use in Cursor

Once configured, you can ask Cursor's AI:

> "What's the credit score for vitalik.eth?"

The AI will automatically call the MCP tool and respond with the result.

## Method 3: Claude Code

For [Claude Code](https://claude.ai/code) (CLI, desktop app, or IDE extensions), add to your project's `.mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "cred-protocol": {
      "type": "url",
      "url": "https://api.credprotocol.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

Once configured, you can ask Claude Code directly:

> "What's the credit score for vitalik.eth?"

## Method 4: Claude Desktop

For [Claude Desktop](https://claude.ai/download), add to your MCP configuration:

```json theme={null}
{
  "mcpServers": {
    "cred-protocol": {
      "url": "https://api.credprotocol.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

## Method 5: Custom HTTP Client

Build your own client using standard HTTP requests:

### Python

```python theme={null}
import httpx

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.credprotocol.com/mcp"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

async def get_credit_score(address: str) -> dict:
    """Get credit score via MCP HTTP endpoint."""
    async with httpx.AsyncClient() as client:
        response = await client.get(
            f"{BASE_URL}/score/{address}",
            headers=HEADERS,
        )
        return response.json()

# Usage
score = await get_credit_score("vitalik.eth")
print(f"Score: {score['score']} ({score['range']})")
```

### JavaScript/TypeScript

```typescript theme={null}
const API_KEY = "YOUR_API_KEY";
const BASE_URL = "https://api.credprotocol.com/mcp";

async function getCreditScore(address: string): Promise<CreditScore> {
  const response = await fetch(`${BASE_URL}/score/${address}`, {
    headers: { Authorization: `Bearer ${API_KEY}` },
  });
  return response.json();
}

// Usage
const score = await getCreditScore("vitalik.eth");
console.log(`Score: ${score.score} (${score.range})`);
```

## Available Endpoints

All endpoints require `Authorization: Bearer YOUR_API_KEY` header.

**Score & Reports:**

| Endpoint                                         | Method | Description                             |
| ------------------------------------------------ | ------ | --------------------------------------- |
| `/mcp/score/{address}`                           | GET    | Get credit score                        |
| `/mcp/score/batch`                               | POST   | Batch score multiple addresses          |
| `/mcp/score/aggregate?addresses=...`             | GET    | Aggregated score for multiple addresses |
| `/mcp/summary/{address}`                         | GET    | Get financial summary                   |
| `/mcp/report/{address}`                          | GET    | Comprehensive multi-chain credit report |
| `/mcp/report/{address}/summary`                  | GET    | Summary report (no per-chain details)   |
| `/mcp/report/{address}/chain/{chain_id}`         | GET    | Single-chain detailed report            |
| `/mcp/report/{address}/chain/{chain_id}/summary` | GET    | Single-chain summary                    |

**Portfolio:**

| Endpoint                                    | Method | Description                       |
| ------------------------------------------- | ------ | --------------------------------- |
| `/mcp/portfolio/{address}`                  | GET    | Get total portfolio value         |
| `/mcp/portfolio/{address}/chain/{chain_id}` | GET    | Get chain-specific portfolio      |
| `/mcp/portfolio/{address}/composition`      | GET    | Portfolio breakdown by asset type |

**Identity & Graph:**

| Endpoint                          | Method | Description                     |
| --------------------------------- | ------ | ------------------------------- |
| `/mcp/identity/{address}`         | GET    | Get identity attestations       |
| `/mcp/identity/{address}/sybil`   | GET    | Sybil detection score           |
| `/mcp/graph/{address}?chain_id=1` | GET    | Transaction graph visualization |

**Agents (ERC-8004):**

| Endpoint                                        | Method | Description                        |
| ----------------------------------------------- | ------ | ---------------------------------- |
| `/mcp/agents/count`                             | GET    | Total registered agents            |
| `/mcp/agents`                                   | GET    | Paginated agent list               |
| `/mcp/agents/search?q={query}`                  | GET    | Search agents by name/description  |
| `/mcp/agents/{agent_id}`                        | GET    | Get agent info by ID               |
| `/mcp/agents/{agent_id}/reputation`             | POST   | Submit reputation feedback (10 CU) |
| `/mcp/agents/{agent_id}/reputation`             | GET    | Read reputation summary (1 CU)     |
| `/mcp/agents/{agent_id}/reputation/status/{id}` | GET    | Track submission status            |
| `/mcp/tools`                                    | GET    | List all available tools           |

## Next Steps

<CardGroup cols={2}>
  <Card title="Explore Tools" icon="wrench" href="/mcp-services/tools">
    Learn about each available tool
  </Card>

  <Card title="See Examples" icon="code" href="/mcp-services/examples">
    Practical usage examples
  </Card>
</CardGroup>
