Skip to main content
Glama
RudrenduPaul

NeuronScope MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
traceA

Run a forward pass of a small-to-medium open-weight language model (via TransformerLens) on one prompt, and report which attention heads and MLP neurons were most responsible for its predicted next token: heads ranked by direct logit attribution, neurons ranked by activation magnitude at the final prompt position. Call this to answer 'why did the model predict X' for a specific prompt. It only works on models TransformerLens's HookedTransformer.from_pretrained supports (GPT-2, Pythia, Llama, Gemma, Qwen, and similar open-weight checkpoints), not closed-source APIs like OpenAI or Anthropic models. Read-only and deterministic for a given model, prompt, and top_k: it writes nothing except the model's own weights, which HuggingFace Hub downloads to a local cache (~/.cache/huggingface) the first time a given model name is requested (needs network access that one time; later calls for the same model run offline from cache). Runs on CPU by default and can be slow for large models. On failure (an unsupported model name, or a prompt longer than the model's context window) it returns a structured error object instead of raising, so the tool call itself never fails silently. Parameters: model (str) is any name HookedTransformer.from_pretrained accepts, e.g. 'gpt2' or 'EleutherAI/pythia-70m'; prompt (str) is the input text; top_k (int, default 10) caps how many top heads and neurons are returned. Example call: model='gpt2', prompt='The capital of France is Paris. The capital of Japan is', top_k=5. Returns JSON with schema_version, operation, model (resolved name, backend, device, and layer/head/dimension counts), prompt, predicted_token, predicted_token_id, top_neurons (list of {layer, neuron_index, activation}), and top_heads (list of {layer, head_index, logit_attribution}).

activationsA

Dump raw per-layer activation summary statistics (shape, mean, std, min/max, and the max-activating sequence position) for one prompt run through an open-weight TransformerLens-supported model, covering every layer's residual stream, MLP neuron activations, and attention pattern. Call this when trace's top-k ranking isn't enough detail and you need the raw scale/shape of a specific hook point before deciding what to inspect further or patch with the patch tool. Same model constraint as trace: only models HookedTransformer.from_pretrained supports. Read-only and deterministic for a given model and prompt; the only side effect is HuggingFace Hub caching the model weights locally on first use of a given model name, which needs network access that one time. Runs on CPU by default. Output size scales with model depth since it returns stats for every layer, not a top-k subset, so it can be verbose for large models. On failure (unsupported model name, prompt too long for the context window) it returns a structured error object rather than raising. Parameters: model (str), any name HookedTransformer.from_pretrained accepts, e.g. 'gpt2'; prompt (str), the input text. Example call: model='gpt2', prompt='The capital of France is Paris. The capital of Japan is'. Returns JSON with schema_version, operation, model, prompt, n_tokens, and activations (list of {hook_name, layer, shape, mean, std, max_value, max_position, min_value}, one entry per hook point).

patchA

Zero-ablate one component (a single transformer block's layer plus a component type such as an attention output or MLP output) in an open-weight TransformerLens model's forward pass, and report how the predicted token and its logit changed relative to the unablated baseline. This is a minimal causal intervention: use it to test whether a component trace or circuit flagged as correlated with a prediction is actually causally responsible for it. Call it after trace or circuit has surfaced a candidate layer/component; it does not search for candidates itself. Read-only in the sense that it writes no files and the ablation only affects that single in-memory forward pass, nothing persists across calls; the same HuggingFace model-weight caching and CPU-by-default notes as trace apply. Deterministic for a given model, prompt, layer, and component. On failure it returns a structured error object instead of raising: an out-of-range layer raises LayerOutOfRangeError, an unsupported model name raises UnsupportedModelError, and a prompt exceeding the context window raises PromptTooLongError, all surfaced the same way. Parameters: model (str); prompt (str); layer (int), the zero-indexed transformer block to patch; component (str), one of resid_pre, resid_mid, resid_post, attn_out, mlp_out, mlp_post. Example call: model='gpt2', prompt='The capital of France is Paris. The capital of Japan is', layer=9, component='attn_out'. Returns JSON with schema_version, operation, model, prompt, layer, component, ablation_type ('zero'), baseline_predicted_token, baseline_predicted_token_id, baseline_top_logit, patched_predicted_token, patched_predicted_token_id, patched_top_logit, logit_delta, and prediction_changed (bool).

circuitA

Sketch a best-effort automated circuit for one prompt on an open-weight TransformerLens model: ranks candidate attention heads and MLP neurons by direct logit attribution, then measures each candidate's individual causal effect via single-component zero-ablation, so the result reflects components that actually move the prediction, not just ones correlated with it. Call this when trace's correlational ranking isn't enough and you want a causal pass across multiple candidates without manually calling patch on each one. This is NOT full path-patching with clean/corrupted prompt pairs and does not capture interaction effects between components; the response's own method field restates this caveat so a caller doesn't have to trust prose alone. For rigorous transcoder-based circuit discovery on a fixed set of supported models, use a dedicated tool such as Anthropic's circuit-tracer instead. Read-only, with the same model-weight caching, network-on-first-use, and CPU-by-default behavior as trace; more expensive than trace since it runs one extra forward pass per candidate component being ablated. Deterministic for a given model, prompt, and top_k. On failure it returns a structured error object rather than raising. Parameters: model (str); prompt (str); top_k (int, default 10), how many top-attributed components to test via ablation. Example call: model='gpt2', prompt='The capital of France is Paris. The capital of Japan is', top_k=5. Returns JSON with schema_version, operation, model, prompt, predicted_token, predicted_token_id, components (list of {layer, component_type: 'head' or 'neuron', index, logit_drop_on_ablation}), and method (a string explaining the approximation).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RudrenduPaul/NeuronScope'

If you have feedback or need assistance with the MCP directory API, please join our Discord server