- Home
- MCP servers
- Error Tracker
Error Tracker
- typescript
0
GitHub Stars
typescript
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run an Error Tracker MCP Server that automates code error handling by tracing the code owner, gathering pull request details, and creating JIRA tasks. This server is designed to work with MCP-enabled clients to streamline error investigation and issue creation across your software projects.
How to use
You connect a client to the Error Tracker MCP Server to perform end-to-end error investigations. Typical workflows include finding the code owner for a given file and line, locating the related pull request, automatically investigating the error, and creating a JIRA ticket based on the gathered information. For remote deployments, you use an MCP URL; for local development, you run the server locally and connect via the stdio interface.
How to install
Prerequisites: you need Node.js installed on your system. Ensure you have a modern Node.js runtime to build and run the server.
Step 1: Install dependencies.
npm install
Step 2: Build the server.
npm run build
Step 3: Prepare environment variables. Create a file named .env and populate the required values as shown in the example below.
# 服务器配置
HTTP_PORT=3000 # HTTP 模式端口(默认 3000)
COMPATIBLE_PORT=3001 # 兼容模式端口(默认 3001)
DEFAULT_BRANCH=main # 默认调查分支(默认 main)
# Bitbucket 配置
BITBUCKET_USERNAME=your_username
BITBUCKET_PASSWORD=your_password
BITBUCKET_BASE_URL=https://your-bitbucket-server.com
BITBUCKET_PROJECT=your_project
BITBUCKET_REPO=your_repo
PR_TARGET_BRANCH=main # PR 目标分支过滤(默认 main)
# JIRA 配置
JIRA_USERNAME=your_username
JIRA_PASSWORD=your_password
JIRA_BASE_URL=https://your-jira-server.com
JIRA_PROJECT_KEY=YOUR_PROJECT
JIRA_ISSUE_TYPE_ID=10101
JIRA_PRIORITY_ID=10000
JIRA_COMPONENT_ID=12505
How to run in different modes
There are three modes you can use to run the server. Choose the mode that matches your deployment scenario and client compatibility.
-
stdio mode for local use (Claude Desktop) runs the server within your local environment.
-
HTTP mode for remote deployment uses the MCP HTTP endpoint.
-
compatible mode supports both new and old MCP clients in remote deployments.
Additional sections
Configuration you will use in MCP clients is shown below. The stdio configuration runs locally, while the HTTP configuration connects remotely.
Client configuration (stdio)
{
"mcpServers": {
"error-tracker": {
"command": "node",
"args": ["-r", "dotenv/config", "/absolute/path/error/build/index.js"]
}
}
}
Client configuration (http)
Choose the HTTP endpoint if you are using a remote MCP client. The Streamable HTTP endpoint is the recommended option for modern MCP clients.
{
"mcpServers": {
"error-tracker": {
"url": "http://localhost:3000/mcp"
}
}
}
Client configuration (compatibility mode)
If your client only supports the older MCP protocol, use the compatibility endpoint.
{
"mcpServers": {
"error-tracker": {
"url": "http://localhost:3000/sse"
}
}
}
Remote deployment and docker
You can deploy the server remotely using Docker. Build and run the container with the environment file to apply all required settings.
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["node", "-r", "dotenv/config", "build/compatible-server.js"]
Build and run the image with the environment file.
docker build -t error-tracker-mcp .
docker run -d -p 3000:3000 --env-file .env error-tracker-mcp
Process management with PM2
You can manage the server with PM2 for production workflows.
pm2 start npm --name "error-tracker" -- run start:compatible
pm2 save && pm2 startup
Troubleshooting
Common issues and fixes help you keep the server running smoothly.
-
Authentication failures: verify your .env file contains correct credentials for Bitbucket and JIRA.
-
Missing files: ensure the file path is correct relative to the repository root and confirm DEFAULT_BRANCH is set as intended.
-
Port conflicts: adjust HTTP_PORT or COMPATIBLE_PORT in the .env file.
Technical notes
Tech stack includes TypeScript, MCP SDK, Express, and Axios. The server supports stdio, Streamable HTTP, and a compatibility mode to accommodate different client versions.
License
MIT license.
Available tools
find_code_owner
Identify the code owner by file path and line number to determine responsibility for a specific code segment.
get_pull_request
Locate the related pull request based on a commit ID to gather context and discussion around the change.
investigate_error
Automatically investigate an error by combining ownership data and PR details to prepare for ticket creation.
create_jira_ticket
Create and assign a Jira ticket using the findings from the investigation, including a summary and labels.
track_error_full
Complete end-to-end process: investigate, analyze, and create a Jira ticket in one streamlined action.