What is MCP?
The Model Context Protocol (MCP) provides a standardized way for LLMs to interact with external systems. Agent Sentinel’s MCP integration gives LLMs direct, structured access to:- Platform data (runs, approvals, stats, policies)
- Tool execution (create policies, approve actions, get metrics)
- Prompt templates (common workflows pre-configured)
MCPClient is fully async. Every method below is a coroutine and must be awaited inside an async function or via asyncio.run(...). The examples on this page wrap calls in an async def main() block accordingly.Quick start
MCPClient also supports the async context-manager protocol so the underlying httpx.AsyncClient is closed cleanly:
MCP tools
Tools allow LLMs to perform actions on the platform:Available tools
Example: Create a policy
Example: Approve an action
MCP resources
Resources provide read-only access to platform data:Available resources
Example: Access resources
MCP prompts
Prompts are pre-configured workflows that LLMs can execute:Available prompts
Example: Execute a prompt
Convenience methods
The MCP client provides convenience wrappers for common operations (also async):Using MCP with LLMs
The primary use case is giving LLMs tool-calling access to the platform:Caching
Tool / resource / prompt lists are cached in-process for performance. Passuse_cache=False to force a refresh on a single call:
Global client
Set a default MCP client for your application:set_default_client and get_default_client are sync helpers — only the network methods on the client itself are async.
The MCP module requires
httpx (installed automatically with pip install agentsentinel-sdk). If httpx is unavailable, set_default_client/get_default_client are not exported from agent_sentinel at the top level — import them directly from agent_sentinel.mcp as shown above.Best practices
See also
- Approvals - Human-in-the-loop workflow
- Policies - Policy configuration
- Platform API Overview - Platform API entry point
