agda-mcp

agda-mcp

MCP server for Agda, providing type checking, go-to-definition, case splitting, auto proof search, and more directly from Claude Code or any MCP client.

Category
Visit Server

README

agda-mcp

MCP server for Agda, providing type checking, go-to-definition, case splitting, auto proof search, and more — directly from Claude Code or any MCP client.

Talks to agda --interaction-json (the same interface powering agda-mode in Emacs/VS Code), so it has access to all of Agda's interactive features without needing agda-language-server.

Installation

Prerequisites

  • Agda (tested with 2.8.0) — agda must be on your PATH
  • uv

1. Clone and build

git clone https://github.com/DreamLinuxer/agda-mcp.git
cd agda-mcp
uv sync

2. Add to your MCP client

Claude Code (globally, for all projects):

claude mcp add --scope user agda-lsp -- uv run --directory /path/to/agda-mcp agda-mcp

Other MCP clients — add to your client's MCP config:

{
  "mcpServers": {
    "agda-lsp": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/agda-mcp", "agda-mcp"],
      "type": "stdio"
    }
  }
}

Replace /path/to/agda-mcp with the absolute path where you cloned the repo.

Tools

File & navigation

Tool Description
agda_load Load/type-check a file, get goals + errors + warnings
agda_hover Symbol kind + definition site at a position
agda_definition Go to definition (file:line:col)

Goal manipulation (modify source)

Tool Description
agda_give Fill a hole with a complete solution
agda_elaborate_give Fill a hole with an elaborated solution
agda_refine Refine a goal (may create new subgoals)
agda_intro Introduce a constructor or lambda
agda_refine_or_intro Auto-choose between refine and intro
agda_case_split Case split on a variable in a goal
agda_auto Try to automatically solve a goal
agda_solve_one Solve a goal if determined by unification

Goal inspection

Tool Description
agda_goal_info Get the type and context of a goal
agda_goal_type Get just the type of a goal
agda_context Get the context (bindings) at a goal
agda_goal_type_context_infer Goal type + context + inferred type of expr
agda_goal_type_context_check Goal type + context + check expr against type
agda_infer_in_goal Infer type of an expression at a goal
agda_compute_in_goal Normalize an expression at a goal
agda_helper_function Generate helper function type for a goal
agda_why_in_scope_goal Explain where a name comes from (at a goal)
agda_module_contents_goal List module contents (at a goal)

Toplevel commands

Tool Description
agda_infer Infer the type of an expression
agda_compute Normalize/evaluate an expression
agda_why_in_scope Explain where a name comes from
agda_constraints Show all unsolved constraints
agda_metas Show all open goals/meta-variables
agda_search_about Search for definitions mentioning given names
agda_module_contents List names exported by a module
agda_solve_all Solve all goals determined by unification
agda_auto_all Try to automatically solve all goals

Usage examples

Load and type-check a file

agda_load("/path/to/file.agda")
→ Checked. No errors, warnings, or goals.

Infer a type

agda_infer("/path/to/file.agda", "map")
→ {a b : Set} {n : ℕ} → (a → b) → Vec a n → Vec b n

Evaluate an expression

agda_compute("/path/to/file.agda", "2 + 3")
→ 5

Case split

agda_case_split("/path/to/file.agda", 0, "xs")
→ f [] = ?
  f (x ∷ xs) = ?

Auto-solve a goal

agda_auto("/path/to/file.agda", 0)
→ a , b

How it works

The server spawns a single persistent agda --interaction-json process and communicates via the IOTCM protocol over stdio. File state (highlighting data for go-to-definition, goal types, diagnostics) is cached per file and refreshed on each agda_load call.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured