project-mcp-tools
This MCP server exposes developer-utility tools for repository maintenance, Python cleanup, image handling, session monitoring, debugging, and note conversion.
List all available tools with
list_tools.Perform git operations: quick pull/add/commit/push with a required commit message, update submodules, or discard uncommitted changes and untracked files.
Remove all
__pycache__directories under the current directory.Report opencode session context-window usage, optionally by session ID or context limit.
Create convenience symlinks for CLI invocation of project-mcp-tools tools.
Generate images with Gemini or describe images from the target project using Gemini vision.
Return environment debugging information such as cwd, paths, and env vars.
Generate a random number in a configurable range.
Convert shorthand keyboard-note transcriptions into JSON note arrays for game audio.
Provides C++ development tools including parallel compilation with Clang, static analysis with cppcheck, code formatting verification, class and test scaffolding, and include dependency tree analysis.
Provides git operations including quick upload (pull, add, commit, push), discarding uncommitted changes and untracked files, and updating submodules to the latest remote commits.
Provides image generation and interpretation using Google's Gemini models, allowing creation of images from text descriptions and analysis of existing images.
Provides Python code analysis and formatting verification tools to check Python files against formatting rules and clean up cache directories.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@project-mcp-tools Compile the C++ project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
project-mcp-tools
A Python framework that exposes developer tools simultaneously through three protocols: MCP (Model Context Protocol), REST API, and CLI — all from a single, shared tool registry.
Overview
project-mcp-tools solves the problem of maintaining separate tool backends for different consumers. Write a tool once using the @tool() decorator, and it becomes instantly available to:
AI assistants via the MCP protocol (powered by FastMCP)
HTTP clients via a REST API (powered by FastAPI + uvicorn)
Terminal users via a CLI (powered by argparse)
The bundled tools cover C++ development (compile, static analysis, formatting, class/test scaffolding, include tree analysis), Python formatting verification, and git operations — all with process isolation through subprocess execution.
Related MCP server: Useful Helpers Suite
Installation
Requirements: Python 3.14+, uv package manager
# Clone the repository
git clone <repository-url>
cd project-mcp-tools
# Install dependencies
uv syncUsage
MCP Server
Starts a FastMCP server that AI assistants can connect to:
uv run mcp-serverConfigure your MCP client to use this server. For example, in opencode.json at the root of the host project (the project you want the tools to operate on, not the project-mcp-tools directory itself):
{
"mcp": {
"project-mcp-tools": {
"type": "local",
"command": ["uv", "--directory", "project-mcp-tools", "run", "mcp-server", "--target-project", "../my-host-project"]
}
}
}Important:
--directorytellsuvwhere to find theproject-mcp-toolspackage (pyproject.toml, dependencies, venv).--target-projectsets the working directory for the MCP process and all its subprocesses — this is the project the tools will actually operate on. The path is resolved relative toproject-mcp-tools/(sinceuv --directorychanges the working directory). Without this separation, git/cpp/python tools would operate insideproject-mcp-tools/instead of your host project.
REST API Server
Starts a FastAPI server on http://0.0.0.0:8000:
uv run api --target-project ../my-host-projectEach tool is exposed as POST /tools/<tool_name>. Query parameters from the tool's function signature become fields in the JSON request body.
Example request:
curl -X POST http://localhost:8000/tools/git_quick_upload \
-H "Content-Type: application/json" \
-d '{"message": "my commit"}'Swagger UI is available at http://localhost:8000/docs.
CLI
Invoke any tool from the terminal:
uv run cli --target-project ../my-host-project git_quick_upload --message "your commit message"--target-project must come before the tool name. Tools that don't reference the host project (e.g., get_random_number) can be called without --target-project.
Tool Catalog
General
Tool | Signature | Description |
|
| Generates an image using Gemini (model |
|
| Interprets an image from the target project using Gemini vision (fixed model |
|
| Returns environment debugging information (cwd, paths, env vars) |
|
| Returns a random number between start and end |
Git
Tool | Signature | Description |
|
| Discards all uncommitted changes and removes untracked files. Reverts to HEAD |
|
| Updates every submodule to the latest remote commit (requires clean submodules); the pointer bump is left uncommitted |
|
| Performs |
Python
Tool | Signature | Description |
|
| Applies |
|
| Removes all |
|
| Verifies Python formatting rules for specified files |
C++
Tool | Signature | Description |
|
| Applies formatting fixes on all |
|
| Verifies C++ formatting rules for specified files |
|
| Compiles the entire C++ project in parallel using Clang |
|
| Scaffolds a new C++ class from a hierarchy string (e.g., |
|
| Scaffolds a C++ test file |
|
| Displays the recursive include dependency tree of a C++ file. Defaults to the project main file |
|
| Generates |
Session
Tool | Signature | Description |
|
| Reports how much of the model context window the current opencode chat session is using ( |
Project Structure
project-mcp-tools/
├── main.py # Entry point — builds tool_manager, starts servers
├── pyproject.toml # Project config, dependencies, entry points
├── tools/ # Core engine package
│ ├── __init__.py
│ ├── tool_manager.py # Core orchestrator — shared registry, tool folder loading, subprocess dispatch, CLI/API/MCP exposure
│ ├── tool.py # @tool() decorator, ToolInfo/ParameterInfo models, response contract helpers
│ ├── path_manager.py # Project/target root resolution — injectable, no global state
│ └── folder_scanner.py # Auto-discovers @tool-decorated functions in directories
├── general/ # General-purpose tools (no host project dependency)
│ ├── create_image.py # Gemini image generation tool
│ ├── describe_image.py # Gemini image interpretation tool
│ ├── debug.py # Environment debugging tool
│ └── get_random_number.py # Random number generator
├── sak/
│ ├── common.py # Utilities (process creation, JSON, assertions)
│ └── fso/ # File system objects
├── lib/
│ ├── base_verifier.py # Abstract regex-based code formatter
│ ├── project_config.py # Global project configuration
│ ├── project_file.py # Abstract source file with license header management
│ └── template.py # Jinja-like template engine with imports and lists
├── cpp/
│ ├── analyze.py # C++ full analysis tool
│ ├── code_verifier.py # C++ formatting verification tool
│ ├── compile.py # C++ parallel compilation tool
│ ├── create_class.py # C++ class scaffolding tool
│ ├── create_test.py # C++ test scaffolding tool
│ ├── include_tree.py # C++ include dependency tree tool
│ └── cpp_lib/ # C++ domain library (compiler, model, verifier, build)
├── python/
│ ├── analyze.py # Python full analysis tool
│ ├── code_verifier.py # Python formatting verification tool
│ └── python_lib/ # Python domain library (model, verifier, config)
├── session/
│ ├── context_usage.py # opencode session context usage tool
│ └── session_lib/ # Session domain library (opencode database reader)
├── git/
│ ├── discard_changes.py # Git reset + clean tool
│ └── quick_upload.py # Git pull/add/commit/push tool
├── resources/
│ └── images/ # Generated images (from create_image tool)
├── .agents/
│ └── skills/ # AI assistant skills (compliance audit, uv package manager)
└── docs/
├── templates/ # Template files for class/test scaffolding (user zone)
├── example/ # Usage examples (e.g. google-genai.py) (user zone)
└── agent/ # AI-managed knowledge base (architecture, guides, status)
├── architecture.md # System architecture and design decisions
├── development/ # Tool development guide
├── style-guide/ # Coding style guides
└── status.md # Agent task statusArchitecture
The system is built around a central tool_manager object that holds the shared tool registry and handles all three transports (CLI, REST API, and MCP).
For a detailed breakdown of the system architecture, design decisions, and target project mechanism, see the System Architecture guide.
Adding a New Tool
To add a new tool, create a Python file in an existing tool folder (or a new one) and decorate your function with @tool().
For a step-by-step tutorial and guidelines on structuring the tool layer and domain libraries, see the Tool Development Guide.
Configuration
Global and domain-specific configurations are centralized in the codebase. For a complete list of configuration keys and values, see System Architecture - Centralized Configuration.
Coding Conventions
All code in this project must adhere to strict guidelines, including the exclusive use of snake_case for all identifiers and specific spacing rules. For the complete set of guidelines, see the Python Style Guide.
License
GNU General Public License v3.0 — see the license headers in source files for details.
Available Tools
12 toolscreate_aliasesA
creates convenience symlinks for invoking project-mcp-tools tools via CLI
Inputs: no named parameters. Returns: object
create_imageB
generates an image using Gemini from the given text description. do NOT include a file extension in file_name
Inputs: description (required), file_name. Returns: object
debugA
returns environment debugging information (cwd, paths, env vars)
Inputs: no named parameters. Returns: object
describe_imageA
uses the Gemini vision model to interpret an image from the target project for models without vision capability image_path is the relative path of the image inside the target project description explains what the requesting model wants to know about the image the answer is based only on what is visible in the image
Inputs: image_path (required), description (required). Returns: object
get_random_numberA
returns a random number between start and end
Inputs: end, start. Returns: object
git_discard_changesA
discards all uncommitted changes and removes untracked files this tool reverts the repository to the state of the last commit (head)
Inputs: no named parameters. Returns: object
git_pull_submodulesA
updates every submodule of the target project to the latest commit of its remote branch each submodule must have a clean git status, otherwise the tool fails without touching anything the updated pointers are left in the working tree so the owner decides when to commit the bump
Inputs: no named parameters. Returns: object
git_quick_uploadA
performs a quick git upload: pull, add all, commit with message, and push this tool is intended for simple, non-conflicting changes to increase agility inspect git status and git diff directly to produce the commit message using the Conventional Commits standard (do not use git log; history must not influence the commit message decision, only status and diff) mandatory: the message must be in en-us
Inputs: message (required). Returns: object
keyboard_notes_converterA
converts user keyboard note transcriptions into json note arrays for game audio parses shorthand key notation into standard note and duration pairs
notation rules: asdfghjk maps to c4, d4, e4, f4, g4, a4, b4, c5 uppercase letters represent 1 beat quarter notes lowercase letters represent 0.5 beat eighth notes enclosing in () represents 4 beats whole notes enclosing in [] represents 2 beats half notes enclosing in _ represents 0.25 beat sixteenth notes +1 or -1 at start of line adjusts base octave
Inputs: input_text (required). Returns: object
list_toolsB
returns a list of available tools
Inputs: no named parameters. Returns: object
python_clearA
removes all pycache directories under the current directory
Inputs: no named parameters. Returns: object
session_context_usageA
reports how much of the model context window the current opencode chat session is using reads the last message token usage from the opencode database when session_id is omitted the most recently updated active session in the target project is used context_limit overrides the context limit resolved from the models.dev cache use the returned context_used and context_percent values in conditional instructions
Inputs: session_id, context_limit. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose: git operations, image generation/description, context reporting, and one-off converters do not overlap. An agent should not confound any pair of these tools.
All names use snake_case, but the pattern is inconsistent: some are verb_noun (create_image, list_tools), some are domain-prefixed (git_quick_upload, python_clear), and some are noun phrases (session_context_usage, keyboard_notes_converter). The names are readable, but future tool names are not predictable.
Twelve tools is a reasonable count and none of the tools feels redundant. The set is a broad utility grab-bag, so it is slightly less tightly scoped than a focused server, but the count itself is appropriate.
The git and image sub-areas have practical coverage, and individual utilities are self-contained, but the set has no definable single domain against which to judge completeness. An agent cannot infer what project operations the server supports because the tools are an ad hoc collection rather than a coherent surface.
Maintenance
Related MCP Connectors
A registry of AI agent tools — MCP servers, APIs, CLIs, SDKs — kept current by automated ingestion.
MCP tool marketplace for AI agents: web, OSINT, security and research tools through one key.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA universal framework for creating and deploying custom Model Context Protocol (MCP) tool servers with decorator-based tool registration, supporting multiple transports and automatic JSON schema generation for AI assistants.1MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that exposes a suite of developer tools and apps via a shared tool registry, enabling agents to list and call tools through the MCP protocol.MIT
- AlicenseNot gradedqualityDmaintenanceA Python framework for building MCP servers, clients, and apps to connect LLMs to tools and data.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server framework enabling standardized tool registration, discovery, and invocation over JSON-RPC 2.0, with support for InProcess, SSE, and WebSocket transports, plus built-in tools such as calculator, text processor, and JSON formatter.MIT