1
deployment
Jonathan Miller edited this page 2026-05-20 01:25:20 +00:00

Home

Deployment

How to distribute and register MCP servers built from the Template-MCP template.


Distribution Methods

Users clone the repo and build locally:

git clone git@git.mokoconsulting.tech:MokoConsulting/my-mcp.git
cd my-mcp
npm install
npm run build
npm run setup    # Configure API connections

2. Release Package

Download a pre-built release from Gitea:

  1. Go to the repository's Releases page
  2. Download the latest release archive
  3. Extract and install:
    tar xzf my-mcp-1.0.0.tar.gz
    cd my-mcp
    npm install --production
    npm run setup
    

Claude Code Registration

Project-Level (.mcp.json)

Register in the project's .mcp.json for project-specific MCP servers:

{
  "mcpServers": {
    "my-mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/my-mcp/dist/index.js"]
    }
  }
}

User-Level (~/.claude.json)

Register in ~/.claude.json for globally available MCP servers:

{
  "mcpServers": {
    "my-mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/my-mcp/dist/index.js"]
    }
  }
}

Restart Claude Code after changing MCP configuration.


Release Process

Automated Release

Merging to main triggers auto-release.yml:

  1. TypeScript compiles and validates
  2. Release archive is created
  3. Gitea release is published with the archive
  4. Notifications are sent via ntfy

Pre-Release

Push to dev triggers pre-release.yml:

  1. Build and lint checks run
  2. Pre-release tag is created (e.g., v1.1.0-dev.1)

Version Bumping

Update version in:

File Field
package.json "version"
CHANGELOG.md Move [Unreleased] to version header

Updating Deployed Servers

When a new version is released, users update their installation:

cd /path/to/my-mcp
git pull
npm install
npm run build

No config changes needed -- the config file is separate from the server code.

Restart Claude Code to pick up the updated server.


Multi-User Deployment

For teams sharing an MCP server:

  1. Each user clones and builds the server locally
  2. Each user runs npm run setup to create their own config with their own API credentials
  3. Each user registers the server in their own Claude Code config
  4. Config files are per-user (~/.<project>.json) and never shared

Naming Convention

MCP server repos follow this naming convention:

Pattern Example
mcp_moko{service} mcp_mokowaas, mcp_mokocrm
mcp_moko{function} mcp_mokossh, mcp_mokodeploy

CI/CD Workflow Reference

Workflow Trigger Purpose
auto-release.yml Merge to main Full release pipeline
pre-release.yml Push to dev Pre-release builds
pr-check.yml Pull request Build and lint validation
security-audit.yml Schedule npm dependency audit
repo-health.yml Schedule MokoStandards compliance
cleanup.yml Schedule Prune old artifacts
notify.yml Release/failure Event notifications


Repo: Template-MCP · MokoStandards

Field Value
Minimum Version 04.07.00
Platform mcp-server
Applies To MCP server repositories
Revision Date Author Description
1.0 2026-05-19 Moko Consulting Initial version