mcp-server-template-xmcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-template-xmcpadd 5 and 3"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
xmcp Application
This project was created with create-xmcp-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm devThis will start the MCP server with the selected transport method.
Related MCP server: ddg--mcp6
Project Structure
This project uses the structured approach where tools are automatically discovered from the src/tools directory. Each tool is defined in its own file with the following structure:
import { z } from 'zod'
import { type InferSchema } from 'xmcp'
// Define the schema for tool parameters
export const schema = {
a: z.number().describe('First number to add'),
b: z.number().describe('Second number to add'),
}
// Define tool metadata
export const metadata = {
name: 'add',
description: 'Add two numbers together',
annotations: {
title: 'Add Two Numbers',
readOnlyHint: true,
destructiveHint: false,
idempotentHint: true,
},
}
// Tool implementation
export default async function add({ a, b }: InferSchema<typeof schema>) {
return {
content: [{ type: 'text', text: String(a + b) }],
}
}Adding New Tools
To add a new tool:
Create a new
.tsfile in thesrc/toolsdirectoryExport a
schemaobject defining the tool parameters using ZodExport a
metadataobject with tool informationExport a default function that implements the tool logic
Building for Production
To build your project for production:
npm run build
# or
yarn build
# or
pnpm buildThis will compile your TypeScript code and output it to the dist directory.
Running the Server
You can run the server for the transport built with:
HTTP:
node dist/http.jsSTDIO:
node dist/stdio.js
Alternatively, you can use the script which will automatically start the appropriate transport based on your project configuration:
npm run start
# or
yarn start
# or
pnpm startThe start script will automatically run either the HTTP or STDIO transport depending on which transport method was selected when you initialized the project.
Learn More
This server cannot be deployed
Maintenance
Related MCP Connectors
Primarily to be used as a template repository for developing MCP servers with FastMCP in Python, P…
Host your MCP tool over streamable HTTP in one command.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA basic MCP server template with example tools for echoing messages and retrieving server information. Built with FastMCP framework and supports both stdio and HTTP transports.-
- -licenseNot gradedqualityNot gradedmaintenanceA basic MCP server template with example tools for echoing messages and retrieving server information. Built with FastMCP framework and supports both stdio and HTTP transports for integration with various clients.-
- -licenseNot gradedqualityNot gradedmaintenanceA basic MCP server template with example tools for echoing messages and retrieving server information. Built with FastMCP framework and supports both stdio and HTTP transports.-
- -licenseNot gradedqualityNot gradedmaintenanceA basic MCP server template with example tools for echoing messages and retrieving server information. Built with FastMCP framework and supports both stdio and HTTP transports.-