Files
Jonathan Miller 91b78f8da1 feat: initial MCP server template with placeholder-driven scaffolding
Template repository for creating MokoStandards-compliant MCP servers.
Includes 4-file src/ structure (index, client, config, types), setup
wizard, example tools, 12 CI/CD workflows, full docs, and {{placeholder}}
tokens for search-and-replace customization.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-07 14:39:19 -05:00

103 lines
2.2 KiB
Markdown

<!--
Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
SPDX-License-Identifier: GPL-3.0-or-later
# FILE INFORMATION
DEFGROUP: {{PROJECT_NAME}}.Documentation
PATH: /docs/INSTALLATION.md
VERSION: 01.00.00
BRIEF: Installation and setup instructions
-->
# Installation
## Prerequisites
- **Node.js** 20.0.0 or later
- **npm** (included with Node.js)
- Access to the target API with valid credentials
## Install
```sh
git clone https://git.mokoconsulting.tech/MokoConsulting/{{PROJECT_NAME}}.git
cd {{PROJECT_NAME}}
npm install
npm run build
npm run setup
```
The setup wizard will prompt for:
1. **Connection name** — a label for this instance (e.g. `production`, `staging`)
2. **API URL** — the base URL of the instance
3. **API key/token** — authentication credentials
4. **TLS verification** — whether to skip certificate verification (for self-signed certs)
Run `npm run setup` again to add more connections.
## Register with Claude Code
Add to your Claude Code MCP settings (`~/.claude.json` or project `.mcp.json`):
```json
{
"mcpServers": {
"{{PROJECT_NAME}}": {
"type": "stdio",
"command": "node",
"args": ["/path/to/{{PROJECT_NAME}}/dist/index.js"]
}
}
}
```
Restart Claude Code after adding the server.
## Configuration File
The config is stored at `~/.{{PROJECT_NAME}}.json`:
```json
{
"defaultConnection": "production",
"connections": {
"production": {
"baseUrl": "https://api.example.com",
"apiKey": "your-api-key"
},
"staging": {
"baseUrl": "https://api-staging.example.com",
"apiKey": "your-staging-key",
"insecure": true
}
}
}
```
You can also set the `{{ENV_PREFIX}}_CONFIG` environment variable to use a config file at a custom path.
## Verification
```sh
npm start
```
If configured correctly, the server will start listening on stdio.
## Troubleshooting
### "Failed to load config" error
Run `npm run setup` to create the config file.
### Connection errors
- Verify the API is reachable from your machine
- For self-signed certs, set `"insecure": true`
- Ensure the API key/token is valid
## Revision History
| Date | Version | Author | Notes |
| --- | --- | --- | --- |
| 2026-05-07 | 0.0.1 | jmiller | Initial installation guide |