NEI MCP Server
A server for interacting with the NEI platform to query project resources.
nei-mcp-server
一个基于 fastmcp 的工具服务器,用于与 NEI 平台进行交互,提供查询 NEI 项目资源的能力。
核心功能
本项目将 NEI 平台的常用功能封装为一系列 MCP 工具,方便快速查询和集成。支持的工具如下:
sync_nei_project: 强制从远程 NEI 平台同步最新的项目数据,并更新本地缓存。当怀疑本地数据不是最新,或需要获取最近刚刚变更的后端接口、数据模型信息时,应首先调用此工具。search_interfaces_by_uri: 根据 URI(接口路径)模糊搜索 NEI 项目中的接口资源。search_interfaces_by_name: 根据接口名称模糊搜索 NEI 项目中的接口资源。search_groups_by_name: 根据分组名称搜索 NEI 项目中的业务分组。
环境准备
安装与配置
-
克隆项目
git clone https://github.com/leila-huang/nei-mcp-server.git cd nei-mcp-server -
安装依赖 使用 npm:
npm install或者 pnpm:
pnpm install
调试工具
-
inspect 调试 使用
fastmcp的inspect命令可以方便地在本地交互式地测试所有工具。需要在网页上配置上SERVER_URL和PROJECT_ID。npm run inspect该命令会提供一个交互式界面,你可以在其中选择要执行的工具并输入参数,非常适合用于调试和探索。
-
mcp 客户端调试
{ "mcpServers": { "nei-mcp-server": { "command": "npx", "args": ["tsx", "/PATH/TO/YOUR_PROJECT/src/index.ts"], "env": { "SERVER_URL": "xxx", "PROJECT_ID": "xxx" } } } }
mcp 使用指南
```bash
{
"mcpServers": {
"nei-mcp-server": {
"command": "npx",
"args": [
"-y",
"@leila329/nei-mcp-server"
],
"env": {
"SERVER_URL": "xxx",
"PROJECT_ID": "xxx"
}
}
}
}
```
缓存机制
为了提升性能并减少对 NEI 服务器的请求压力,本项目实现了一套简单的缓存策略:
- 内存缓存: 数据在首次加载后会存储在内存中。在服务单次运行期间,后续相同请求将直接从内存返回,避免重复的网络请求。服务重启后,内存缓存会清空。
- 网络同步: 服务启动时,或手动调用
sync_nei_project工具时,会从 NEI 远程服务器拉取最新的项目数据,并更新内存缓存。
你可以通过调用 sync_nei_project 工具来手动强制触发网络同步,以确保数据是最新版本。
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Gemini CLI RAG MCP
A RAG-based Q&A server using a vector store built from Gemini CLI documentation.
Image MCP Server
An MCP server for AI image generation using OpenAI and Replicate APIs.
NmapMCP
Integrates the Nmap network scanning tool with MCP, enabling network scanning capabilities within MCP-compatible environments.
Project Zomboid MCP Server
An AI-powered MCP server for Project Zomboid mod development, offering script validation, generation, and contextual assistance.
third-eye-mcp
Privacy-first screen capture MCP server for AI coding agents. Let Claude, Cursor, or any MCP-compatible AI see your screen with full control.
Geo Location Demo
Retrieves user geolocation information using EdgeOne Pages Functions and exposes it via the Model Context Protocol (MCP).
Code Scanner Server
Scans code files for definitions, respects .gitignore, and outputs in LLM-friendly formats like XML or Markdown.
Flux Schnell MCP Server
A text-to-image generation server using the Flux Schnell model.
Klever VM
MCP server for [Klever](https://klever.org) blockchain smart contract development, on-chain data exploration, and VM interaction. Public remote server available at `https://mcp.klever.org/mcp`.
Mong MCP Server
A moby-like random name generator for use with tools like Claude Desktop and VS Code Copilot Agent.