Metadata-Version: 2.4
Name: mcpstat-sdk
Version: 0.1.0
Summary: Python SDK for MCPStat telemetry
Author: MCPStat
License-Expression: MIT
Project-URL: Homepage, https://mcpstat.com
Project-URL: Repository, https://github.com/mcpstattech/python-sdk
Project-URL: Documentation, https://github.com/mcpstattech/python-sdk/tree/main/docs/en
Project-URL: Issues, https://github.com/mcpstattech/python-sdk/issues
Keywords: mcp,telemetry,mcpstat,observability
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# MCPStat Python SDK

Python SDK for MCPStat telemetry.

## Installation

```sh
pip install mcpstat-sdk
```

Requires Python 3.10+. There are no runtime dependencies.

## Quick start

```python
import os

from mcpstat_sdk import Client

client = Client(os.environ["MCPSTAT_COUNTER_KEY"], environment="production")

with client.tool_call("search", transport="streamable_http") as call:
    results = search(query)
    call.success(result_count=len(results))

# Run after completing the application response, at a point chosen by your application.
result = client.flush()
```

`search` and `query` belong to your application. The synchronous `flush()` sends the batch once;
your application decides when to call it. It is not an automatic background task.

## Documentation

- [English](https://github.com/mcpstattech/python-sdk/blob/main/docs/en/README.md)
- [Русский](https://github.com/mcpstattech/python-sdk/blob/main/docs/ru/README.md)

## License

[MIT](https://github.com/mcpstattech/python-sdk/blob/main/LICENSE).
