---
title: Stop LLMs guessing Go types.
description: Deterministic Context for Stochastic Models.
template: splash
hero:
  tagline: gopls-mcp replaces expensive text search with compiler-backed precision, saving tokens, cutting latency, and preserving your agent’s critical attention span.
  image:
    html: |
      <div style="
        font-family: Consolas, 'Courier New', monospace;
        font-size: 0.85em;
        line-height: 1.5;
        text-align: left;
        background: #ffffff;
        color: #24292e;
        border: 1px solid #eaeaea;
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.04);
        overflow: hidden;
      ">

        <div style="padding: 16px 20px; border-bottom: 1px solid #f0f0f0;">
          <div style="color: #6a737d; font-size: 0.8em; margin-bottom: 8px; display:flex; justify-content:space-between;">
            <span>📄 main.go</span>
            <span>Ln 12, Col 12</span>
          </div>
          <div style="position: relative;">
            <div style="color:#ccc; float:left; margin-right:12px; user-select:none;">11<br/>12<br/>13</div>
            <div style="overflow:hidden;">
              <span style="color:#d73a49">func</span> <span style="color:#6f42c1">main</span>() &#123;<br/>
              &nbsp;&nbsp;r := <span style="background: #e6ffec; border: 1px dashed #28a745; padding: 0 2px; border-radius: 2px;">gin.Default</span>() <span style="color:#6a737d; font-family: sans-serif; font-size: 0.8em;"> ->  what's the definition?</span><br/>
              &nbsp;&nbsp;r.Run()<br/>
            </div>
          </div>
        </div>

        <div style="padding: 16px 20px; background: #fafbfc;">
           <div style="color: #6a737d; font-size: 0.8em; margin-bottom: 10px; font-weight:bold; letter-spacing:0.05em;">
            ⚡ MCP PROTOCOL TRACE
          </div>

          <div style="margin-bottom: 12px;">
            <span style="color: #005cc5; font-weight: bold;">>> OUT (Request)</span>
            <div style="padding-left: 1.5em; margin-top: 4px; color: #444;">
              call_tool: <span style="color: #6f42c1;">go_definition</span><br/>
              args: { <span style="color: #22863a;">"line"</span>: <span style="color: #d73a49;">12</span>, <span style="color: #22863a;">"column"</span>: <span style="color: #d73a49;">12</span> }
            </div>
          </div>

          <div>
            <span style="color: #22863a; font-weight: bold;"><< IN (Response)</span>
            <div style="padding-left: 1.5em; margin-top: 4px;">
              result: {<br/>
              &nbsp;&nbsp;<span style="color: #22863a;">"summary"</span>: <span style="color: #032f62;">"func Default() *Engine"</span>,<br/>
              &nbsp;&nbsp;<span style="color: #22863a;">"location"</span>: { <span style="color: #22863a;">"file"</span>: <span style="color: #032f62;">".../gin.go"</span>, <span style="color: #22863a;">"line"</span>: <span style="color: #d73a49;">142</span> }<br/>
              }
            </div>
          </div>

        </div>

      </div>
  actions:
    - text: Equip AI Agent
      link: /quick-start/
      icon: rocket
      variant: primary
    - text: Case Study
      link: /case-studies
      icon: open-book
      variant: secondary
---

import GoDiagnostics from '../../components/mcp/GoDiagnostics.astro';
import GoDefinition from '../../components/mcp/GoDefinition.astro';
import GoReferences from '../../components/mcp/GoReferences.astro';
import GoCallHierarchy from '../../components/mcp/GoCallHierarchy.astro';

<style>{`
  /* CSS for fine-tuning Hero area */
  .hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
    background-image: radial-gradient(var(--sl-color-hairline-light) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  }

  :global(.hero h1) {
    font-weight: 900 !important;
    letter-spacing: -0.03em;
  }

  /* Adjust Hero image colors for light theme */
  :global([data-theme='light']) .hero html { color: #24292e; }
`}</style>


### MCP Provides Accurate Context to LLM

gopls-mcp offers fast and semantic accurate codebase analysis,
perserves LLM attention and save your tokens.


<style>{`
  .mcp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
  }
  .mcp-grid > * {
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }
`}</style>

<div class="mcp-grid">
  <GoDiagnostics />
  <GoReferences />
</div>


<div class="mcp-grid">
  <GoDefinition />
  <GoCallHierarchy />
</div>
