> For the complete documentation index, see [llms.txt](https://docs.saharaai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saharaai.com/sorin/tools-as-a-service.md).

# Tools as a Service (TaaS)

That gives your agent the data and tools needed to run crypto research, monitor markets, evaluate trading setups, investigate unfamiliar tokens, track catalysts, and power other crypto workflows without separately integrating each exchange, data source, project database, or news feed. Your preferred agent still handles the reasoning and decides how to use the results; TaaS provides the crypto-specific data and analysis functions underneath it.

For example, you can ask your agent to:

* identify an unfamiliar token from its contract address, explain the project, and find recent onchain events around it
* compare BTC or SOL spot and perpetual markets and determine whether funding and open interest support the move
* research a protocol using project information, documentation, sentiment, and recent news before writing an analysis
* pull structured market data while building or evaluating a trading strategy
* surface recent listings, announcements, or other events related to a project or theme

There is no SDK to adopt, no prompt to rewrite, and no data plumbing to maintain. When connected to our TaaS MCP, your agent can decide when a question needs market data, and the tool answers.

{% hint style="info" %}
TaaS is live. **Agent as a Service** — calling Sorin's own agent from your code over HTTP — ships next and has its own guide.
{% endhint %}

## When to use TaaS

Use Tools as a Service when **you already have an agent and want to give it crypto-specific data and analysis tools.**

TaaS works well for:

* crypto research and analyst agents
* market monitoring and alerting
* trading strategy research and development
* coding agents building crypto applications
* trading dashboards and internal analyst tools
* Discord and Telegram bots
* token and project due diligence
* automated news and catalyst tracking
* backtesting and strategy workflows

### Tools as a Service vs. Agent as a Service (AaaS)

Tools as a Service and the upcoming Agent as a Service expose different parts of Sorin.

| <p><br></p>      | Tools as a Service                           | Agent as a Service                           |
| ---------------- | -------------------------------------------- | -------------------------------------------- |
| **Agent**        | Yours                                        | Sorin                                        |
| **What you get** | Sorin's data and analysis tools              | Sorin's full agent and reasoning             |
| **Best for**     | Giving an existing agent crypto capabilities | Calling Sorin directly from your application |
| **Interface**    | MCP                                          | HTTP                                         |
| **Status**       | **Live**                                     | Coming soon                                  |

**TaaS:** your agent decides what to research, which tools to call, and how to combine the results.

**AaaS:** your application calls Sorin and Sorin handles the research and reasoning itself.

## How it works

```
Your agent  ──MCP (stdio)──▶  Sahara MCP server  ──HTTPS──▶  Sahara      ──▶  Sahara's
(Claude Code, Codex,          npx package,                   key check,       market data and
 Cursor, your own client)     runs locally                   quota, credits   knowledge base
```

The Sahara AI MCP server is an npm package that runs locally alongside your agent. It already knows where to reach Sahara AI, so the only credential you need to configure is your TaaS API key in the [Sorin app](https://heysorin.ai).

Once connected, the five TaaS tools appear alongside whatever tools your agent already has.

Every tool is read-only. TaaS can retrieve data and analysis, but it **cannot move funds, place orders, sign transactions, or change your Sahara AI account.**&#x20;

## Quickstart

{% stepper %}
{% step %}

### Create a key

In the [Sorin app](https://heysorin.ai) open **Profile → API Key → Tools as a Service → New key**.

The full key is shown **once, at creation**, and looks like `ckb_live_…`.&#x20;

After creation, the API Key panel only shows the last four characters. If you lose the full key, revoke it and create a replacement.

You can have up to **5 active TaaS keys**.

Treat your key like a password: anyone with it can use your TaaS allowance and credits.
{% endstep %}

{% step %}

### Add the MCP server

The creation panel prints a ready-to-paste config for Codex, Claude Desktop, and Claude Code. That copy block is always the authoritative one for your account. Configs for other agents are in [Agent examples](broken://pages/81a1c2eadbeab6b4c05aed14099b443d320971a5#agent-examples) below.
{% endstep %}

{% step %}

### Ask your agent something

Once connected, use your agent normally.

For example:

```
Fetch current market analysis for SOL and list the strongest spot and perpetual signals.
```

The agent picks `get_market_analysis`, calls it, and answers from the result.&#x20;

If your agent does not use a TaaS tool when expected, mention Sahara AI or the tool name explicitly once:

> Use the Sahara `get_market_analysis` tool for this.
> {% endstep %}
> {% endstepper %}

## Plans, allowance, and credits

TaaS has two separate usage meters: **daily query allowance** and **credits**.

|                      | Free Plan                        | PLUS Plan                   |
| -------------------- | -------------------------------- | --------------------------- |
| Full queries per day | 30, shared by all your TaaS keys | Unlimited                   |
| Active keys          | 5                                | 5                           |
| Credits              | Charged per successful call      | Charged per successful call |

### Daily query allowance

Free plans receive **30 TaaS queries per day**.

All TaaS keys on your account share the same allowance. Creating additional keys does not create additional daily queries.

The allowance resets at **00:00 UTC**.

PLUS Plans have no daily TaaS query cap.

TaaS and Agent as a Service use separate daily query allowances.

### Credits

Credits are shared across your Sorin account.

Successful calls are charged dynamically based on the tools and underlying services used to complete the request rather than at one flat rate.

PLUS plans removes the daily query cap, but calls still consume credits.

### Rate limits

Requests are also rate-limited per API key per minute, with a higher limit for PLUS plans.

If you reach the per-minute limit, wait and retry. This limit is separate from your daily query allowance.

The **API Key** panel in the [Sorin app ](https://heysorin.ai)is the live source of truth for your current limits and usage.

### What you are charged for

Charging happens per **logical tool call**.

Some tools may use several underlying services to return one result. `search_crypto_knowledge` and `get_project_profile`, for example, can perform multiple upstream lookups while appearing to your agent as a single call.

Billing follows these rules:

* successful calls consume credits based on the work completed
* partial results are charged proportionally for the portions that successfully returned
* if every underlying service for a call fails, the call is refunded
* if your balance is insufficient, the request is rejected before data is fetched and costs nothing

## The five tools

TaaS currently exposes five read-only tools:

| Tool                      | What it answers                                                                                                                                                                                           | Input                                                                                                                           |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `search_crypto_knowledge` | <p>Search crypto knowledge across projects, documentation, and news.</p><p></p><p>Use it for broader research questions about a project, protocol, ecosystem, or crypto topic.</p>                        | `query`, optional `types` (`projects` \| `docs` \| `news`), optional `limit` (≤10, default 5)                                   |
| `get_project_profile`     | <p>Identify a crypto project and retrieve its profile.</p><p></p><p>Projects can be resolved from a symbol, project name, slug, or token address.</p>                                                     | `identifier`                                                                                                                    |
| `get_market_packet`       | <p>Retrieve unified spot and perpetual market data for a symbol.</p><p></p><p>Use it when your agent needs structured market data across spot and perp markets in the same workflow.</p>                  | `symbol`, optional `interval` (`1m`–`1d`), `limit` (≤50, default 10), `startDate`, `endDate`, `exchange`, data-source overrides |
| `get_market_analysis`     | Retrieve current market-structure analysis and screening signals, including funding, basis, and open interest.                                                                                            | `symbol`, optional `interval` (`15m`, `1h`, `4h`, `1d`; default `15m`), `marketType` (`spot` \| `perp`; default `spot`)         |
| `get_recent_events`       | <p>Retrieve recent analyzed events and news matching a token, project, or keyword.</p><p></p><p>Use it to track announcements, listings, ecosystem activity, airdrops, and other recent developments.</p> | `query`, optional `limit` (≤20, default 10)                                                                                     |

TaaS responses are deliberately bounded so they can be used efficiently inside an agent's context window.

For example:

* knowledge search returns summaries instead of full documents
* recent events return matching analyzed summaries
* market history defaults to 10 rows per section, with a maximum of 50
* market analysis reports freshness from the latest source candle rather than returning unnecessary raw candles

This keeps tool responses focused on the information the agent requested instead of filling its context with unnecessary source data.

## Agent examples

Every example below uses the same three components:

1. `npx`
2. Sahara AI's MCP package: `@saharaai/sahara-dip-mcp@0.1.2`
3. Your TaaS key in the `CRYPTO_KB_API_KEY` environment variable

The exact package version and configuration shown in your Sorin API Key panel is authoritative.

Replace `ckb_live_xxx` with your own key.

### Claude Code

```bash
claude mcp add --scope user sahara \
  --env CRYPTO_KB_API_KEY=ckb_live_xxx \
  -- npx -y @saharaai/sahara-dip-mcp@0.1.2
```

Verify with `/mcp` inside Claude Code, then try:

```
Use the Sahara tools to get the market packet for ETHUSDT on the 4h interval and tell me
whether perp open interest is confirming the spot move.
```

### Codex CLI

```bash
codex mcp add sahara \
  --env CRYPTO_KB_API_KEY=ckb_live_xxx \
  -- npx -y @saharaai/sahara-dip-mcp@0.1.2
```

Or edit `~/.codex/config.toml` directly:

```toml
[mcp_servers.sahara]
command = "npx"
args = ["-y", "@saharaai/sahara-dip-mcp@0.1.2"]

[mcp_servers.sahara.env]
CRYPTO_KB_API_KEY = "ckb_live_xxx"
```

Confirm with `codex mcp get sahara` and restart Codex. Then:

```
Search the Sahara knowledge base for recent Hyperliquid docs and news, then summarise
what changed in the last month.
```

### Claude Desktop

`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, `%APPDATA%\Claude\claude_desktop_config.json` on Windows:

```json
{
  "mcpServers": {
    "sahara": {
      "command": "npx",
      "args": ["-y", "@saharaai/sahara-dip-mcp@0.1.2"],
      "env": {
        "CRYPTO_KB_API_KEY": "ckb_live_xxx"
      }
    }
  }
}
```

Restart Claude Desktop, then:

```
What is the project behind the token address 0x…? Give me its profile and any recent
events about it.
```

### Cursor

`~/.cursor/mcp.json` for every project, or `.cursor/mcp.json` inside one project:

```json
{
  "mcpServers": {
    "sahara": {
      "command": "npx",
      "args": ["-y", "@saharaai/sahara-dip-mcp@0.1.2"],
      "env": {
        "CRYPTO_KB_API_KEY": "ckb_live_xxx"
      }
    }
  }
}
```

Check **Settings → MCP** for a green server, then ask in Agent mode:

```
Before you write the strategy, fetch SOL market analysis on 1h for both spot and perp
and pick the side with the stronger signal.
```

{% hint style="warning" %}
A project-level `.cursor/mcp.json` is committed by default — keep the key in the user-level file instead, or reference an environment variable your shell already exports.
{% endhint %}

### Windsurf

`~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "sahara": {
      "command": "npx",
      "args": ["-y", "@saharaai/sahara-dip-mcp@0.1.2"],
      "env": {
        "CRYPTO_KB_API_KEY": "ckb_live_xxx"
      }
    }
  }
}
```

```
Find recent listing-related events for Binance and group them by exchange.
```

### Cline (VS Code)

Open **Cline → MCP Servers → Configure**, which edits `cline_mcp_settings.json`:

```json
{
  "mcpServers": {
    "sahara": {
      "command": "npx",
      "args": ["-y", "@saharaai/sahara-dip-mcp@0.1.2"],
      "env": {
        "CRYPTO_KB_API_KEY": "ckb_live_xxx"
      },
      "disabled": false
    }
  }
}
```

```
Compare BTC and ETH market analysis on 4h perp and tell me which one funding favours.
```

### Gemini CLI

`~/.gemini/settings.json`:

```json
{
  "mcpServers": {
    "sahara": {
      "command": "npx",
      "args": ["-y", "@saharaai/sahara-dip-mcp@0.1.2"],
      "env": {
        "CRYPTO_KB_API_KEY": "ckb_live_xxx"
      }
    }
  }
}
```

```
List the recent events mentioning restaking and cite the projects involved.
```

### Your own agent (MCP SDK)

Any MCP client library that supports stdio can spawn the same Sahara AI MCP server.

Using the TypeScript MCP SDK:

```ts
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';

const transport = new StdioClientTransport({
  command: 'npx',
  args: ['-y', '@saharaai/sahara-dip-mcp@0.1.2'],
  env: { ...process.env, CRYPTO_KB_API_KEY: process.env.SAHARA_TAAS_KEY! },
});

const client = new Client({ name: 'my-agent', version: '1.0.0' });
await client.connect(transport);

console.log(await client.listTools()); // the five tools above

const result = await client.callTool({
  name: 'get_market_analysis',
  arguments: { symbol: 'SOL', interval: '1h', marketType: 'perp' },
});
console.log(result.content);
```

`listTools()` returns the five TaaS tools.

Pass those tool definitions to your model and forward its calls to `callTool()` to make the tools available inside your own agent.

### Prompt cookbook

Use these prompts to test each tool after a fresh install:

| Tool                      | Prompt                                                                                   |
| ------------------------- | ---------------------------------------------------------------------------------------- |
| `search_crypto_knowledge` | "Search the Sahara knowledge base for EigenLayer docs and news, 5 results each."         |
| `get_project_profile`     | "Resolve the profile for the symbol JUP and tell me what the project does."              |
| `get_market_packet`       | "Get the market packet for BTCUSDT, 1h, 20 rows, and summarise spot versus perp volume." |
| `get_market_analysis`     | "Fetch current market analysis for ETHUSDT on 4h perp and list the strongest signals."   |
| `get_recent_events`       | "Show the 10 most recent analyzed events matching 'airdrop'."                            |

### Optional settings

| Variable               | Purpose                                                                   |
| ---------------------- | ------------------------------------------------------------------------- |
| `CRYPTO_KB_API_KEY`    | Your TaaS key. The only one you need.                                     |
| `CRYPTO_KB_TIMEOUT_MS` | Request timeout in milliseconds, default `15000`. Raise it on slow links. |

## Errors

| Error                     | Meaning                                                          | Fix                                                                       |
| ------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `AUTHENTICATION_FAILED`   | HTTP 401 — the key is wrong, revoked, or missing                 | Check the key in your agent's config; restart the agent after changing it |
| `AUTHORIZATION_FAILED`    | HTTP 403 — the key is valid but is not allowed to make this call | Create a fresh TaaS key in the panel and use that                         |
| `UPSTREAM_HTTP_ERROR`     | Sahara returned a non-2xx                                        | Retry; if it persists the symbol or identifier may not resolve            |
| `UPSTREAM_REQUEST_FAILED` | Network, timeout, or fetch failure                               | Retry; raise `CRYPTO_KB_TIMEOUT_MS` for slow links                        |

After replacing or revoking a key, **restart the MCP client** so it reloads the new environment.

## Troubleshooting

<details>

<summary>The agent does not see the tools.</summary>

Restart the agent. MCP servers are typically loaded when the client starts.

If the tools still do not appear, confirm that `npx` is available on the agent's `PATH`.

GUI applications may not inherit the same shell profile as your terminal.

</details>

<details>

<summary>Every call returns <code>AUTHENTICATION_FAILED</code>.</summary>

The API key is likely missing, stale, revoked, or truncated.

Create a new TaaS key in Sorin and paste the **entire** `ckb_live_…` value into your configuration.

Then restart the agent.

</details>

<details>

<summary>"Daily query allowance reached."</summary>

All TaaS keys on your account share one daily TaaS allowance.

Standard allowances reset at **00:00 UTC**.

PLUS plans removes the daily TaaS query cap.

</details>

<details>

<summary>The agent answers from memory instead of calling a tool.</summary>

Try mentioning Sahara or the relevant tool explicitly.

For example:

> Use the Sahara `get_market_analysis` tool before answering.

</details>

<details>

<summary>A key leaked.</summary>

Revoke the key immediately from the Sorin API Key panel.

Create a replacement and restart every MCP client that used the old key.

Revocation takes effect within seconds.

</details>
