The Project Hub MCP Server provides comprehensive project management, local Git functionality, and GitHub integration in one tool. It allows you to manage local projects, track changes, create commits without GitHub dependency, and synchronize with remote repositories when needed.
git clone https://github.com/peterparker57/project-hub-mcp-server.git
cd project-hub-mcp-server
npm install
npm run build
Add the server to your MCP settings file:
{
"mcpServers": {
"project-hub": {
"command": "node",
"args": ["path/to/project-hub-mcp-server/dist/index.js"],
"env": {
"NODE_ENV": "development",
"DEFAULT_PRIVATE": "true",
"DEFAULT_OWNER": "your-github-username",
"GITHUB_TOKEN": "your-github-token",
"GIT_PATH": "C:\\Program Files\\Git\\bin\\git.exe"
},
"alwaysAllow": [
"list_projects",
"find_project",
"get_pending_changes",
"get_local_commit_history",
"list_local_branches"
]
}
}
}
// Create a new project
await mcp.use("project-hub", "create_project", {
name: "my-project",
path: "./projects/my-project",
type: "typescript",
description: "A new TypeScript project"
});
// Find a project (flexible name search)
await mcp.use("project-hub", "find_project", {
name: "my-project" // Works with "My-Project", "MY-PROJECT", "my project notes", etc.
});
// List all projects
await mcp.use("project-hub", "list_projects", {
type: "typescript", // optional filter
has_repo: true, // optional filter
page: 1,
page_size: 10
});
// Scan project files
await mcp.use("project-hub", "scan_project_files", {
projectId: "project-id",
excludePatterns: ["node_modules", "\\.git", "dist", "build"]
});
// Record a change
await mcp.use("project-hub", "record_change", {
projectId: "project-id",
description: "Added new feature",
type: "feature",
files: ["src/feature.ts"]
});
// Get pending changes
await mcp.use("project-hub", "get_pending_changes", {
projectId: "project-id"
});
// Clear committed changes
await mcp.use("project-hub", "clear_committed_changes", {
projectId: "project-id"
});
// Initialize local repository
await mcp.use("project-hub", "init_local_repository", {
projectId: "project-id"
});
// Create a local commit
await mcp.use("project-hub", "create_local_commit", {
projectId: "project-id",
message: "Implemented new feature",
authorName: "John Doe",
authorEmail: "[email protected]"
});
// Get commit history
await mcp.use("project-hub", "get_local_commit_history", {
projectId: "project-id"
});
// Create a new branch
await mcp.use("project-hub", "create_local_branch", {
projectId: "project-id",
name: "feature/new-feature",
startingCommitId: "commit-id" // optional
});
// Switch to a branch
await mcp.use("project-hub", "switch_local_branch", {
projectId: "project-id",
branchName: "feature/new-feature"
});
// List branches
await mcp.use("project-hub", "list_local_branches", {
projectId: "project-id"
});
// Restore to a previous commit
await mcp.use("project-hub", "restore_to_local_commit", {
projectId: "project-id",
commitId: "commit-id"
});
// Restore to a branch
await mcp.use("project-hub", "restore_to_local_branch", {
projectId: "project-id",
branchName: "main"
});
// Clone a commit to a new location
await mcp.use("project-hub", "restore_local_commit_to_new_location", {
projectId: "project-id",
commitId: "commit-id",
newLocation: "C:/Projects/new-clone"
});
// Clone a branch to a new location
await mcp.use("project-hub", "restore_local_branch_to_new_location", {
projectId: "project-id",
branchName: "main",
newLocation: "C:/Projects/new-clone"
});
// Create a repository
await mcp.use("project-hub", "create_repository", {
name: "my-project",
description: "A new TypeScript project",
isPrivate: true
});
// Push local commits to GitHub
await mcp.use("project-hub", "push_local_commits", {
projectId: "project-id",
repo: "my-project",
branch: "main"
});
// Clone a repository
await mcp.use("project-hub", "clone_repository", {
repo: "my-project",
targetFolder: "./projects/my-project",
branch: "main"
});
// Create a GitHub commit
await mcp.use("project-hub", "create_commit", {
repo: "my-project",
changes: [{
path: "src/feature.ts",
content: "// New feature code",
operation: "add"
}],
message: "feat: add new feature",
branch: "feature/new-feature"
});
// Create a branch
await mcp.use("project-hub", "create_branch", {
repo: "my-project",
name: "feature/new-feature",
sourceBranch: "main"
});
// List branches
await mcp.use("project-hub", "list_branches", {
repo: "my-project"
});
// Create pull request
await mcp.use("project-hub", "create_pull_request", {
repo: "my-project",
title: "Add new feature",
head: "feature/new-feature",
base: "main",
body: "This PR adds a new feature",
draft: false,
maintainer_can_modify: true
});
// Merge branches
await mcp.use("project-hub", "merge_branches", {
repo: "my-project",
base: "main",
head: "feature/new-feature",
message: "Merge feature/new-feature into main"
});
// Create a project note
await mcp.use("project-hub", "create_note", {
project_name: "my-project",
title: "Architecture Decision Record",
content: "# ADR-001: Project Structure\n\n...",
category: "documentation",
tags: ["architecture", "decision"]
});
// Update a note
await mcp.use("project-hub", "update_note", {
project_name: "my-project",
note_id: "note-id",
title: "Updated Architecture Decision Record",
content: "# ADR-001: Revised Project Structure\n\n...",
category: "documentation",
tags: ["architecture", "decision", "revised"]
});
// Search notes
await mcp.use("project-hub", "search_notes", {
project_name: "my-project",
query: "architecture",
category: "documentation"
});
To see all available tools:
// List all available tools
await mcp.use("project-hub", "list_tools");
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "project-hub" '{"command":"node","args":["path/to/project-hub-mcp-server/dist/index.js"],"env":{"NODE_ENV":"development","DEFAULT_PRIVATE":"true","DEFAULT_OWNER":"your-github-username","GITHUB_TOKEN":"your-github-token","GIT_PATH":"C:\\Program Files\\Git\\bin\\git.exe"},"alwaysAllow":["list_projects","find_project","get_pending_changes","get_local_commit_history","list_local_branches"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"project-hub": {
"command": "node",
"args": [
"path/to/project-hub-mcp-server/dist/index.js"
],
"env": {
"NODE_ENV": "development",
"DEFAULT_PRIVATE": "true",
"DEFAULT_OWNER": "your-github-username",
"GITHUB_TOKEN": "your-github-token",
"GIT_PATH": "C:\\Program Files\\Git\\bin\\git.exe"
},
"alwaysAllow": [
"list_projects",
"find_project",
"get_pending_changes",
"get_local_commit_history",
"list_local_branches"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"project-hub": {
"command": "node",
"args": [
"path/to/project-hub-mcp-server/dist/index.js"
],
"env": {
"NODE_ENV": "development",
"DEFAULT_PRIVATE": "true",
"DEFAULT_OWNER": "your-github-username",
"GITHUB_TOKEN": "your-github-token",
"GIT_PATH": "C:\\Program Files\\Git\\bin\\git.exe"
},
"alwaysAllow": [
"list_projects",
"find_project",
"get_pending_changes",
"get_local_commit_history",
"list_local_branches"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect