
This project was created with create-xmcp-app.
First, run the development server:
This will start the MCP server with the selected transport method.
This project uses the structured approach where tools, prompts, and resources are automatically discovered from their respective directories:
src/tools - Tool definitionssrc/prompts - Prompt templatessrc/resources - Resource handlersEach tool is defined in its own file with the following structure:
Prompts are template definitions for AI interactions:
Resources provide data or content with URI-based access:
To add a new tool:
.ts file in the src/tools directoryschema object defining the tool parameters using Zodmetadata object with tool informationTo add a new prompt:
.ts file in the src/prompts directoryschema object defining the prompt parameters using Zodmetadata object with prompt information and roleTo add a new resource:
.ts file in the src/resources directory(users)/[userId]/profile.ts → users://{userId}/profile)schema object for dynamic parameters (optional for static resources)metadata object with resource informationTo build your project for production:
This will compile your TypeScript code and output it to the dist directory.
You can run the server for the transport built with:
node dist/http.jsnode dist/stdio.jsGiven the selected transport method, you will have a custom start script added to the package.json file.
For HTTP:
For STDIO: