Metadata-Version: 2.5
Name: mcpplug
Version: 0.0.1
Summary: A portable ToolSource interface for wiring external tool gateways (starting with Composio) into any agent loop.
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# McpPlug (Python)

Ported line-for-line from the TypeScript implementation. See the
[root README](../README.md) for the pitch and the scope decisions — this
file only covers what's specific to running the Python code.

## Install

```bash
pip install -e ".[dev]"
```

## Quickstart

Requires the [`composio`](https://docs.composio.dev) CLI installed and
authenticated (`composio link <toolkit>`) for whichever tools you list.

```python
from mcpplug import ComposioSourceOptions, connect_composio_source

github = await connect_composio_source(
    "gh", ComposioSourceOptions(slugs=["GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER"])
)

tools = await github.load_tools()
# -> [ToolDefinition(name='gh_GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER', ...)]

result = await tools[0].execute({"per_page": 5})
```

Merge `tools` into any agent's tool list — each `ToolDefinition` is the
same shape a loopengine-style `AgentConfig.tools` expects.

## Test

```bash
pytest
```

## Status

The `ToolSource` protocol and the Composio-backed source are real and
tested (`tests/test_composio_source.py` uses a stand-in CLI script, not a
live network call). Not yet published to PyPI.
