agent-workspace-mcp
A TypeScript-aware MCP server that provides coding agents with repository discovery, code intelligence, and web project context for local codebases. It enables deep symbol navigation, diagnostic reporting, and structural analysis of monorepos without requiring full IDE integration.
README
agent-workspace-mcp
<div align="center">
<img src="./assets/logo.png" alt="agent-workspace-mcp logo" width="360" />
TypeScript-aware MCP server for repository discovery, code intelligence, and web workspace context.
English | 简体中文
</div>
English
agent-workspace-mcp is a local stdio MCP server that provides TypeScript-aware project context for local codebases without requiring a full IDE integration. It sits between raw file search and heavyweight editor tooling, helping MCP clients read repositories with explicit project boundaries.
It exposes a focused set of tools. get_diagnostics returns TypeScript syntactic and semantic diagnostics for a file. get_definition, get_references, and get_symbol_summary provide code navigation and symbol insight from 1-based source positions. discover_repository_structure scans a workspace for packages, workspace files, and tsconfig files. get_web_project_context adds frontend-oriented context such as entrypoints, routing surfaces, config files, and framework hints. reload_project clears cached TypeScript state and refreshes project metadata.
It is especially useful for monorepos, frontend applications, and local repository workflows where you want reliable answers to questions such as "which package should I inspect", "where is this symbol defined", or "does this repository look like a web app".
Quick Start
Run directly with npx:
npx -y agent-workspace-mcp@0.1.4
To configure Codex automatically without editing ~/.codex/config.toml by hand:
npx -y agent-workspace-mcp@0.1.4 --setup-codex
To print the installed package version:
npx -y agent-workspace-mcp@0.1.4 --version
Or install globally:
npm install -g agent-workspace-mcp
agent-workspace-mcp
MCP Client Configuration
For Codex, add this to ~/.codex/config.toml:
[mcp_servers.agent_workspace_mcp]
command = "npx"
args = ["-y", "agent-workspace-mcp"]
On Windows, if your MCP client struggles to resolve npx reliably, prefer:
[mcp_servers.agent_workspace_mcp]
command = "npx.cmd"
args = ["-y", "agent-workspace-mcp"]
If you use the one-shot setup command above, the package writes this entry for you automatically and uses npx.cmd on Windows.
For JSON-style MCP clients:
{
"mcpServers": {
"agent-workspace-mcp": {
"command": "npx",
"args": ["-y", "agent-workspace-mcp"]
}
}
}
If you prefer a local checkout instead of npx:
{
"mcpServers": {
"agent-workspace-mcp": {
"command": "node",
"args": ["C:/path/to/agent-workspace-mcp/dist/cli.js"]
}
}
}
The server fails fast on invalid input, uses filesystem and package metadata heuristics for repository classification, and keeps TypeScript language service state in memory so repeated calls are much faster after the initial load.
For development and contribution details, see CONTRIBUTING.md. For vulnerability reporting, see SECURITY.md. License terms are in LICENSE.
简体中文
agent-workspace-mcp 是一个本地 stdio MCP Server,用于在不依赖完整 IDE 集成的前提下,为本地代码仓库提供 TypeScript 感知的项目上下文。它介于简单文件搜索和重量级编辑器工具之间,适合为各类 MCP Client 提供更稳定的仓库级理解能力。
它提供一组收敛的工具能力。get_diagnostics 用于返回单文件的 TypeScript 语法和语义诊断;get_definition、get_references、get_symbol_summary 用于基于 1-based 行列号做定义跳转、引用查找和符号摘要;discover_repository_structure 用于扫描 workspace、package 和 tsconfig 结构;get_web_project_context 用于补充前端语境,比如入口文件、路由面、配置文件和框架线索;reload_project 用于清空缓存并重新加载 TypeScript 项目状态。
这个项目尤其适合 monorepo、前端应用和本地仓库分析场景。比如你想先判断应该查看哪个 package、某个符号真正定义在哪里,或者当前仓库是否更像一个 web app。
快速开始
直接通过 npx 运行:
npx -y agent-workspace-mcp@0.1.4
如果你不想手动编辑 ~/.codex/config.toml,可以直接执行:
npx -y agent-workspace-mcp@0.1.4 --setup-codex
如果你想查看当前包版本:
npx -y agent-workspace-mcp@0.1.4 --version
或者全局安装:
npm install -g agent-workspace-mcp
agent-workspace-mcp
MCP 客户端配置
如果你在用 Codex,可在 ~/.codex/config.toml 中加入:
[mcp_servers.agent_workspace_mcp]
command = "npx"
args = ["-y", "agent-workspace-mcp"]
如果你使用上面的自动配置命令,包会帮你写入这段配置;在 Windows 上会自动改用 npx.cmd。
如果你使用通用 JSON 风格的 MCP 配置:
{
"mcpServers": {
"agent-workspace-mcp": {
"command": "npx",
"args": ["-y", "agent-workspace-mcp"]
}
}
}
如果你希望直接从本地构建产物启动:
{
"mcpServers": {
"agent-workspace-mcp": {
"command": "node",
"args": ["C:/path/to/agent-workspace-mcp/dist/cli.js"]
}
}
}
这个服务对非法输入会直接失败,仓库和 Web 项目识别主要依赖文件系统与包元数据启发式,并且会在进程内缓存 TypeScript Language Service,所以首次加载后,后续调用会快很多。
如果你想参与开发或贡献代码,见 CONTRIBUTING.md;安全问题处理方式见 SECURITY.md;许可证见 LICENSE。
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。