feat: initial PCM MCP server - #1
Merged
Merged
Conversation
…details from PCM save files
…, table, and query tools
…llation, and usage instructions
… error management
…djust module resolution
mpicciolli
force-pushed
the
feature/init-pcm-mcp-server
branch
from
June 24, 2026 12:06
4c97e73 to
56229ee
Compare
There was a problem hiding this comment.
Pull request overview
Initial scaffold of a PCM MCP server that exposes Pro Cycling Manager .cdb saves via MCP tools, plus the build/test/lint/CI plumbing and contributor docs to support development.
Changes:
- Added MCP server entrypoint and a suite of tools for save discovery, validation, metadata, and read-only querying.
- Implemented save discovery/validation and a
withSaveDbhelper to open.cdbfiles as an in-memory sql.js database. - Added TypeScript/tsup/vitest/Biome configuration, CI workflow, and updated documentation.
Reviewed changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
src/index.ts |
MCP server entrypoint using stdio transport; registers all tools. |
src/helpers.ts |
Standardized MCP tool success/error response helpers. |
src/saves.ts |
Windows-only save discovery + .cdb validation utilities. |
src/save-db.ts |
withSaveDb helper to load .cdb into in-memory sql.js and ensure closure. |
src/tools/index.ts |
Central registration for all tools. |
src/tools/list-saves.ts |
list_saves tool (Windows auto-discovery). |
src/tools/select-save.ts |
select_save tool (validate + return metadata). |
src/tools/get-save-info.ts |
get_save_info tool (table listing from DB_STRUCTURE). |
src/tools/get-table-info.ts |
get_table_info tool (table schema + row count). |
src/tools/get-player-info.ts |
get_player_info tool (active player + team join). |
src/tools/query-save.ts |
query_save tool (read-only query enforcement + row limiting). |
package.json |
Project packaging + scripts + dependencies. |
tsconfig.json |
TypeScript strict config for the project. |
tsup.config.ts |
Bundling configuration for the CLI/server. |
vitest.config.ts |
Vitest configuration including coverage settings. |
biome.json |
Biome formatting/lint configuration. |
.github/workflows/ci.yml |
CI workflow for lint/build/test on PRs and main. |
README.md |
End-user documentation for tools, installation, and usage. |
AGENTS.md |
Contributor/agent guidance for repository conventions and architecture. |
.gitignore |
Ignore rules for dependencies/build/test artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…vision and country
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Initial implementation of the PCM MCP server — a Model Context Protocol server that exposes Pro Cycling Manager save files (
.cdb) to MCP clients for inspection and querying.What's included
src/index.ts) with stdio transport and tool registrationsrc/saves.ts,src/save-db.ts) — discover saves, select an active save, and manage DB connections viawithSaveDbfor consistent open/close handlingsrc/tools/):list_saves— list available PCM save filesselect_save— set the active saveget_save_schema— retrieve save file metadataget_table_schema— inspect.cdbtable structurequery_save— run read-only SQL queries against a saveget_player_info— retrieve active player and team detailstsupbundling,vitesttest setup, and a GitHub Actions CI workflowREADME.mdwith description, tools, installation, and usage;AGENTS.md