Generic MCP

Use this integration to connect to an MCP server and automatically discover its available tools.

Utilities · Generic MCP MCP

Details

IDGeneric MCP
ProviderOpen Source
CategoryUtilities
From Version8.13.0
Docker Imagedemisto/mcp:1.0.0.10120494

Authentication Type (9 options)

Select the authentication method.

Basic Token Bearer Api-Key RawToken OAuth 2.0 Dynamic Client Registration OAuth 2.0 Authorization Code OAuth 2.0 Client Credentials No Authorization

Connection settings

Parameter Name Type Required Default
Server URL base_url Short text Yes
Authentication Type auth_type Single select Yes
Client ID oauth_credentials Credentials No
Authorization code auth_code Credentials No
Redirect URI redirect_uri Short text No https://oproxy.demisto.ninja/authcode
Custom headers custom_headers Long text No
Authorization Endpoint authorization_endpoint Short text No
Token Endpoint token_endpoint Short text No
Scope scope Short text No
API Token / API Key token Credentials No
Username credentials Credentials No
Server Name server_name Short text No
Trust any certificate (not secure) insecure Boolean No

Commands (4)

An MCP server publishes no fixed command set: list-tools and call-tool are the protocol plumbing, and the tools they reach are discovered from the remote server when the instance connects. The pack cannot name them ahead of time, so neither can this page.

  • call-tool

    Calls a specific tool on the MCP server with optional input parameters.

  • generic-mcp-auth-test

    Test the authentication configuration with the MCP server.

  • generic-mcp-generate-login-url

    Generate an authentication login URL.

  • list-tools

    Retrieves a list of available tools in the MCP server.

import pytest

from GenericMCP import validate_required_params, AuthMethods


def test_validate_required_params_valid_basic_auth():
    """
    Given: Valid basic authentication parameters.
    When: validate_required_params is called with BASIC auth type.
    Then: No exception should be raised.
    """
    validate_required_params(
        base_url="https://example.com",
        auth_type=AuthMethods.BASIC,
        user_name="testuser",
        password="testpass",
        token="",
        client_id="",
        client_secret="",
    )


def test_validate_required_params_basic_auth_missing_credentials():
    """
    Given: Basic authentication type with missing password.
    When: validate_required_params is called.
    Then: ValueError should be raised.
    """
    with pytest.raises(ValueError, match="Username and Password are required for basic authentication"):
        validate_required_params(
            base_url="https://example.com",
            auth_type=AuthMethods.BASIC,
            user_name="testuser",
            password="",
            token="",
            client_id="",
            client_secret="",
        )


def test_validate_required_params_oauth_missing_credentials():
    """
    Given: OAuth authentication type with missing client_secret.
    When: validate_required_params is called.
    Then: ValueError should be raised requiring Client ID and Client Secret.
    """
    with pytest.raises(ValueError, match="Client ID, Client Secret are required for OAuth authentication"):
        validate_required_params(
            base_url="https://example.com",
            auth_type=AuthMethods.CLIENT_CREDENTIALS,
            user_name="",
            password="",
            token="",
            client_id="test_client_id",
            client_secret="",
        )