First MCP Server
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 buildScripts
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 scriptsConfiguration
TypeScript
The project uses strict TypeScript configuration with enhanced checking:
Path Mapping: Use
#src/*aliases for clean importsStrict Mode: Enhanced type checking including
noUncheckedIndexedAccessTarget: 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/directoryTest: Run
npm run test:watchfor continuous testingLint: Code is automatically linted on save and commit
Build: Run
npm run buildto verify production buildCommit: Use conventional commit messages (enforced by commitlint)
Contributing
Install dependencies:
npm installCreate a feature branch:
git checkout -b feature/my-featureMake your changes and add tests
Ensure all checks pass:
npm run lint && npm run test && npm run buildCommit 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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/geka-evk/first-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server