home / mcp / togmal mcp server

ToGMAL MCP Server

Taxonomy of Generative Model Apparent Limtations MCP

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "hetalksinmaths-togmal-mcp": {
      "command": "python",
      "args": [
        "togmal_mcp.py"
      ]
    }
  }
}

You can run ToGMAL MCP Server locally to analyze LLM interactions in real time, helping you spot speculative or unsafe patterns while keeping analysis private to your environment.

How to use

Run the server locally and use an MCP client to invoke the available tools. Start by launching the server from a terminal, then connect with the client to analyze prompts, analyze responses, submit evidence, and retrieve taxonomy or statistics as needed.

How to install

Prerequisites you need before installation are Python 3.10 or higher and the pip package manager.

Install the necessary dependencies with pip.

pip install mcp pydantic httpx --break-system-packages

Start the MCP server by running the main script using Python.

python togmal_mcp.py

Configuration and running notes

The server is designed to run as a local, privacy-preserving MCP processor. It provides several tools for analysis and taxonomy management and exposes its functions through the standard MIC client interface.

Key tools you can access through the MCP client include prompt analysis, response analysis, evidence submission, taxonomy retrieval, and statistics retrieval. Use these tools to build a robust safety workflow around LLM interactions.

If you need to run the server in a production-like environment, consider wrapping it with a process manager and ensuring your Python environment stays isolated (e.g., virtualenv or equivalent).

Examples of programmatic usage

From a client, you can asynchronously analyze a prompt or response using the MCP tools. The client pattern generally follows opening a connection to the server and invoking the named tool with the required parameters, then handling the structured result.

# Example usage pattern (pseudo-code)
from mcp.client import Client

async def analyze_prompt(prompt: str):
    async with Client("togmal") as client:
        result = await client.call_tool(
            "togmal_analyze_prompt",
            {"prompt": prompt, "response_format": "json"}
        )
        return result

Troubleshooting and notes

If you encounter startup issues, ensure Python 3.10+ is installed and that the working directory contains togmal_mcp.py. Check for common issues such as missing dependencies or conflicting Python environments. If necessary, recreate a clean virtual environment and reinstall dependencies before attempting to start again.

Available tools

togmal_analyze_prompt

Analyzes a user prompt before the LLM processes it to detect speculative physics, overly ambitious coding requests, or medical advice that needs disclaimers.

togmal_analyze_response

Analyzes an LLM response for potential issues like ungrounded medical advice, dangerous file operations, or unsupported statistical claims.

togmal_submit_evidence

Submits evidence of LLM limitations to improve the taxonomy with human-in-the-loop confirmation and unique entry tracking.

togmal_get_taxonomy

Retrieves entries from the taxonomy database, with optional filtering by category and severity for research and guideline generation.

togmal_get_statistics

Provides a statistical overview of taxonomy entries, severity distribution, and database capacity.