|
1 | | -# Getting started with your MCP server |
| 1 | +# mcp-ts-template-default |
2 | 2 |
|
3 | | -This project was bootstrapped with [create-mcp-ts](https://github.com/stephencme/create-mcp-ts). |
4 | | - |
5 | | -It provides a basic template for building an MCP (Model Context Protocol) server using TypeScript. |
6 | | - |
7 | | -## Quick start |
8 | | - |
9 | | -```shell |
10 | | -npm run setup |
11 | | -npm run dev |
12 | | -``` |
13 | | - |
14 | | -## Available scripts |
15 | | - |
16 | | -In the project directory, you can run: |
17 | | - |
18 | | -### `npm run dev` |
19 | | - |
20 | | -Builds the MCP server to the `dist` folder and watches source files for changes.\ |
21 | | -Changes will trigger a rebuild of the server. |
22 | | - |
23 | | -### `npm run build` |
24 | | - |
25 | | -Builds the MCP server to the `dist` folder.\ |
26 | | -It bundles your code for production use e.g. publishing to npm. |
27 | | - |
28 | | -### `npm run setup` |
29 | | - |
30 | | -This script helps configure your MCP server in Cursor, Windsurf, and Claude Desktop.\ |
31 | | -It checks the respective configuration files (`.json`) and adds an entry for your server if it doesn't exist, pointing to the server script (`dist/index.js`). |
32 | | - |
33 | | -```json |
34 | | -{ |
35 | | - "mcpConfig": { |
36 | | - "your-mcp-server": { |
37 | | - "command": "node", |
38 | | - "args": ["/path/to/your-mcp-server/dist/index.js"] |
39 | | - } |
40 | | - } |
41 | | -} |
42 | | -``` |
43 | | - |
44 | | -**Note**: You might need to adjust the `"command"` if your Node.js installation is not in the default system PATH, especially when using version managers like `nvm` or `nodenv`. See the [Troubleshooting](#troubleshooting-your-mcp-server-configuration) section in the `create-mcp-ts` README for details. |
45 | | - |
46 | | -### `npm run eject` |
47 | | - |
48 | | -**This is a one-way operation. Once you `eject`, you can't go back!** |
49 | | - |
50 | | -If you aren't satisfied with the included build tools (`mcp-scripts`), you can `eject` at any time. This command will remove the `mcp-scripts` dependency from your project. |
51 | | - |
52 | | -Instead, it will copy any configuration files and the transitive dependencies right into your project so you have full control over them. All commands except `eject` will still work, but they will point to the copied configurations. At this point you're on your own. |
53 | | - |
54 | | -You don't have to ever use `eject`. The curated feature set is suitable for many deployments. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. |
55 | | - |
56 | | -## Publishing your MCP server |
57 | | - |
58 | | -If you plan to share your MCP server, you can publish it to npm: |
59 | | - |
60 | | -1. Set `"version"` in `package.json` and ensure `"private"` is set to `false`. |
61 | | -2. Run `npm install`. |
62 | | -3. Run `npm run build`. |
63 | | -4. Run `npm login` (if needed). |
64 | | -5. Run `npm publish`. |
65 | | - |
66 | | -## Troubleshooting |
67 | | - |
68 | | -See the [Troubleshooting](https://github.com/stephencme/create-mcp-ts#troubleshooting-your-mcp-server) section in the `create-mcp-ts` README for common issues. |
69 | | - |
70 | | -## Learn more |
71 | | - |
72 | | -- **Model Context Protocol (MCP)**: Learn more about the protocol at [modelcontextprotocol.io](https://modelcontextprotocol.io/). |
73 | | -- **create-mcp-ts**: Check out the tool that created this template [here](https://github.com/stephencme/create-mcp-ts). |
74 | | -- **TypeScript**: Learn more about TypeScript [here](https://www.typescriptlang.org/). |
| 3 | +Default project template for `create-mcp-ts`. |
0 commit comments