Skip to content

Commit 9c3c2c3

Browse files
committed
Initial commit
0 parents  commit 9c3c2c3

37 files changed

Lines changed: 14382 additions & 0 deletions

.dockerignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules
2+
dist
3+
dist-bundle
4+
.yarn/cache
5+
.yarn/install-state.gz
6+
.git
7+
.gitignore
8+
.dev.vars
9+
.env
10+
.vscode
11+
.DS_Store
12+
README.md
13+
Dockerfile
14+
.dockerignore

.env.example

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Environment for the Node entry (yarn start / yarn stdio / Docker `-e`).
2+
# For the Cloudflare Workers deployment, set these via `wrangler secret put`
3+
# or .dev.vars instead — see the README.
4+
5+
# Required — your CompanyCam access token (sent to api.companycam.com)
6+
COMPANYCAM_API_TOKEN=
7+
8+
# Owner secret — required for the network transports, NOT needed for stdio.
9+
# Node HTTP: the bearer token clients must send (Authorization: Bearer <this>)
10+
# Worker: the approval secret on the OAuth consent screen
11+
MCP_AUTH_TOKEN=
12+
13+
# Optional — attribute created records to this CompanyCam user (email)
14+
COMPANYCAM_USER_EMAIL=
15+
16+
# Optional — Node HTTP endpoint path (default /mcp). The Worker always serves /mcp.
17+
# MCP_PATH=/mcp
18+
19+
# Optional — Node HTTP port (default 3000)
20+
# PORT=3000

.github/workflows/quality.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Code Quality
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
quality:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v7
16+
17+
- name: Set up Node
18+
uses: actions/setup-node@v6
19+
with:
20+
node-version-file: .node-version
21+
22+
- name: Enable Corepack (Yarn)
23+
run: corepack enable
24+
25+
- name: Install dependencies
26+
run: yarn install
27+
28+
- name: Lint
29+
run: yarn lint
30+
31+
- name: Format check
32+
run: yarn format:check
33+
34+
- name: Typecheck
35+
run: yarn typecheck
36+
37+
- name: Build
38+
run: yarn build

.github/workflows/release.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Release .mcpb
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
check:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
version: ${{ steps.version.outputs.version }}
15+
should_release: ${{ steps.check.outputs.should_release }}
16+
steps:
17+
- uses: actions/checkout@v7
18+
19+
- name: Read version from package.json
20+
id: version
21+
run: echo "version=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"
22+
23+
- name: Check whether this version is already released
24+
id: check
25+
env:
26+
GH_TOKEN: ${{ github.token }}
27+
run: |
28+
if gh release view "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
29+
echo "v${{ steps.version.outputs.version }} already released — skipping."
30+
echo "should_release=false" >> "$GITHUB_OUTPUT"
31+
else
32+
echo "should_release=true" >> "$GITHUB_OUTPUT"
33+
fi
34+
35+
release:
36+
needs: check
37+
if: needs.check.outputs.should_release == 'true'
38+
runs-on: ubuntu-latest
39+
env:
40+
VERSION: ${{ needs.check.outputs.version }}
41+
steps:
42+
- uses: actions/checkout@v7
43+
44+
- name: Set up Node
45+
uses: actions/setup-node@v6
46+
with:
47+
node-version-file: .node-version
48+
49+
- name: Enable Corepack (Yarn)
50+
run: corepack enable
51+
52+
- name: Install dependencies
53+
run: yarn install
54+
55+
- name: Build the .mcpb bundle
56+
run: yarn bundle
57+
58+
- name: Create GitHub Release
59+
env:
60+
GH_TOKEN: ${{ github.token }}
61+
run: |
62+
gh release create "v${VERSION}" \
63+
"companycam-mcp-server-${VERSION}.mcpb" \
64+
--title "v${VERSION}" \
65+
--generate-notes

.gitignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
node_modules
5+
6+
# testing
7+
coverage
8+
9+
# misc
10+
.DS_Store
11+
*.pem
12+
13+
# debug
14+
yarn-debug.log*
15+
yarn-error.log*
16+
17+
# local env files
18+
.env*
19+
!.env.example
20+
.dev.vars
21+
22+
# logs
23+
logs
24+
*.log
25+
26+
# editor directories and files
27+
.vscode/*
28+
!.vscode/extensions.json
29+
!.vscode/settings.json
30+
.idea
31+
.DS_Store
32+
*.suo
33+
*.ntvs*
34+
*.njsproj
35+
*.sln
36+
*.sw?
37+
38+
# build artifacts
39+
dist
40+
41+
# mcpb bundle build output
42+
mcpb-build
43+
*.mcpb
44+
45+
# docs
46+
docs
47+
48+
# yarn
49+
.pnp.*
50+
.yarn/*
51+
!.yarn/patches
52+
!.yarn/plugins
53+
!.yarn/releases
54+
!.yarn/sdks
55+
!.yarn/versions
56+
57+
# typescript
58+
*.tsbuildinfo
59+
60+
# wrangler (local dev state, cache, and build temp)
61+
.wrangler

.node-version

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

.oxfmtrc.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 80,
4+
"tabWidth": 2,
5+
"useTabs": false,
6+
"semi": true,
7+
"singleQuote": false,
8+
"trailingComma": "all",
9+
"arrowParens": "always",
10+
"bracketSameLine": true,
11+
"bracketSpacing": true,
12+
"endOfLine": "lf",
13+
"sortImports": {
14+
"internalPattern": ["@/", "@test/"]
15+
},
16+
"sortPackageJson": true,
17+
"ignorePatterns": [".yarn", ".output", ".vinxi", "**/*.timestamp_*.js"]
18+
}

.oxlintrc.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["typescript", "import", "vitest"],
4+
"categories": {
5+
"correctness": "error",
6+
"suspicious": "error"
7+
},
8+
"rules": {
9+
"no-unused-vars": "off",
10+
"no-control-regex": "off",
11+
"import/no-unassigned-import": [
12+
"error",
13+
{
14+
"allow": ["**/*.css", "@testing-library/jest-dom/vitest"]
15+
}
16+
],
17+
"typescript/no-explicit-any": "error",
18+
"typescript/no-unused-vars": [
19+
"error",
20+
{
21+
"argsIgnorePattern": "^_",
22+
"destructuredArrayIgnorePattern": "^_",
23+
"ignoreRestSiblings": true,
24+
"varsIgnorePattern": "^_"
25+
}
26+
]
27+
},
28+
"overrides": [
29+
{
30+
"files": ["**/*.test.ts"],
31+
"rules": {
32+
"typescript/no-non-null-assertion": "off",
33+
"vitest/require-mock-type-parameters": "off"
34+
}
35+
}
36+
],
37+
"ignorePatterns": ["dist", "coverage", ".yarn"]
38+
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["oxc.oxc-vscode"]
3+
}

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"editor.defaultFormatter": "oxc.oxc-vscode",
3+
"editor.formatOnSave": true,
4+
"editor.formatOnSaveMode": "file",
5+
"editor.tabSize": 2,
6+
"editor.detectIndentation": false,
7+
"files.insertFinalNewline": true,
8+
"workbench.activityBar.orientation": "vertical"
9+
}

0 commit comments

Comments
 (0)