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
访问服务器

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选