AI Integration

AI Integration

Starting with version 1.16.4, you can now add a connection from the Veracity Learning LRS to an Artificial Intelligence (AI) agent. With this connection, you can ask the AI agent questions about learning data in the LRS.

The connection is an access key, an HTTP Basic Authentication key/secret pair, like you used to get xAPI into the LRS. However, this is a separate key only for Model Context Protocol (MCP) service. With the MCP service key (and a little configuration), an AI agent can read and interpret the learning activity data in your LRS.

How to Get an MCP Server Key

To connect an AI agent to your LRS you must set-up an MCP server key:
  1. Log-in to your LRS as the administrator.

  2. From the left menu, select the Management > All Management Tools option.

  3. Scroll-down to the Integration and Extensions section and click the AI integration button.



  4. In the MCP Integration page, click the Create API Key button.


 
This generates the key/secret pair you need for the AI agent to use your LRS as an MCP server. The page also shows an example of how to configure the AI agent and a tip on how to manage its access in the LRS.

How to Configure the AI Agent

To set-up an AI agent to work with your LRS via MCP, you must edit the configuration of its code-generation and knowledge extension. The configuration is almost always the same, but the location is not:
  1. Claude Codeclaude_desktop_config.json (app), .mcp.json (project), or ~/.claude.json (user)
  2. Google Antigravity~/.gemini/config/mcp_config.json (app)
  3. Microsoft VS Code.vscode/mcp.json (app)
  4. OpenAI Codex~/.codex/config.toml (app), or .codex/config.toml (project) 
To edit the MCP Service configuration of an AI Agent:
  1. Find and open the configuration JSON file.

  2. Within the configuration file, find the mcpServers object.

  3. Add a veracity-lrs entry.

  4. Set the serviceUrl to the address of the MCP key in your LRS: e.g., https://<lrs-name>.lrs.io/api/mcp.

  5. Add headers for the secret (password) for the key and the Content-Type (application/json).

  6. Save and close the file.
This is an example of the MCP server configuration for a typical AI agent:
"mcpServers": {
"veracity-lrs": {
"serverUrl": "https://sample-data-lrs.lrs.io/api/mcp",
"headers": {
"x-veracity-api-key": "593651c9-9a8f-4351-8136-c44d20e7d39b",
"Content-Type": "application/json"
}
}
}
Now, you can ask the AI agent specific questions about learning activity recorded in your LRS and tell it to analyze it.
Claude Code MCP Configuration
These directions help you if you want to connect an MCP to a Claude Code project. You must create a file called .mcp.json in your project directory (a “project directory” is just any folder on your computer where you want to work with Claude Code). Here's how to set it up:
  1. Create a folder for your work (if you don't have one already)

    bash (macOS/Linux):
    mkdir ~/my-lrs-project
    cd ~/my-lrs-project
    PowerShell (Windows)
    mkdir C:\Users\YourUsername\my-lrs-project
    cd C:\Users\YourUsername\my-lrs-project
  2. Create the .mcp.json file in that folder. If you run Claude from that directory, then it should load this configuration file automatically.

    bash:
    cat > .mcp.json << 'EOF'
    {
      "mcpServers": {
        "veracity-lrs": {
          "type": "http",
          "url": "https://yourLRSname.lrs.io/api/security/mcp",
          "headers": {
            "x-veracity-api-key": "your-veracity-apikey-goes-here"
          }
        }
      }
    }
    EOF
    Or just create the file manually with your text editor and paste the JSON:
    {
      "mcpServers": {
        "veracity-lrs": {
          "type": "http",
          "url": "https://yourLRSname.lrs.io/api/security/mcp",
          "headers": {
            "x-veracity-api-key": "your-veracity-apikey-goes-here"
          }
        }
      }
    }
  3. Start Claude Code from that folder

    bash:
    claude
When Claude Code starts, it loads your Veracity MCP server from the .mcp.json file in that directory.

Notes
Every time you run Claude Code, make sure you're in the folder with the .mcp.json file. Claude Code reads the configuration file in your current working directory.
 

    • Related Articles

    • LMS Integration

      The Veracity Learning LRS offers frictionless integration with your LMS to let teachers and students access the services of the LRS without leaving the LMS. We do this using the Learning Tools Interoperability (LTI) technical standard. LTI is a ...
    • SQL Integration

      Only the Enterprise version of the LRS supports SQL Integration. The Veracity LRS can send xAPI statements to a SQL database in real time. The LRS opens a connection to your SQL server, and synchs statements every 300 milliseconds. The LRS won’t ...
    • Elasticsearch Integration

      Overview The LRS can accelerate its dashboard and statement viewer by leveraging Elasticsearch in addition to MongoDB. When configured with the optional Elasticsearch connection, the LRS will synchronize xAPI statements in real time between these two ...
    • Power BI Integration

      How to get LRS data into Power BI You can easily connect the Veracity LRS to Microsoft Power BI. In the LRS, save a Statement Viewer report and create an API key. In Power BI, configure and activate a data download channel with this information. In ...
    • Single Sign On (SSO) Integration

      Veracity can integrate with your single sign on provider using OpenID Connect or Security Assertion Markup Language (SAML). This integration allows your enterprise users to log into the LRS user interface without providing a password. Integrating a ...