Skip to main content
Version: 1.7

Integrating 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 vulnerability, scan, project, and other system entity management functions.

Implementation characteristics:

  • Protocol: JSON-RPC 2.0;
  • Data transfer: Streamable HTTP (primary), SSE (legacy).

Requirements​

Before you start, make sure that:

  • TRON.ASOC version 1.7 is installed on your workstation;
  • a compatible MCP client, such as Claude Code or Cursor, is installed on your workstation;
  • an API token with the required access permissions has been created for your TRON.ASOC account. For more information about creating an API token, see Create an API token.

Authentication​

The TRON.ASOC MCP server uses the X-API-Token header, which contains a valid user API token.

The user's roles and policies determine access to the tools. The request runs on behalf of this user.

Server configuration​

Configure the MCP server in the config.yml file:

mcp:
enabled: true
tools: \[] # пустой массив = все инструменты включены

To limit the available tools, specify their names in the tools array:

mcp:
enabled: true
tools:
- asoc_list_projects
- asoc_get_project
- asoc_list_issues

Connecting an MCP client​

This section explains how to connect the Claude Code MCP client.

To connect the MCP client, follow these steps:

  1. Create or edit the \~/.claude/mcp.json file:
{
"mcpServers": {
"asoc": {
"type": "http",
"url": "https://<asoc-host>/mcp",
"headers": {
"X-API-Token": "<ваш-api-токен>"
}
}
}
}
  1. Verify 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 perform actions on system entities, for example, create a project or layer, change a vulnerability status, or start a scan.

Projects​

ToolPurposeUser system permissions
asoc_list_projectsGet a list of projectsView projects
asoc_get_projectGet a specific projectView projects
asoc_create_projectCreate a projectCreate and edit projects

Layers​

ToolPurposeUser system permissions
asoc_get_project_layer_treeGet the project layer hierarchyView layers
asoc_list_layersGet a list of layersView layers
asoc_get_layerGet layer information by IDView layers
asoc_create_layerCreate a layerCreate and edit layers

Vulnerabilities​

ToolPurposeUser system permissions
asoc_list_issuesGet a list of vulnerabilitiesView security issues
asoc_get_issueGet vulnerability information by IDView security issues
asoc_update_issue_statusChange a vulnerability statusUpdate security issues
asoc_get_issue_statusesGet vulnerability statuses—
asoc_group_update_statusChange the status of multiple vulnerabilitiesUpdate security issues
asoc_group_update_severityChange the severity of multiple vulnerabilitiesUpdate security issues
asoc_assign_issueAssign an ownerAssign an owner
asoc_get_issue_characteristicsGet vulnerability severity levels—
asoc_get_commentsGet commentsView comments
asoc_add_commentAdd a commentComment
asoc_delete_commentDelete a commentDelete comments
asoc_get_mentionsGet mentions of the current user—
asoc_mark_mentions_readMark mentions as read—
asoc_mark_comments_readMark comments as readView comments

Scans​

ToolPurposeUser system permissions
asoc_list_scansGet a list of scansView security checks
asoc_get_scanGet scan informationView security checks
asoc_stop_scanStop a scanManage security checks
asoc_list_scan_filtersGet scan filtersView security checks
asoc_compare_scansCompare two scansView security checks

Security checks​

ToolPurposeUser system permissions
asoc_create_checkCreate a security checkManage security checks
asoc_get_checkGet security check informationView security checks
asoc_run_checkRun a security checkRun security checks

Statistics​

ToolPurposeUser system permissions
asoc_stats_openGet data about open vulnerabilitiesView security issues
asoc_stats_allGet overall statisticsView security issues
asoc_stats_severityGet severity statisticsView security issues
asoc_stats_toolGet tool statisticsView security issues
asoc_stats_projectGet project statisticsView security issues
asoc_stats_vulnerabilityGet CWE/CVE statisticsView security issues

Quality gates​

ToolPurposeUser system permissions
asoc_list_gatesGet a list of quality gatesView quality gate templates
asoc_get_gateGet quality gate dataView quality gate templates
asoc_get_gate_status_for_layerGet the quality gate status for a layerView quality gate templates
asoc_get_gate_status_for_checkGet the quality gate status for a security checkView quality gate templates
asoc_create_gateCreate a quality gateManage quality gate templates
asoc_attach_gate_to_checkAttach a quality gate to a security checkManage quality gate templates
asoc_create_conditionCreate a quality gate conditionManage quality gate templates

Users​

ToolPurposeUser system permissions
asoc_list_usersGet a list of users—
asoc_get_userGet user data by ID—
asoc_get_current_userGet data about the current user—
asoc_list_user_api_tokensGet a list of the user's API tokens—
asoc_delete_api_tokenDelete an API token—

Issue trackers​

ToolPurposeUser system permissions
asoc_list_trackersGet a list of configured trackersView trackers
asoc_get_trackerGet tracker informationView trackers
asoc_sync_tracker_taskSync with a tracker taskCreate tracker tasks
asoc_unlink_tracker_taskUnlink a tracker taskCreate tracker tasks

SBOMs and dependencies​

ToolPurposeUser system permissions
asoc_list_sbomsGet a list of SBOM filesView dependencies
asoc_list_dependenciesGet a list of dependenciesView dependencies
asoc_get_dependencyGet dependency dataView dependencies

FP analysis​

ToolPurposeUser system permissions
asoc_fp_analyzeRun FP analysisWork with FP analysis
asoc_fp_get_analysisGet the FP analysis resultWork with FP analysis

Other tools​

ToolPurposeUser system permissions
asoc_list_reportsGet a list of reportsView reports
asoc_list_severitiesGet severity level data—
asoc_list_toolsGet a list of toolsView tools
asoc_create_toolCreate a toolCreate and edit tools
asoc_update_toolUpdate a toolCreate and edit tools
asoc_list_sourcesGet a list of sourcesView sources
asoc_create_sourceCreate a sourceCreate and edit sources
asoc_update_sourceUpdate a sourceCreate and edit sources
asoc_visibility_filterCheck access to entities—