ProjectSight MCP Server

$python -m venv venv source venv/bin/activate pip install fastmcp python-dotenv aiohttp uvicorn cd mcp python main.py
README.md

Provides access to the ProjectSight API for managing construction portfolios, projects, and records.

ProjectSight MCP Server

A scalable, maintainable MCP (Model Context Protocol) server that provides access to the ProjectSight API for managing portfolios, projects, and various record types like ActionItems, RFIs, Submittals, and more.

This server has been refactored into a modular, teachable structure that demonstrates best practices for building MCP servers. It's designed to be both production-ready and an excellent learning resource.

šŸŽÆ Features

  • OAuth2 Authentication: Automatic token management with caching and refresh
  • Modular Architecture: Clean separation of concerns, easy to extend
  • Project Operations: Access project information
  • Record Management: CRUD operations for:
    • ActionItems
    • RFIs (Request for Information)
    • Submittals
  • Workflow States: Get workflow states for record types
  • Debug Tools: Test connection, debug tokens, test different scopes

šŸ“ Project Structure

projectsight-mcp/
ā”œā”€ā”€ mcp/                       # Main MCP server code
│   ā”œā”€ā”€ main.py               # Entry point - run this to start the server
│   ā”œā”€ā”€ config.py             # Configuration management
│   ā”œā”€ā”€ auth.py               # OAuth2 authentication
│   ā”œā”€ā”€ client.py             # API client for HTTP requests
│   ā”œā”€ā”€ utils.py              # Utility functions
│   └── tools/                # MCP tools organized by domain
│       ā”œā”€ā”€ __init__.py       # Tool registration
│       ā”œā”€ā”€ debug.py          # Debug/diagnostic tools
│       ā”œā”€ā”€ projects.py       # Project operations
│       ā”œā”€ā”€ action_items.py   # Action item CRUD
│       ā”œā”€ā”€ rfis.py           # RFI operations
│       ā”œā”€ā”€ submittals.py     # Submittal operations
│       └── workflow.py       # Workflow state tools
ā”œā”€ā”€ README.md                 # This file
└── .env                      # Environment variables (create this)

šŸš€ Quick Start

1. Install Dependencies

pip install fastmcp python-dotenv aiohttp uvicorn

Or using a virtual environment:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install fastmcp python-dotenv aiohttp uvicorn

2. Configure Credentials

Create a .env file in the mcp/ directory (or project root) with your ProjectSight API credentials:

APPLICATION_NAME=your_app_name
CLIENT_ID=your_client_id
CLIENT_SECRET=your_client_secret
PORTFOLIO_ID=your_portfolio_id_or_guid
PROJECTSIGHT_API_URL=https://cloud.api.trimble.com/projectsight/us1/1.0
PROJECTSIGHT_SCOPE=ProjectSight_-_US1

Getting Credentials:

  1. Sign in to API Cloud with your Trimble account
  2. On the Discover API page, select ProjectSight or ProjectSight-EU
  3. Select Subscriptions and subscribe your application
  4. Select Get Key and copy:
    • Application Name
    • Consumer Key (CLIENT_ID)
    • Consumer Secret (CLIENT_SECRET)

For more information, email ProjectSightAPISupport@trimble.com to request API access.

Note on Scope: The PROJECTSIGHT_SCOPE should match your API subscription region:

  • ProjectSight_-_US1 for US region
  • ProjectSight_-_EU1 for EU region
  • ProjectSight_-_US2 for Azure US region

3. Run the Server

STDIO Mode (default for MCP clients):

cd mcp
python main.py

HTTP Streaming Mode:

cd mcp
python main.py --http

With custom host/port:

# Windows PowerShell
$env:MCP_HOST="0.0.0.0"
$env:MCP_PORT="8000"
python main.py --http

# Linux/Mac
export MCP_HOST=0.0.0.0
export MCP_PORT=8000
python main.py --http

šŸ”§ MCP Client Configuration

STDIO Mode (Cursor, Claude Desktop, etc.)

{
    "mcpServers": {
        "projectsight": {
            "command": "python",
            "args": ["C:\\Users\\cforey\\Desktop\\projectsight-mcp\\mcp\\main.py"],
            "env": {
                "APPLICATION_NAME": "your_app_name",
                "CLIENT_ID": "your_client_id",
                "CLIENT_SECRET": "your_client_secret",
                "PORTFOLIO_ID": "your-portfolio-guid-or-account-id"
            }
        }
    }
}

Note: You can also use a .env file instead of setting environment variables in the config. The script will automatically load variables from a .env file in the mcp/ directory.

HTTP Mode

For MCP clients that support HTTP transport, configure the connection URL:

http://localhost:8000/mcp

šŸ“š Available Tools

Connection & Debug Tools

  • test_connection(): Test the connection to ProjectSight API and verify authentication
  • debug_token(): Debug token acquisition and validation (without exposing the actual token)
  • test_different_scopes(): Test different scope combinations to find what works

Project Operations

  • get_projects(portfolio_guid): Get Projects for a specific Portfolio. If portfolio_guid is not provided, uses PORTFOLIO_ID from .env.

ActionItem Operations

  • get_action_item(portfolio_guid, project_id, action_item_id): Get an indi

Tools (5)

test_connectionTest the connection to ProjectSight API and verify authentication
debug_tokenDebug token acquisition and validation (without exposing the actual token)
test_different_scopesTest different scope combinations to find what works
get_projectsGet Projects for a specific Portfolio. If portfolio_guid is not provided, uses PORTFOLIO_ID from .env.
get_action_itemGet an individual ActionItem by ID

Environment Variables

APPLICATION_NAMErequiredYour app name from Trimble API Cloud
CLIENT_IDrequiredConsumer Key (CLIENT_ID) from Trimble API Cloud
CLIENT_SECRETrequiredConsumer Secret (CLIENT_SECRET) from Trimble API Cloud
PORTFOLIO_IDrequiredYour portfolio ID or GUID
PROJECTSIGHT_API_URLrequiredProjectSight API URL, e.g. https://cloud.api.trimble.com/projectsight/us1/1.0
PROJECTSIGHT_SCOPErequiredAPI scope matching region, e.g. ProjectSight_-_US1

Configuration

claude_desktop_config.json
{
    "mcpServers": {
        "projectsight": {
            "command": "python",
            "args": ["./mcp/main.py"],
            "env": {
                "APPLICATION_NAME": "your_app_name",
                "CLIENT_ID": "your_client_id",
                "CLIENT_SECRET": "your_client_secret",
                "PORTFOLIO_ID": "your-portfolio-guid-or-account-id"
            }
        }
    }
}

Try it

→Test the connection to my ProjectSight API
→Get projects for my portfolio using get_projects
→Retrieve the action item with ID 123 from project ABC in portfolio XYZ using get_action_item
→Debug my authentication token with debug_token
→Test different scopes to see what works for my setup

Frequently Asked Questions

How do I install ProjectSight MCP Server?

Install ProjectSight MCP Server by running: python -m venv venv source venv/bin/activate pip install fastmcp python-dotenv aiohttp uvicorn cd mcp python main.py

What MCP clients work with ProjectSight MCP Server?

ProjectSight MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use ProjectSight MCP Server with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free