NextChat with MCP Server Builder

NextChat with MCP Server Builder

NextChat with MCP server creation functionality and OpenRouter integration

vredrick2

Developer Tools
Visit Server

README

NextChat with MCP Server Builder

This is a customized version of NextChat that adds the ability to create and deploy MCP (Model Context Protocol) servers through chat interactions, using OpenRouter for LLM models.

Features

  • Chat-based MCP Server Creation: Create MCP servers by simply chatting with the AI
  • Tool Extraction: Automatically extract tools from your description
  • One-click Deployment: Deploy your MCP server with a single click
  • Integration Guides: Get integration instructions for various AI systems
  • OpenRouter Integration: Use a wide range of LLM models through OpenRouter

Getting Started

Prerequisites

  • Node.js 18.0.0 or later
  • npm or yarn
  • An OpenRouter API key

Installation

  1. Clone the repository:
git clone https://github.com/vredrick2/NextChat.git
cd NextChat
  1. Install dependencies:
npm install
# or
yarn
  1. Create a .env.local file with the following content:
# Enable MCP functionality
ENABLE_MCP=true

# OpenRouter API key
OPENAI_API_KEY=your_openrouter_api_key

# Set OpenRouter as the base URL
BASE_URL=https://openrouter.ai/api/v1

# Default model (can be changed to any OpenRouter model)
DEFAULT_MODEL=openrouter/anthropic/claude-3-opus

# Hide user API key input since we'll be using OpenRouter
HIDE_USER_API_KEY=1

# Enable custom models
CUSTOM_MODELS=+openrouter/anthropic/claude-3-opus,+openrouter/anthropic/claude-3-sonnet,+openrouter/google/gemini-pro
  1. Start the development server:
npm run dev
# or
yarn dev
  1. Open http://localhost:3000 in your browser.

Creating an MCP Server

  1. Start a new chat
  2. Type "Create an MCP server" or similar phrase
  3. Follow the prompts to name your server and describe its functionality
  4. The system will extract tools from your description and deploy the server
  5. You'll receive integration instructions for using your MCP server with various AI systems

Implementation Details

MCP Server Creation Interface

The MCP server creation interface is implemented as a React component that guides users through the process of creating and deploying an MCP server. The interface includes:

  • Name input
  • Description input
  • Tool extraction
  • Deployment
  • Integration guide generation

Tool Extraction

Tools are extracted from user descriptions using pattern matching. The system looks for keywords that indicate specific tool types, such as:

  • Calculator tools
  • Conversion tools
  • Weather tools
  • Search tools
  • Translation tools

Deployment

The current implementation simulates deployment with mock URLs. In a production environment, this would be connected to a real deployment service.

Integration

The system generates integration guides for various AI systems:

  • Cursor
  • Claude Desktop
  • Windsurf
  • Direct API access

Project Structure

  • /app/utils/mcp/types.ts: TypeScript interfaces for MCP servers and tools
  • /app/utils/mcp/storage.ts: Storage utilities for managing MCP servers
  • /app/utils/mcp/extraction.ts: Tool extraction functionality
  • /app/utils/mcp/deployment.ts: Deployment utilities
  • /app/utils/mcp/chat-integration.ts: Chat integration utilities
  • /app/api/mcp/create/route.ts: API endpoint for creating MCP servers
  • /app/components/mcp/server-creation.tsx: MCP server creation component
  • /app/components/mcp/server-list.tsx: MCP server list component

Future Enhancements

  • Enhanced tool extraction using OpenRouter AI models
  • Real deployment to serverless functions
  • Tool testing interface
  • Analytics for deployed servers
  • Version control for MCP servers

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python