Skip to main content
Trusys MCP (Model Context Protocol) is a server that connects your AI coding assistant to the Trusys platform. It enables your assistant to manage applications, prompt libraries, and run evaluations directly from your IDE.

Remote MCP Endpoint

Hosted by Trusys:
  • Default: https://mcp.trusys.ai/mcp
  • SSE-compatible (for Antigravity): https://mcp.trusys.ai/sse

What is Trusys MCP?

Trusys MCP allows your AI assistant to:
  • Manage Applications - Create and configure AI applications and LLM models
  • Manage Prompt Libraries - Create, edit, and organize prompt libraries with assertions
  • Run Functional Evaluations - Test application quality using prompt libraries
  • Run Security Evaluations - Perform red-team testing and security audits
  • Enable Monitoring - Set up OpenLIT traces and Pulse monitoring for production applications
  • Configure Guardrails - Add validators and TruGuard for input/output safety
The MCP server runs remotely (hosted by Trusys) or locally, and your IDE communicates with it via HTTP.

Integration with Your IDE


Using Trusys MCP

After connecting your IDE to Trusys MCP, you can ask your assistant to perform various tasks.

1. Functional Evaluation (Quality Testing)

Test your applicationโ€™s quality using prompt libraries and assertions: Ask your assistant:
  • โ€œRun an evaluation on my appโ€
  • โ€œTest my application with Trusysโ€
  • โ€œCreate a prompt library and evaluate localhost:3000โ€
Workflow:
  1. Create or select an application
  2. Create a prompt library with assertions
  3. Run evaluation via CLI

2. Security Evaluation (Red-Team Testing)

Run security and red-team tests on your application: Ask your assistant:
  • โ€œRun a security eval on my appโ€
  • โ€œRed-team test the chatbot applicationโ€
  • โ€œCreate a security config with prompt-injection testsโ€
Workflow:
  1. Specify your application
  2. Reuse existing security configuration or create a new one
  3. Define vulnerable categories and test plugins
  4. Run security evaluation via CLI
Notes:
  • If a security configuration already exists for your app, the assistant reuses it
  • Specify โ€œnew security configurationโ€ to create a fresh config

3. Pulse Monitoring

Set up production monitoring for your application: Ask your assistant:
  • โ€œEnable Pulse monitoring on my appโ€
  • โ€œGenerate traces for my projectโ€
  • โ€œSet up OpenLIT for Trusysโ€
Workflow:
  1. Create or select an application
  2. Enable monitoring with sampling configuration
  3. Define functional and security metrics to monitor
  4. Initialize OpenLIT in your application code
  5. Restart your app and generate traffic
  6. View traces in Trusys Monitoring dashboard
Environment Configuration:
export OTEL_EXPORTER_OTLP_ENDPOINT=https://otel.trusys.ai
export OTEL_SERVICE_NAME=<your-application-id>
Code Setup:
import openlit
openlit.init()

4. Guardrails (TruGuard)

Add input and output validators to protect your application: Ask your assistant:
  • โ€œAdd guardrails to my appโ€
  • โ€œEnable TruGuard with prompt injection and PII checksโ€
Workflow:
  1. Create or select an application
  2. Configure input validators (before model processing)
  3. Configure output validators (before returning to user)
  4. Set enforcement actions (fail, mask, encrypt, fix)
  5. Initialize TruGuard in your application code
  6. Restart your app
Environment Configuration:
export TRUSYS_APPLICATION_ID=<your-application-id>
export TRUSYS_API_KEY=<your-api-key>
Code Setup:
from trusys import truguard
truguard.init()

Test Connectivity

Start by verifying the connection:
"Check my Trusys API connection"
The assistant will use the trusys_ping tool to verify connectivity.

Troubleshooting

401 Unauthorized

Issue: Authentication failed Solution:
  • Verify your API key is correct
  • Ensure youโ€™re passing x-api-key or Authorization: Bearer header
  • Check that TRUSYS_API_KEY is set on the MCP server if using prefer_header

400 Bad Request on x-trusys-base-url

Issue: Invalid custom API URL Solution:
  • Verify the URL uses proper format (http:// or https://)
  • Ensure the URL is valid with no extra userinfo
  • Check that the host is reachable

403 Forbidden with x-trusys-base-url

Issue: Server doesnโ€™t allow custom base URLs Solution:
  • Omit the x-trusys-base-url header and use the default
  • Use a different MCP deployment for your organization
  • Contact your Trusys administrator

Pulse Monitoring Enabled but No Traces

Issue: Monitoring is configured but traces donโ€™t appear Solution:
  • Verify metrics[] is properly configured
  • Check that security config has a valid purpose if security evaluation is enabled
  • Ensure OpenLIT is initialized in your application
  • Confirm OTEL environment variables are set correctly
  • Restart your application after configuration changes

Guardrails Show Disabled

Issue: Validators are saved but Application shows Disabled status Solution:
  • Ensure enable_guard_rails: true was sent with the guardRails configuration
  • Both fields must be sent together in the same create/update request
  • Restart your application after configuration changes

General Health Check

Check the MCP server health:
curl https://mcp.trusys.ai/health
Should return ok without requiring an API key.