CleanTextLab
Nettoyez le texte en désordre instantanément. Outils de navigateur rapides pour sauts de ligne, accents, listes, JSON et plus. Sans compte.
Docs
Strands Agents
Intégrez CleanTextLab MCP avec Strands Agents.
Prérequis
- Python 3.10+
- Clé API Pro CleanTextLab
- Strands Agents installé
python -m venv .venv
source .venv/bin/activate
pip install strands-agents
Option A : MCP local via npx (recommandé en dev local)
from strands import Agent
from strands.tools.mcp import MCPClient
from mcp import stdio_client, StdioServerParameters
cleantextlab = MCPClient(
lambda: stdio_client(
StdioServerParameters(
command="npx",
args=["-y", "cleantextlab-mcp"],
env={"CLEANTEXTLAB_API_KEY": "ctl_live_YOUR_KEY"},
)
)
)
with cleantextlab:
agent = Agent(tools=cleantextlab.list_tools_sync())
agent("Remove line breaks from: Hello\nworld")
Option B : MCP hébergé (SSE)
from strands import Agent
from strands.tools.mcp import MCPClient
from mcp import sse_client, SSEServerParameters
cleantextlab = MCPClient(
lambda: sse_client(
SSEServerParameters(
url="https://cleantextlab.com/api/mcp/sse",
headers={"x-api-key": "ctl_live_YOUR_KEY"},
)
)
)
with cleantextlab:
agent = Agent(tools=cleantextlab.list_tools_sync())
agent("Generate an ASCII tree from: src/app/page.tsx")
Pourquoi MCP pour les agents ?
- Sortie déterministe pour les tâches de formatage
- Moins de tokens en déléguant les opérations lourdes
- Outils réutilisables dans les workflows d’agents
Étapes suivantes
- Guide MCP : /docs/mcp-setup
- Référence API : /docs/api
- Automation Hub : /automation