README Documentation
My first MCP server
Development
# Start development server
npm run start:dev
# Run tests in watch mode
npm run test:watch
# Build the project
npm run build
Scripts
Build & Run
npm start
- Run the built application from dist/npm run start:dev
- Run development server with ts-nodenpm run build
- Build project using tsup (generates CommonJS output with sourcemaps)
Testing
npm run test
- Run Jest testsnpm run test:watch
- Run Jest in watch mode for developmentnpm run test:coverage
- Run tests with coverage report
Code Quality
npm run lint
- Run ESLint on source and test filesnpm run lint:fix
- Fix ESLint issues automaticallynpm run format
- Format code with Prettiernpm run type-check
- Run TypeScript type checking without emitting files
Maintenance
npm run audit:check
- Check for security vulnerabilities using audit-cinpm run dep:check
- Check for outdated dependenciesnpm run dep:update
- Update dependencies to latest versionsnpm run release
- Create a release using standard-versionnpm run snapshot
- Create a snapshot prerelease
Project Structure
first-mcp-server/
├── src/ # Source code
│ └── index.ts # Main entry point
├── test/ # Test files
│ ├── setup.ts # Global test setup
│ └── index.test.ts # Example test
├── dist/ # Built output (generated)
├── .husky/ # Git hooks
├── CLAUDE.md # Claude Code instructions
├── audit-ci.jsonc # Security audit configuration
├── commitlint.config.js # Commit message linting
├── eslint.config.js # ESLint configuration
├── jest.config.js # Jest testing configuration
├── tsconfig.json # TypeScript configuration
├── tsup.config.ts # Build configuration
└── package.json # Project dependencies and scripts
Configuration
TypeScript
The project uses strict TypeScript configuration with enhanced checking:
- Path Mapping: Use
#src/*
aliases for clean imports - Strict Mode: Enhanced type checking including
noUncheckedIndexedAccess
- Target: ES2022 with source maps and declarations enabled
Build
Currently builds CommonJS only. ESM and type definitions can be enabled by modifying tsup.config.ts
.
Testing
Jest is configured with:
- ts-jest preset for TypeScript support
- Node environment
- Path alias support (
#src/
and#test/
) - Coverage collection from all
src/
files
Git Hooks
Pre-commit hooks automatically:
- Run ESLint with auto-fix on staged files
- Format code with Prettier on staged files
- Validate commit messages using conventional commits
Pre-push hooks automatically:
- Run full ESLint checks on all source and test files
- Execute complete Jest test suite
- Check for outdated dependencies
- Perform security audit checks
Development Workflow
- Make Changes: Edit files in
src/
directory - Test: Run
npm run test:watch
for continuous testing - Lint: Code is automatically linted on save and commit
- Build: Run
npm run build
to verify production build - Commit: Use conventional commit messages (enforced by commitlint)
Contributing
- Install dependencies:
npm install
- Create a feature branch:
git checkout -b feature/my-feature
- Make your changes and add tests
- Ensure all checks pass:
npm run lint && npm run test && npm run build
- Commit using conventional commits
- Push and create a pull request
License
MIT License - see LICENSE file for details.
Author
Eugen Klymniuk
Generated with ❤️ using TypeScript and modern tooling.
Quick Actions
Key Features
Model Context Protocol
Secure Communication
Real-time Updates
Open Source