salimdev04
MCP Serversalimdev04public

mcp with monad

使用 Next.js 实现的 MCP 服务器,提供前端界面与工具交互。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
TypeScript
Language
MIT License
License

About This Server

使用 Next.js 实现的 MCP 服务器,提供前端界面与工具交互。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP Server with Frontend Interface

A Next.js implementation of the Model Context Protocol (MCP) server with a frontend interface for interacting with MCP tools.

Features

  • MCP server implementation using the @modelcontextprotocol/sdk
  • Two client options:
    • Standard MCP Client (uses Redis for communication)
    • Direct API Client (bypasses Redis for more reliable testing)
  • Sample tools: echo, time, calculate
  • Redis connection status monitoring

Usage

Server Configuration

Update app/mcp.ts with your tools, prompts, and resources following the MCP TypeScript SDK documentation.

Running Locally

  1. Install dependencies:

    pnpm install
    
  2. Set up a Redis instance:

    # Start Redis locally
    redis-server
    
    # Or configure a cloud Redis URL in .env
    echo "REDIS_URL=your_redis_url_here" > .env.local
    
  3. Start the development server:

    pnpm dev
    
  4. Open http://localhost:3000 to access the frontend interface.

Client Options

Standard MCP Client

  • Uses the full MCP protocol with Redis for communication
  • Requires a working Redis connection
  • Access at http://localhost:3000/mcp-client

Direct API Client

  • Bypasses Redis and calls the MCP tools directly via API
  • More reliable for testing but doesn't use the full MCP protocol
  • Access at http://localhost:3000/direct-client

Troubleshooting

If you're experiencing timeout issues with the standard MCP client:

  1. Make sure Redis is running locally (redis-server)
  2. Check the Redis connection status on the home page
  3. Try the Direct API Client instead which bypasses Redis
  4. Check server logs for detailed error information
  5. Consider using a cloud Redis provider like Upstash

Notes for running on Vercel

  • Requires a Redis attached to the project under process.env.REDIS_URL
  • Make sure you have Fluid compute enabled for efficient execution
  • After enabling Fluid compute, open app/sse/route.ts and adjust max duration to 800 if you using a Vercel Pro or Enterprise account
  • Deploy the Next.js MCP template

Sample Command Line Client

script/test-client.mjs contains a sample client to try invocations via command line.

node scripts/test-client.mjs https://mcp-for-next-js.vercel.app
# mcp-with-monad

Quick Start

1

Clone the repository

git clone https://github.com/salimdev04/mcp-with-monad
2

Install dependencies

cd mcp-with-monad
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownersalimdev04
Repomcp-with-monad
LanguageTypeScript
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation