auto-prompt-mcp-server
Version:
MCP server that automatically adds prompts to file submissions when no user prompt is provided
60 lines (48 loc) • 1.63 kB
Markdown
# Project Structure
```
auto-prompt-mcp-server/
├── src/
│ └── server.ts # Main TypeScript server file
├── dist/ # Compiled JavaScript output (generated)
│ ├── server.js
│ ├── server.d.ts
│ └── server.js.map
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # Documentation
```
## Setup Instructions
1. **Clone/Create the project directory:**
```bash
mkdir auto-prompt-mcp-server
cd auto-prompt-mcp-server
```
2. **Create the src directory and add the server file:**
```bash
mkdir src
# Copy the TypeScript server code to src/server.ts
```
3. **Install dependencies:**
```bash
npm install
```
4. **Build the project:**
```bash
npm run build
```
5. **Run the server:**
```bash
npm start
```
## TypeScript Benefits
The TypeScript version provides:
- **Type Safety**: Full type checking for all MCP protocol interactions
- **Better IDE Support**: IntelliSense, auto-completion, and refactoring
- **Compile-time Error Detection**: Catch errors before runtime
- **Self-documenting Code**: Clear interfaces and type definitions
- **Modern ES Features**: Uses latest JavaScript features with transpilation support
## Development Workflow
- Use `npm run dev` for development with auto-reload using `tsx`
- Use `npm run build` to compile TypeScript to JavaScript
- Use `npm start` to build and run the production version
- The compiled output goes to the `dist/` directory