Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- name: Build
run: npm run build

- name: Build MCP Bundle
run: npm run pack

- name: Test
run: npm test

Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Package

on:
push:
tags:
- "v*.*.*"

permissions:
id-token: write # Required for OIDC
contents: write # Required for creating GitHub Releases

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
package-manager-cache: false # never use caching in release builds
Comment thread
mpicciolli marked this conversation as resolved.
- run: npm ci
- run: npm run build --if-present
- run: npm run pack
- run: npm test
- run: npm publish
Comment thread
mpicciolli marked this conversation as resolved.

Comment thread
mpicciolli marked this conversation as resolved.
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
generate_release_notes: true
files: dist/pcm-mcp.mcpb
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.json": ["biome check --write"],
"*.ts": ["biome check --write"]
}
115 changes: 73 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,76 @@
<p align="center">
<img src="assets/icon.png" alt="PCM MCP" width="150" />
</p>

# Pro Cycling Manager MCP Server

A Model Context Protocol (MCP) server for querying Pro Cycling Manager (PCM) game databases. This server provides tools to discover and inspect PCM career save files via the MCP protocol, allowing AI assistants to explore your saves in a structured way.

## Read-Only Access

This server is strictly **read-only**. PCM stores careers as binary `.cdb` files; this server discovers and inspects those saves but **never writes to or modifies them**. Save files are loaded into an in-memory SQLite database for querying, and changes are never written back to disk.

## Installation

### MCP Bundle

Download the latest `pcm-mcp.mcpb` from the [Releases page](https://github.com/mpicciolli/pcm-mcp/releases) and open it with **Claude for macOS or Windows**. An installation dialog will appear — no terminal required.

> **Note:** This method does not auto-update. To get a newer version, download and re-install the latest `.mcpb` from the Releases page.

### Claude Desktop

Add the following to your `claude_desktop_config.json`:

```json
{
"mcpServers": {
"pcm-mcp": {
"command": "npx",
"args": ["-y", "pcm-mcp"]
}
}
}
```

### ChatGPT Desktop

Add the following to your ChatGPT MCP configuration file:

```json
{
"mcpServers": {
"pcm-mcp": {
"command": "npx",
"args": ["-y", "pcm-mcp"]
}
}
}
```

### Gemini

Add the following to your Gemini CLI settings file:

```json
{
"mcpServers": {
"pcm-mcp": {
"command": "npx",
"args": ["-y", "pcm-mcp"]
}
}
}
```

## Platform Support

PCM only ships on Windows, where careers live under:

```
%APPDATA%/Pro Cycling Manager <year>/Cloud/<profile>/
```

Auto-discovery via `pcm_list_saves` is therefore **Windows only**. On macOS/Linux the saves live inside a Wine/Proton prefix that can't be reliably located — pass an absolute `.cdb` path directly to `pcm_select_save` instead.

## Available Tools

All tools are read-only and carry `readOnlyHint: true`, so clients like Claude Desktop can approve them automatically without a confirmation prompt.
Expand All @@ -19,21 +84,15 @@ All tools are read-only and carry `readOnlyHint: true`, so clients like Claude D
| **pcm_get_player_info** | Get the active human player and their team from a save file. Returns the player login plus team details (name, resolved division name, resolved country name, evaluation and manager). |
| **pcm_query_save** | Run a read-only SQL query (`SELECT` / `WITH … SELECT` only) against any table in a save file. Write/DDL statements are rejected. Results are capped (default 100, max 1000 rows). |

## Installation

```bash
npm install
```

## Available Scripts
## Development

### Build

```bash
npm run build
```

Bundles `src/` to `dist/` with tsup (ESM output; `.d.ts` generation is currently disabled).
Bundles `src/` to `dist/` with tsup (ESM output).

### Test

Expand All @@ -44,40 +103,12 @@ npm test
### Lint & Format

```bash
npm run lint
npm run lint # Biome lint with autofixes
npm run format # Biome formatter
```

Runs Biome lint with autofixes (`biome lint --write .`).
### Pack a bundle

```bash
npm run format
```

Formats the codebase with Biome (`biome format --write .`).

## Platform Support

PCM only ships on Windows, where careers live under:

```
%APPDATA%/Pro Cycling Manager <year>/Cloud/<profile>/
npm run pack # produces pcm-mcp.mcpb
```

Auto-discovery via `list_saves` is therefore **Windows only**. On macOS/Linux the saves live inside a Wine/Proton prefix that can't be reliably located — pass an absolute `.cdb` path directly to `select_save` instead.

## Usage with Claude Desktop

Add the following configuration to your `claude_desktop_config.json`:

```json
{
"mcpServers": {
"pcm-mcp": {
"command": "node",
"args": ["/absolute/path/to/pcm-mcp/dist/index.js"]
}
}
}
```

The server communicates over stdio.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"manifest_version": "0.3",
"name": "pcm-mcp-server",
"version": "0.0.0",
"description": "MCP server for querying Pro Cycling Manager game databases",
"long_description": "MCP server for querying Pro Cycling Manager game databases. This server provides tools to discover and inspect PCM career save files via the MCP protocol, allowing AI assistants to explore your saves in a structured way. This server is strictly read-only",
"author": {
"name": "mpicciolli"
},
"server": {
"type": "node",
"entry_point": "dist/index.js",
"mcp_config": {
"command": "node",
"args": ["${__dirname}/dist/index.js"],
"env": {}
}
},
"license": "MIT",
"icon": "assets/icon.png"
}
Loading
Loading