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
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
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.