Integrate TRON.ASOC with MCP clients
The system supports the MCP (Model Context Protocol)—a standard for interaction between AI agents and external tools and data. TRON.ASOC acts as an MCP server and gives AI agents access to functions for managing vulnerabilities, scans, projects, and other system entities.
Implementation details:
- Protocol: JSON-RPC 2.0;
- Data transfer: Streamable HTTP (primary), SSE (legacy).
Requirements
Before you start, make sure that:
- TRON.ASOC version 1.6 is installed on your workstation;
- a compatible MCP client, such as Claude Code or Cursor, is installed on your workstation;
- your TRON.ASOC account has an API token with the required permissions. For more information about creating an API token, see Create an API token.
Authentication
To connect to the TRON.ASOC MCP server, use the X-API-Token header with a valid user API token.
The roles and policies of the user who makes the request determine access to the tools.
Server configuration
Configure the MCP server in the config.yml file:
mcp:
enabled: true
tools: \[] # пустой массив = все инструменты включены
To restrict the available tools, specify their names in the tools array:
mcp:
enabled: true
tools:
- asoc\_list\_projects
- asoc\_get\_project
- asoc\_list\_issues
Connect an MCP client
This section explains how to connect the Claude Code MCP client.
Follow these steps to connect an MCP client:
- Create or edit the
\~/.claude/mcp.jsonfile:
{
"mcpServers": {
"asoc": {
"type": "http",
"url": "https://<asoc-host>/mcp",
"headers": {
"X-API-Token": "<ваш-api-токен>"
}
}
}
}
- Test the connection with curl:
TOKEN="<ваш-api-токен>"
URL="https://<asoc-host>/mcp"
# 1. Инициализация сессии
SESSION=$(curl -s -D - -X POST $URL \\
-H "Content-Type: application/json" \\
-H "X-API-Token: $TOKEN" \\
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' \\
| grep -i "Mcp-Session-Id" | awk '{print $2}' | tr -d '\\r')
# 2. Подтверждение готовности клиента
curl -s -X POST $URL \\
-H "Content-Type: application/json" \\
-H "X-API-Token: $TOKEN" \\
-H "Mcp-Session-Id: $SESSION" \\
-d '{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}'
# 3. Получение списка инструментов
curl -s -X POST $URL \\
-H "Content-Type: application/json" \\
-H "X-API-Token: $TOKEN" \\
-H "Mcp-Session-Id: $SESSION" \\
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
# 4. Вызов инструмента
curl -s -X POST $URL \\
-H "Content-Type: application/json" \\
-H "X-API-Token: $TOKEN" \\
-H "Mcp-Session-Id: $SESSION" \\
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"asoc\_list\_projects","arguments":{}}}'
Available MCP tools
The tables below list MCP tools that you can use to work with system entities, for example, create a project or layer, change a vulnerability status, or start a scan.
Projects
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_list\_projects | Get a list of projects | View projects |
asoc\_get\_project | Get a specific project | View projects |
asoc\_create\_project | Create a project | Create and edit projects |
Layers
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_get\_project\_layer\_tree | Get the project layer hierarchy | View layers |
asoc\_list\_layers | Get a list of layers | View layers |
asoc\_get\_layer | Get layer information by ID | View layers |
asoc\_create\_layer | Create a layer | Create and edit layers |
Vulnerabilities
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_list\_issues | Get a list of vulnerabilities | View security issues |
asoc\_get\_issue | Get vulnerability information by ID | View security issues |
asoc\_update\_issue\_status | Change the vulnerability status | Update security issues |
asoc\_get\_issue\_statuses | Get vulnerability statuses | — |
asoc\_group\_update\_status | Change the status of multiple vulnerabilities | Update security issues |
asoc\_group\_update\_severity | Change the severity of multiple vulnerabilities | Update security issues |
asoc\_assign\_issue | Assign a person responsible | Assign a person responsible |
asoc\_get\_issue\_characteristics | Get vulnerability severity levels | — |
asoc\_get\_comments | Get comments | View comments |
asoc\_add\_comment | Add a comment | Comment |
asoc\_delete\_comment | Delete a comment | Delete comments |
asoc\_get\_mentions | Get mentions of the current user | — |
asoc\_mark\_mentions\_read | Mark mentions as read | — |
asoc\_mark\_comments\_read | Mark comments as read | View comments |
Scans
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_list\_scans | Get a list of scans | View security checks |
asoc\_get\_scan | Get scan information | View security checks |
asoc\_stop\_scan | Stop a scan | Manage security checks |
asoc\_list\_scan\_filters | Get scan filters | View security checks |
asoc\_compare\_scans | Compare two scans | View security checks |
Security checks
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_create\_check | Create a security check | Manage security checks |
asoc\_get\_check | Get security check information | View security checks |
asoc\_run\_check | Run a security check | Run security checks |
Statistics
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_stats\_open | Get data about open vulnerabilities | View security issues |
asoc\_stats\_all | Get overall statistics | View security issues |
asoc\_stats\_severity | Get severity statistics | View security issues |
asoc\_stats\_tool | Get tool statistics | View security issues |
asoc\_stats\_project | Get project statistics | View security issues |
asoc\_stats\_vulnerability | Get CWE/CVE statistics | View security issues |
Quality gates
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_list\_gates | Get a list of quality gates | View quality gate templates |
asoc\_get\_gate | Get quality gate data | View quality gate templates |
asoc\_get\_gate\_status\_for\_layer | Get the quality gate status for a layer | View quality gate templates |
asoc\_get\_gate\_status\_for\_check | Get the quality gate status for a security check | View quality gate templates |
asoc\_create\_gate | Create a quality gate | Manage quality gate templates |
asoc\_attach\_gate\_to\_check | Attach a quality gate to a security check | Manage quality gate templates |
asoc\_create\_condition | Create a quality gate condition | Manage quality gate templates |
Users
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_list\_users | Get a list of users | — |
asoc\_get\_user | Get user data by ID | — |
asoc\_get\_current\_user | Get data about the current user | — |
asoc\_list\_user\_api\_tokens | Get a list of the user's API tokens | — |
asoc\_delete\_api\_token | Delete an API token | — |
Task trackers
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_list\_trackers | Get a list of configured trackers | View trackers |
asoc\_get\_tracker | Get tracker information | View trackers |
asoc\_sync\_tracker\_task | Sync with a tracker task | Create tasks for trackers |
asoc\_unlink\_tracker\_task | Unlink a tracker task | Create tasks for trackers |
SBOMs and dependencies
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_list\_sboms | Get a list of SBOM files | View dependencies |
asoc\_list\_dependencies | Get a list of dependencies | View dependencies |
asoc\_get\_dependency | Get dependency data | View dependencies |
FP analysis
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_fp\_analyze | Run FP analysis | Work with FP analysis |
asoc\_fp\_get\_analysis | Get the FP analysis result | Work with FP analysis |
Other tools
| Tool | Purpose | System permissions |
|---|---|---|
asoc\_list\_reports | Get a list of reports | View reports |
asoc\_list\_severities | Get data about severity levels | — |
asoc\_list\_tools | Get a list of tools | View tools |
asoc\_create\_tool | Create a tool | Create and edit tools |
asoc\_update\_tool | Update a tool | Create and edit tools |
asoc\_list\_sources | Get a list of sources | View sources |
asoc\_create\_source | Create a source | Create and edit sources |
asoc\_update\_source | Update a source | Create and edit sources |
asoc\_visibility\_filter | Check access to entities | — |