---
title: "AI assistants (MCP)"
description: "Let Claude, Cursor or any MCP client query a project, read-only."
canonical_url: "https://docs.logstrace.dev/guides/integrations/mcp"
---
# AI assistants (MCP)

> Let Claude, Cursor or any MCP client query a project, read-only.

LogsTrace has an [MCP](https://modelcontextprotocol.io) endpoint. An AI assistant connected to it can list your tables and query your logs, but can't change anything.

## Connect

1. **API keys** → create a key with **Read logs** access. Leave *Show IPs, emails and tokens* off unless the assistant needs them.
2. Open **Connect an AI assistant (MCP)** under the new key and copy the settings into your MCP client:

```json [mcp.json]
{
  "mcpServers": {
    "logstrace": {
      "url": "https://logstrace.dev/api/mcp",
      "headers": { "Authorization": "Bearer lgk_..." }
    }
  }
}
```

## Tools

<table>
<thead>
  <tr>
    <th>
      Tool
    </th>
    
    <th>
      Does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        list_tables
      </code>
    </td>
    
    <td>
      Tables, their columns (by number) and message counts
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        search_messages
      </code>
    </td>
    
    <td>
      Latest messages by text, level, channel or table
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        find_value
      </code>
    </td>
    
    <td>
      Every message containing one value, across tables
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        query_table
      </code>
    </td>
    
    <td>
      Rows or a summary (group, count, sum, average…) of one table
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        run_plan
      </code>
    </td>
    
    <td>
      Up to 6 steps in order; a step can filter by values from an earlier one
    </td>
  </tr>
</tbody>
</table>

All tools are read-only and work on the key's project only.

<warning>

Whatever the tools return goes to your assistant's AI provider. Use a masked key unless you need the hidden values, and revoke the key when you stop using it.

</warning>

## Limits

- 60 requests per minute per key; one query at a time per key.
- Each call returns at most 100 rows per step and stops after 15 seconds.
- Log text is data from your applications: a message can't make the assistant do anything LogsTrace allows only for people.


## Sitemap

See the full [sitemap](https://docs.logstrace.dev/sitemap.md) for all pages.
