Skip to main content

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)
This enables LLMs to become autonomous operators of the Agent Sentinel platform.
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. Pass use_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

Use MCP for autonomous operations: Let LLMs manage policies, approve actions, and analyze costs without manual intervention.
Combine with function calling: Use Claude 4.x or GPT-4 with function calling to enable fully autonomous platform management.
Secure your API tokens: MCP gives LLMs full access to your platform. Use read-only tokens for analysis tasks, and carefully control write access.

See also