Skip to main content
Prerequisites:
  • Install Node.js (version 18 or higher)
  • npm, pnpm, or yarn package manager

MCP Servers

The fastest way to scaffold a new MCP server project is to use create-mcp-use-app:
npx create-mcp-use-app my-mcp-server
cd my-mcp-server
npm install
npm run dev
This command will:
  • Create a new directory with your project name
  • Initialize a TypeScript project with mcp-use configured
  • Set up a basic MCP server template with example tools
  • Install all dependencies automatically
Check out UI Widgets with support to MCP-UI and OpenAI Apps SDK for ChatGPT.
You can also install mcp-use as a library and build your own MCP server from scratch.
npm install mcp-use
import { MCPServer } from "mcp-use/server";
import { z } from "zod";

const server = new MCPServer({
  name: "my-server",
  version: "1.0.0",
  description: "My custom MCP server",
});

// Define a tool
server.tool("get_weather", {
  description: "Get weather for a city",
  parameters: z.object({
    city: z.string().describe("City name"),
  }),
  execute: async ({ city }) => {
    return { temperature: 72, condition: "sunny", city };
  },
});

// Start server with auto-inspector
server.listen(3000);
// 🎉 Inspector at http://localhost:3000/inspector
Check out the examples here. Visit the MCP Server documentation for more details.

MCP Agent & Client

Install mcp_use using your preferred package manager:
npm install mcp-use

Next Steps

Need Help? Join our Discord or Github communities.