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
2 changes: 1 addition & 1 deletion .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ This is a mcp-server repository for Local AI MCP development.
## Conventions

- Use conventional commits (feat:, fix:, chore:, docs:)
- Never manually edit the version -- CI auto-bumps package.json
- Bump the version in `package.json` in your PR; CI tags and publishes it
- Keep mcp-tools.json in sync with the registered tools
- Provider adapters live in src/providers/; tools live in src/tools/
12 changes: 7 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ This is an MCP server. It contains:
## Branching and commit model

- **Single branch**: `main` only. No develop/release branches.
- **Conventional commits** are required. The release workflow parses them:
- `feat:` or `feat(scope):` -- triggers a **minor** version bump
- `feat!:` or `BREAKING CHANGE` -- triggers a **major** version bump
- Everything else (`fix:`, `chore:`, `docs:`, etc.) -- triggers a **patch** bump
- **Conventional commits** are required. Use them to decide your version bump:
- `feat:` or `feat(scope):` -- bump the **minor** version
- `feat!:` or a `BREAKING CHANGE` trailer -- bump the **major** version
- everything else (`fix:`, `chore:`, `docs:`, etc.) -- bump the **patch** version

Apply the bump in your PR with `npm version <patch|minor|major> --no-git-tag-version` (keeps `package.json` and the lockfile in sync); `release.yml` tags and publishes that version on merge. CI never writes to `main`.
- Commit messages should be concise and describe the "why", not the "what".

## CI/CD workflows
Expand Down Expand Up @@ -66,7 +68,7 @@ Keeps repository labels in sync.
## Code conventions

- No hardcoded credentials -- CI scans for password/token/api_key patterns.
- Conventional commits; never hand-edit the version.
- Conventional commits; bump the version deliberately in your PR (CI tags and publishes it).
- Keep `mcp-tools.json` in sync with the tools registered in `src/tools/`.

## Adding content
Expand Down
23 changes: 16 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
# Changelog

All notable changes to Local AI MCP are documented in this file. The format is
based on [Keep a Changelog](https://keepachangelog.com/). Versions are bumped
automatically from conventional commits by the release workflow; never edit the
version by hand.
based on [Keep a Changelog](https://keepachangelog.com/). Bump the version in
each PR (following conventional-commit intent); on merge the release workflow
tags that version and publishes it.

## [Unreleased]

## [0.1.2] - 2026-06-14

### Changed

- Release chain is now PAT-free: `release.yml` uses the default `GITHUB_TOKEN`
to push tags and create the GitHub Release, then explicitly dispatches
`publish.yml` (a `GITHUB_TOKEN` release does not auto-trigger it). Removed the
dependency on `RELEASE_PAT`, which was read-only and could not push.

## [0.1.1] - 2026-06-14

### Changed

- Docs and metadata now describe an MCP server (provider adapters, tool
registration, stdio transport, npx install) instead of cursor-plugin
boilerplate.
- Rewrote the release workflow to auto-bump from conventional commits and create
the release with a token that actually triggers publishing; the publish
workflow now runs on a published release or manual dispatch and skips a
version that is already on npm.
- Adopted a tag-only release model compatible with the protected `main` branch:
bump the version in your PR; `release.yml` tags it and creates the release,
and `publish.yml` builds, tests, and publishes (skipping a version already on
npm). CI never writes to `main`.

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This file provides guidance for Claude Code when working in this repository.

Local AI MCP -- Unified MCP server for managing local model runtimes (Ollama, LM Studio, and more): provider-agnostic discovery, lifecycle, hardware-fit, and delegated inference.

**Version:** 0.1.0
**Version:** 0.1.2
**License:** CC-BY-NC-ND-4.0
**Author:** TMHSDigital

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Use [Conventional Commits](https://www.conventionalcommits.org/):
- Add it to `mcp-tools.json`
- Add vitest tests

Never hand-edit the version; CI auto-bumps `package.json`.
Bump the version in `package.json` in your PR (e.g. `npm version <patch|minor|major> --no-git-tag-version`); CI tags and publishes it on merge.

## Pull Request Process

Expand Down
18 changes: 17 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env node
import { readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { loadConfig } from "./config.js";
Expand All @@ -7,13 +10,26 @@ import { ProviderManager } from "./providers/manager.js";
import type { ToolContext } from "./tools/context.js";
import { registerAll } from "./tools/index.js";

// Read the version from package.json so the server reports the published
// version rather than a hardcoded literal that drifts on every release.
// dist/index.js lives at <pkg>/dist/, so ../package.json is the manifest
// (npm always includes package.json in the published tarball).
function readVersion(): string {
try {
const pkgPath = join(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
return JSON.parse(readFileSync(pkgPath, "utf-8")).version ?? "0.0.0";
} catch {
return "0.0.0";
}
}

async function main(): Promise<void> {
const config = loadConfig(process.env);
const manager = new ProviderManager(config);
const hardware = createHardwareProbe();
const ctx: ToolContext = { manager, hardware, config };

const server = new McpServer({ name: "local-ai-mcp", version: "0.1.0" });
const server = new McpServer({ name: "local-ai-mcp", version: readVersion() });
registerAll(server, ctx);

const transport = new StdioServerTransport();
Expand Down
Loading