# Examples

## Quick Start — Claude Desktop / Cursor

Add to your MCP configuration:

```json
{
  "mcpServers": {
    "rolle": {
      "url": "https://api.rolle.io/api/mcp",
      "transport": "streamable-http"
    }
  }
}
```

## curl Examples

### List available tools

```bash
curl -s -X POST https://api.rolle.io/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":"1"}' | jq .
```

### Get fair price for iPhone 15 Pro in Greece

```bash
curl -s -X POST https://api.rolle.io/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/call","id":"1","params":{"name":"get_fair_price","arguments":{"model":"iPhone 15 Pro","location":{"country":"GR"}}}}' | jq .
```

### Search products

```bash
curl -s -X POST https://api.rolle.io/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/call","id":"1","params":{"name":"search_products","arguments":{"query":"Samsung Galaxy","location":{"country":"GB"},"limit":5}}}' | jq .
```

### Verify a listing

```bash
curl -s -X POST https://api.rolle.io/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/call","id":"1","params":{"name":"verify_listing","arguments":{"url":"https://www.ebay.co.uk/itm/198208103010"}}}' | jq .
```

### With API key

```bash
curl -s -X POST https://api.rolle.io/api/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer mcp_your_key_here" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":"1"}' | jq .
```

---

## Framework Integrations

### LangChain

```python
from langchain_mcp import MCPToolkit
from langchain_anthropic import ChatAnthropic
from langchain.agents import initialize_agent, AgentType

toolkit = MCPToolkit(server_url="https://api.rolle.io/api/mcp")
agent = initialize_agent(
    toolkit.get_tools(),
    ChatAnthropic(model="claude-sonnet-4-20250514"),
    agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
)
result = agent.run("What's the fair price for an iPhone 15 Pro in Athens?")
```

### CrewAI

```python
from crewai import Agent, Task, Crew
from crewai_tools import MCPServerAdapter

rolle_tools = MCPServerAdapter(
    server_url="https://api.rolle.io/api/mcp"
).tools()

buyer = Agent(
    role="Electronics Buyer",
    goal="Find the best deal on secondhand electronics",
    tools=rolle_tools,
    llm="claude-sonnet-4-20250514",
)

crew = Crew(
    agents=[buyer],
    tasks=[Task(
        description="Find an iPhone 15 Pro under €700 in Athens",
        agent=buyer,
    )],
)
crew.kickoff()
```

### OpenAI Agents SDK

```python
from openai.agents import Agent, Runner

agent = Agent(
    name="Electronics Shopper",
    model="gpt-4o",
    tools=[{
        "type": "mcp",
        "server_url": "https://api.rolle.io/api/mcp",
    }],
)
Runner(agent=agent).run(
    "What's the fair price for a Samsung Galaxy S24 Ultra in London?"
)
```

### Generic MCP Client

```json
{
  "mcpServers": {
    "rolle": {
      "url": "https://api.rolle.io/api/mcp",
      "transport": "streamable-http"
    }
  }
}
```
