Metadata-Version: 2.4
Name: flowiq-mcp
Version: 0.1.0
Summary: A read-only MCP server for FlowIQ
License-Expression: MIT
Project-URL: Homepage, https://flowiq-labs.com
Project-URL: Documentation, https://flowiq-labs.com/api-docs
Project-URL: Source, https://github.com/flowiq-labs/flowiq
Project-URL: Issues, https://github.com/flowiq-labs/flowiq/issues
Keywords: internet measurement,attack surface,exposure,threat intelligence,osint,security,search,mcp,model context protocol
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet
Classifier: Topic :: Security
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: flowiq>=0.1.0
Dynamic: license-file

<!-- mcp-name: com.flowiq-labs/flowiq-mcp -->
# flowiq-mcp

Lets an assistant (Claude and anything else that speaks the Model Context Protocol) search FlowIQ. It runs
on your machine, talks to the assistant on stdin and stdout, and calls the FlowIQ API with your key. It can
only read: it cannot start an export, change your account or contact a host.

Python 3.9 or later and the `flowiq` client beside it. No other packages.

## Set it up

    pip install flowiq-mcp

which installs the `flowiq` client with it. Or run it without installing, with [uv](https://docs.astral.sh/uv/): `uvx flowiq-mcp`.

Then tell the assistant to start `flowiq-mcp`. In Claude Desktop that is `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "flowiq": {
      "command": "flowiq-mcp",
      "env": { "FLOWIQ_API_KEY": "sk_live_..." }
    }
  }
}
```

Without installing, from a checkout in `/path/to/flowiq`:

```json
{
  "mcpServers": {
    "flowiq": {
      "command": "python3",
      "args": ["-m", "flowiq_mcp"],
      "env": {
        "FLOWIQ_API_KEY": "sk_live_...",
        "PYTHONPATH": "/path/to/flowiq/clients/python:/path/to/flowiq/clients/mcp"
      }
    }
  }
}
```

(On Windows the two paths are separated by `;`.) In Claude Code, with the key already in your environment:

    claude mcp add flowiq -- flowiq-mcp

The key is in that file in the clear, so keep the file yours. The assistant never sees it.

## The tools

| tool | what it answers | credits |
|---|---|---|
| `search` | records that match a query; 25 unless asked for more, 200 at most | 1 a record, at least 1 |
| `count` | how many services and hosts match | 1 |
| `host` | everything held about one address | 1 a service on it, plus 1 to count them first |
| `domain` | names under a domain; 25 unless asked for more, 200 at most | 1 a name, at least 1 |
| `breakdown` | the most common values of a field; 25 unless asked for more, 200 at most | 1 a value, at least 1 |
| `fields` | the fields `breakdown` accepts | none |
| `query_help` | the query language, without a network call | none |
| `account` | credits left | none |

`host` does not fetch an address with more than 100 services unless it is told it may (`max_credits`): a
machine that answers on two thousand ports costs two thousand credits.

Answers are compact JSON: empty values are left out, long text is cut and says so, and every answer that
costs something says how much (`credits`). Titles, banners and names are written by whoever runs a service,
so the tools tell the assistant that they are data and not instructions, and characters that would be
invisible arrive as visible escapes. That lowers the risk of a page giving your assistant orders. It does not
remove it: keep the assistant's other tools on a leash when it reads what strangers wrote.

FlowIQ records what a service returned. It makes no claim that a host is vulnerable.

## Protocol

It answers both kinds of client: those that speak 2026-07-28 (no handshake) and those that begin with
`initialize` (2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05).

## Tests

    cd clients/mcp
    python -m unittest

They use the client and the fake server of `clients/python` and no network. `query_help.json` is generated from
the server's own description of the query language, and updated with each release.
