GitHub Action for MCP server observability — instrument your MCP server with structured logging, distributed traces, and error diagnostics directly in your CI/CD pipelines. Catch failures before your users do.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Instrument MCP Server
uses: solvo/mcp-logger-action@v1
with:
server-id: my-mcp-server
endpoint: https://mcp-logger-backend.vercel.app
- name: Run Tests
run: npm test
env:
MCP_LOGGER_ENABLED: trueThe MCP Logger Action:
- Sets environment variables -
MCP_LOGGER_ENDPOINT,MCP_LOGGER_SERVER_ID, andMCP_LOGGER_ENABLEDare exported to subsequent steps - Creates a setup script -
mcp-logger-setup.shis generated for shell-based tooling - Provides outputs -
instrumented,server-id, andsetup-scriptoutputs for advanced workflows
- Node.js 20+ (built-in to GitHub Actions
ubuntu-latest) - Use with @solvo/mcp-logger-sdk in your MCP server code
In your MCP server code:
import { instrumentServer } from '@solvo/mcp-logger-sdk';
const server = new MCPServer();
instrumentServer(server, {
endpoint: process.env.MCP_LOGGER_ENDPOINT,
serverId: process.env.MCP_LOGGER_SERVER_ID
});| Input | Description | Required | Default |
|---|---|---|---|
server-id |
Unique identifier for this MCP server | Yes | - |
endpoint |
MCP Logger backend endpoint | No | https://mcp-logger-backend.vercel.app |
| Output | Description |
|---|---|
instrumented |
Set to true when instrumentation is active |
server-id |
The server identifier passed as input |
setup-script |
Path to the generated setup script |
name: MCP Server CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Dependencies
run: npm ci
- name: Instrument MCP Server
id: mcp-logger
uses: solvo/mcp-logger-action@v1
with:
server-id: production-mcp-server
- name: Run Tests
run: npm test
- name: Build
run: npm run buildFor more details on MCP Logger, see the main documentation.