MCP Nexus
Enables universal access to MCP tools and capabilities from external clients, client-side, and server-side within a Next.js application.
README
🔌 MCP Nexus
A comprehensive demonstration of Model Context Protocol (MCP) server with universal access capabilities
🌟 Overview
MCP Nexus is a Next.js application that showcases a fully-featured Model Context Protocol (MCP) server implementation. The project demonstrates how to build an MCP server that can be accessed from multiple entry points, making it a versatile solution for integrating AI capabilities into your applications.
✨ Key Features
🔄 Universal Access
The primary strength of this project is its ability to provide MCP server access through all possible channels:
- 🌐 External Clients - Connect from external tools like Cursor, Claude Desktop, or any MCP-compatible client
- 💻 Client-Side Access - Use MCP tools directly from your Next.js client components
- ⚙️ Server-Side Access - Leverage MCP capabilities in your Next.js API routes and server components
This multi-channel approach makes MCP Nexus a complete reference implementation for building production-ready MCP servers that can be integrated anywhere in your stack.
🚀 Live Demo
Try the public deployment here:
👉 https://mcp-nexus-fgka.onrender.com/
/api/health-check→ should returnOK/api/mcp/...endpoints are available for MCP clients
🚀 Getting Started
Prerequisites
- Node.js 25 or higher
- pnpm 10 or higher
Installation
pnpm install
Environment Variables
Create a .env file in the apps/web directory to configure the application:
# Server Configuration
NODE_ENV=development # Environment mode
HOSTNAME=localhost # Server hostname (default: localhost)
PORT=4004 # Next.js server port (default: 4004)
NEXT_PUBLIC_MCP_PORT=4005 # MCP server port (default: 4005)
NEXT_PUBLIC_OPENAI_SECURITY_KEY=123 # OpenAI security key (replace with your own key)
The .env file is already included in .gitignore and won't be committed to the repository. Make sure to create your own .env file based on your needs.
Development
Start the development environment (runs both Next.js app and MCP server):
pnpm dev
The application will be available at http://{host}:{port}, and the MCP server will be running in parallel.
But there's a proxy trick to redirect all requests to http://{host}:{port}/api/mcp to local MCP server through next.config.ts:
// next.config.ts
async rewrites() {
return [
{
source: '/api/mcp/:path*',
destination: `http://localhost:${mcp_port}/mcp/:path*`,
},
];
}
Running Specific Components
# Run only the Next.js app
pnpm --filter web dev:next
# Run only the MCP server
pnpm --filter web dev
Cleanup
Remove all node_modules and cache files:
pnpm clean
This will remove:
- All
node_modulesdirectories - Turbo cache (
.turbo) - Next.js build cache (
.next) - TypeScript build info (
.tsbuildinfo) - Build and dist directories
🛠️ API Endpoints
| Method | Path | Description | Response |
|---|---|---|---|
GET |
/api/health-check |
Checking application liveness | OK (200) |
POST |
/api/mcp/... |
MCP Protocol endpoints (via rewrite) | depends on request |
/api/health-check — a minimalistic route that always returns a status of 200 and the text "OK".
Useful for:
- health checks in Docker / Kubernetes
- monitoring service availability
- checking that the Next.js application launched correctly
🛠️ Tech Stack
- Framework: Next.js 25
- Language: TypeScript
- Monorepo: Turbo
- Package Manager: pnpm
- MCP SDK: @modelcontextprotocol/sdk
🎯 Use Cases
- Learning MCP - Understand how to implement MCP servers from scratch
- Integration Reference - See how to integrate MCP into Next.js applications
- Multi-Channel Access - Learn how to enable MCP access from client, server, and external tools
- Development Template - Use as a starting point for your own MCP-powered applications
📚 Learn More
📄 License
This project is open source and available for educational and development purposes.
Built with ❤️ to demonstrate the power of universal MCP access
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。