Metadata-Version: 2.5
Name: clens-mcp
Version: 1.0.2
Summary: Contextal Lens MCP server
Project-URL: Homepage, https://clens.io/
License-File: LICENSE.txt
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: contextal
Requires-Dist: fastmcp
Description-Content-Type: text/markdown

# Contextal Lens MCP server

An STDIO MCP server for analyzing local files with Contextal Lens. It supports
executables, DLLs, archives, documents, email, installers, images, and other
formats supported by the backend.

## Setup

Install [uv](https://docs.astral.sh/uv/getting-started/installation/) and add the
server to your MCP client:

```json
{
  "mcpServers": {
    "clens": {
      "command": "uvx",
      "args": ["clens-mcp"],
      "env": {
        "CTX_URL": "https://your-contextal-lens-endpoint.example",
        "CTX_TOKEN": "replace-with-your-token"
      }
    }
  }
}
```

## Tool

`analyse_file(path)` sends a local file to Contextal Lens and returns its content
graph and security signals. Its description covers generic requests such as
"check whether this file is safe" as well as explicit Clens requests.

The tool description tells agents to call `analyse_file` directly for file-safety
requests, including "controllami che questo file sia sicuro", without first
opening or preprocessing the file. MCP exposes tools; the client/model decides
when to call them, so a server description cannot guarantee automatic selection.
See [tool selection](MCP_INSTALLATION.md#tool-selection) for details and
troubleshooting.

## License
This package is distributed under the MIT License. See the LICENSE.txt file for more details.
