Skip to content

Managing apps with AI agents

The AppsHub MCP server provides tools for connecting AI agents to pSeven Enterprise AppsHub. This allows you to manage engineering applications and calculations using natural language commands through an AI agent. For example, you can automate multiple app runs and transfer the results to another run.

What you can do

Once connected, an AI agent can, on your behalf, find and inspect apps to see what inputs they need and what outputs they produce, run them with your own input values or with another run's output as input, upload and read files, and track, debug, interrupt, or delete runs.

The agent can only discover, inspect, and run the apps you already have access to - it cannot modify apps or access workspaces you cannot see.

Before you start

To connect to an MCP server, make sure you have:

  • Access to AppsHub in your pSeven Enterprise account.
  • The pSeven deployment URL of the form https://<pseven-host>/mcp/.
  • Your AppsHub API token - in pSeven Enterprise, click and select API Token.

The MCP server uses the Streamable HTTP transport and expects the Authorization: Token <AppsHub API token> header. It can be configured through the UI, the CLI, or by manually editing the JSON configuration.

Warning

Through the API token, a connected AI agent acts fully on your behalf - it can run apps, consume compute and license resources, and read any file you can access. Only connect AI agents you trust.

Connecting an AI agent

Configuration differs by client. Expand the one you use, set it up with your deployment URL and API token, then send a test prompt to check the connection.

AnythingLLM

In AnythingLLM, MCP servers are added via a configuration file. See also MCP on AnythingLLM Desktop.

  1. In the desktop client, click Open settings, then in the settings menu, select Agent skills.
  2. In the MCP Servers section, click Edit MCP config and add your MCP configuration to the anything_llm_mcp_servers.json file:

    {
      "mcpServers": {
        "pseven": {
          "type": "streamable",
          "url": "https://<pseven-host>/mcp/",
          "enabled": true,
          "headers": {
            "Authorization": "Token <AppsHub API token>"
          }
        }
      }
    }
    
  3. Save the changes. If the MCP server didn't appear, refresh the list.

  4. In the settings menu, select AI Providers and configure the model.
Chatbox

Chatbox allows you to add MCP servers through the UI or import a JSON configuration. See also Configuring MCP Service.

  1. In the settings menu, select MCP and click Add Server > Add Custom Server.

    Importing JSON

    To import a JSON configuration, click Add Server > Import from JSON in clipboard. If you set up your MCP server this way, skip the steps 2-4.

  2. Specify the name, select the Remote (http/sse) type and enter the pSeven deployment URL of the form https://<pseven-host>/mcp/.

  3. In the HTTP Header field, enter your AppsHub API token of the form Authorization=Token <AppsHub API token>.
  4. Check the connection and save the changes.
  5. In the settings menu, select Model Provider and configure the model.
  6. On the main page, in a chat, click MCP and enable your MCP server.
OpenAI Codex

In Codex, MCP servers are configured through the UI, the CLI, and configuration file. See also Connect Codex to an MCP Server.

  1. In the desktop client, in the settings menu, select MCP servers and click + Add server.

    Configuring via the CLI and editing the config file

    To set up an MCP server via the CLI, run the command:

    codex mcp add pseven \
        --url https://<pseven-host>/mcp/ \
        --header "Authorization=Token <AppsHub API token>"
    

    To manually edit the config file, add your data to ~/.codex/config.toml.

    [mcp_servers.pseven]
    url = "https://<pseven-host>/mcp/"
    http_headers = { "Authorization" = "Token <AppsHub API token>" }
    

    If you set up an MCP server this way, skip the steps 2-5.

  2. Enter the server name, select the Streamable HTTP type.

  3. In the URL field, enter the pSeven deployment URL of the form https://<pseven-host>/mcp/.
  4. In the Bearer token env var field, enter your API token exactly as it is copied from pSeven Enterprise.
  5. Save the changes.
Cherry Studio

Cherry Studio allows you to configure MCP servers through the UI. See also Configure and use MCP.

  1. In the settings menu, select Model provider and configure the model you are going to use. To get the API key for the model, click Get API key. To check the connection after the key is added, click Check.
  2. In the settings menu, select MCP Servers and click + Add > Quick create to configure the server via the UI.

    Configuring the JSON file

    To import your MCP server's JSON config, in the settings menu, select MCP Servers and click + Add > Import from JSON. In the editor, specify your configuration:

    {
      "mcpServers": {
        "pseven": {
          "type": "streamableHttp",
          "url": "https://<pseven-host>/mcp/",
          "headers": {
            "Authorization": "Token <AppsHub API token>"
          }
        }
      }
    }
    

    If you import the JSON file, skip the steps 3-5.

  3. Specify the name of your MCP server and select the Streamable HTTP type.

  4. In the URL field, enter the pSeven deployment URL of the form https://<pseven-host>/mcp/.
  5. In the Headers field, enter your token in the form Authorization=Token <AppsHub API token>.
  6. Save the changes and enable the server.
  7. On the main page, in the chat, select the previously configured model, then click MCP Servers > Manual and select your MCP server.
OpenCode

In OpenCode, the MCP server is configured via a configuration file and the CLI. See also OpenCode. MCP servers.

  1. Open the opencode.jsonc config and add your MCP server configuration:

    {
      "mcp": {
        "pseven": {
          "type": "remote",
          "url": "https://<pseven-host>/mcp/",
          "enabled": true,
          "headers": {
            "Authorization": "Token <AppsHub API token>"
          }
        }
      }
    }
    
  2. Add your model provider's credentials with the /connect command, then select a model with /models.

Prompt examples

Once connected, try prompts like these:

  • What apps can I run?
  • What does this app do, and what inputs does it need?
  • Run it with these values...
  • Upload this file and use it as the input data...
  • Feed the result of this run into another app.
  • Is it done yet? What is its current state?
  • Why did the last run fail?