Integrations mcp chainlit

From lza6/Armor-piercing-system-prompts · View interactive version

Integrations mcp chainlit is an AI agent skill from the GitHub repository lza6/Armor-piercing-system-prompts. Connect Langroid agents to MCP tools, web/search/file tools, Chainlit callbacks/UI, HTML logging, and external-service integrations.

How to use this skill

Skill file

integrations-mcp-chainlit

Use this sub-skill when a Langroid task needs to connect agents to external tools or service-facing integration layers: MCP servers, built-in web/search tools, safe local file tools, Chainlit UI callbacks, HTML task logs, quiet/status output control, or deterministic local smoke checks for those integrations.

Route before acting

Operating map

  1. Identify which integration boundary is needed: MCP, search, file tools, Chainlit UI, or logging/output.
  2. Load the narrow reference for that boundary:
  1. Prefer async APIs inside any async app, Chainlit callback, notebook, or test: use get_tool_async() / get_tools_async() and never wrap them in asyncio.run() from a running loop.
  2. Keep external-service checks bounded: verify imports, environment variables, local --help availability, and schemas before making live network calls. Do not require network for smoke tests.
  3. When validating MCP availability without external side effects, run the bundled smoke script:
python scripts/mcp_tool_smoke.py

Minimal decision table

| Need | Preferred Langroid entry point | Reference |

| --- | --- | --- |

| Build one MCP tool inside async code | await get_tool_async(server, "tool_name") | CODE1 |

| Build all MCP tools | await get_tools_async(server) | CODE1 |

| Customize MCP result formatting | subclass generated tool or use @mcp_tool with handle_async() | CODE2 |

| Web search tool | enable DuckduckgoSearchTool, TavilySearchTool, ExaSearchTool, GoogleSearchTool, or SeltzSearchTool | CODE5 |

| Safe local file read/write/list | ReadFileTool.create, WriteFileTool.create, ListDirTool.create | CODE3 |

| Chainlit UI around an agent/task | ChainlitAgentCallbacks or ChainlitTaskCallbacks | CODE2 |

| Suppress terminal noise or inspect logs | quiet_mode, async_stream_quiet, TaskConfig(enable_html_logging=...) | CODE3 |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.