Skip to content

Commit 792bdf1

Browse files
authored
Initial commit
0 parents  commit 792bdf1

16 files changed

Lines changed: 4617 additions & 0 deletions

.claude/commands/check.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
allowed-tools: Bash(npm run build:*), Bash(npm run lint), Bash(npm run lint:fix)
3+
description: Run both type checking and linting
4+
---
5+
6+
Run comprehensive code checks:
7+
8+
## Type checking
9+
!`npm run build`
10+
11+
## Linting
12+
!`npm run lint`
13+
14+
Automatically fix all errors found:
15+
- For type errors: Analyze and fix all TypeScript errors in the build output
16+
- For linting issues: First run `npm run lint:fix` to auto-fix what's possible, then manually fix any remaining issues

.claude/commands/lint.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
allowed-tools: Bash(npm run lint), Bash(npm run lint:fix)
3+
description: Run linting checks
4+
---
5+
6+
Run linting to check code quality:
7+
8+
!`npm run lint`
9+
10+
Automatically fix all linting issues:
11+
1. First run `npm run lint:fix` to auto-fix all fixable issues
12+
2. If any issues remain that cannot be auto-fixed, manually fix them by editing the affected files

.claude/commands/typecheck.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
allowed-tools: Bash(npm run build:*)
3+
description: Run TypeScript type checking
4+
---
5+
6+
Run TypeScript type checking to ensure all types are correct:
7+
8+
!`npm run build`
9+
10+
Automatically fix all type errors:
11+
- Analyze the TypeScript compiler output
12+
- Fix each type error by updating the code to satisfy TypeScript's type system
13+
- Re-run the build to verify all errors are resolved

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"PostToolUse": [
4+
{
5+
"matcher": "Edit|MultiEdit|Write",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "cd \"$CLAUDE_PROJECT_DIR\" && npm run lint && npm run typecheck"
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

.github/dependabot.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
# Enable version updates for npm
9+
- package-ecosystem: "npm"
10+
# Look for `package.json` and `lock` files in the `root` directory
11+
directory: "/"
12+
# Check the npm registry for updates every day (weekdays)
13+
schedule:
14+
interval: "daily"
15+
# Always increase the version requirement to match the new version
16+
versioning-strategy: increase
17+
# Limit the number of open pull requests for version updates
18+
open-pull-requests-limit: 10
19+
# Add reviewers
20+
reviewers:
21+
- "alexanderopalic"
22+
# Add labels to pull requests
23+
labels:
24+
- "dependencies"
25+
- "npm"
26+
# Allow only direct updates for production dependencies
27+
allow:
28+
- dependency-type: "production"
29+
- dependency-type: "development"
30+
# Group updates for minor and patch releases
31+
groups:
32+
production-dependencies:
33+
dependency-type: "production"
34+
update-types:
35+
- "minor"
36+
- "patch"
37+
development-dependencies:
38+
dependency-type: "development"
39+
update-types:
40+
- "minor"
41+
- "patch"

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
9+
jobs:
10+
lint-typecheck-build:
11+
name: Lint, Type Check & Build
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20.x
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Run ESLint
28+
run: npm run lint
29+
30+
- name: Run TypeScript type check
31+
run: npm run typecheck
32+
33+
- name: Build project
34+
run: npm run build
35+
36+
- name: Check build output
37+
run: |
38+
echo "Checking if build was successful..."
39+
ls -la build/
40+
test -f build/index.js

.github/workflows/pull-request.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Pull Request Checks
2+
3+
on:
4+
pull_request:
5+
branches: [ main, master, develop ]
6+
types: [ opened, synchronize, reopened ]
7+
8+
jobs:
9+
lint-and-typecheck:
10+
name: Lint and Type Check
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x, 22.x]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Run ESLint
31+
run: npm run lint
32+
33+
- name: Run TypeScript type check
34+
run: npm run typecheck
35+
36+
- name: Build project
37+
run: npm run build
38+
39+
test:
40+
name: Run Tests
41+
runs-on: ubuntu-latest
42+
needs: lint-and-typecheck
43+
44+
strategy:
45+
matrix:
46+
node-version: [18.x, 20.x, 22.x]
47+
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v4
51+
52+
- name: Setup Node.js ${{ matrix.node-version }}
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: ${{ matrix.node-version }}
56+
cache: 'npm'
57+
58+
- name: Install dependencies
59+
run: npm ci
60+
61+
- name: Run tests
62+
run: npm test --if-present
63+
64+
security-check:
65+
name: Security Check
66+
runs-on: ubuntu-latest
67+
68+
steps:
69+
- name: Checkout code
70+
uses: actions/checkout@v4
71+
72+
- name: Setup Node.js
73+
uses: actions/setup-node@v4
74+
with:
75+
node-version: 20.x
76+
cache: 'npm'
77+
78+
- name: Install dependencies
79+
run: npm ci
80+
81+
- name: Run npm audit
82+
run: npm audit --audit-level=moderate
83+
continue-on-error: true
84+
85+
- name: Check for known vulnerabilities
86+
run: |
87+
npm list --depth=0 || true
88+
echo "Checking for outdated packages..."
89+
npm outdated || true

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
build/
7+
8+
# Environment variables
9+
.env
10+
11+
# Logs
12+
*.log
13+
14+
# OS files
15+
.DS_Store
16+
17+
# IDE
18+
.vscode/*
19+
!.vscode/settings.json
20+
!.vscode/extensions.json
21+
!.vscode/launch.json
22+
!.vscode/tasks.json

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

CLAUDE.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Commands
6+
7+
Build the TypeScript project:
8+
```bash
9+
npm run build
10+
```
11+
12+
Run linting:
13+
```bash
14+
npm run lint
15+
```
16+
17+
Fix linting issues automatically:
18+
```bash
19+
npm run lint:fix
20+
```
21+
22+
## Architecture
23+
24+
This is a Model Context Protocol (MCP) server starter written in TypeScript that provides a minimal template for building MCP servers.
25+
26+
The server demonstrates the basic MCP structure with a single tool:
27+
28+
- **echo**: A simple tool that echoes back the provided text
29+
30+
The server uses:
31+
- `@modelcontextprotocol/sdk` for MCP implementation
32+
- `zod` for schema validation
33+
- Stdio transport for communication
34+
- Strict TypeScript configuration with ES2022 target
35+
36+
Entry point is `src/index.ts` which sets up the MCP server with the echo tool and runs on stdio transport.
37+
38+
This starter template is designed to be forked and extended with additional tools, resources, and prompts as needed for specific use cases.
39+
40+
For detailed MCP SDK documentation and implementation guides, see `src/CLAUDE.md`.
41+
42+
## Troubleshooting
43+
44+
When encountering issues or needing documentation:
45+
- Use the context7 MCP server to retrieve up-to-date documentation for any library
46+
- For MCP-related issues, search for `@modelcontextprotocol/sdk` documentation
47+
- For TypeScript issues, search for relevant TypeScript or Node.js documentation

0 commit comments

Comments
 (0)