Provides access to the ProjectSight API for managing portfolios, projects, and construction records like ActionItems, RFIs, and Submittals, including support for workflow states and project lookups.
Click on "Install 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., "@ProjectSight MCP Serverlist the open action items for project 101"
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.
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
š Quick Start
1. Install Dependencies
Or using a virtual environment:
2. Configure Credentials
Create a .env file in the mcp/ directory (or project root) with your ProjectSight API credentials:
Getting Credentials:
Sign in to API Cloud with your Trimble account
On the Discover API page, select ProjectSight or ProjectSight-EU
Select Subscriptions and subscribe your application
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_-_US1for US regionProjectSight_-_EU1for EU regionProjectSight_-_US2for Azure US region
3. Run the Server
STDIO Mode (default for MCP clients):
HTTP Streaming Mode:
With custom host/port:
š§ MCP Client Configuration
STDIO Mode (Cursor, Claude Desktop, etc.)
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:
š 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_guidis not provided, usesPORTFOLIO_IDfrom.env.
ActionItem Operations
get_action_item(portfolio_guid, project_id, action_item_id): Get an individual ActionItem
list_action_items(portfolio_guid, project_id): List ActionItems for a project. If
portfolio_guidis not provided, usesPORTFOLIO_IDfrom.env.create_or_update_action_item(portfolio_guid, project_id, action_item_data): Create or update an ActionItem
delete_action_item(portfolio_guid, project_id, action_item_id): Delete an ActionItem
RFI Operations
get_rfi(portfolio_guid, project_id, rfi_id): Get an individual RFI
list_rfis(portfolio_guid, project_id, project_name): List RFIs for a project. Supports finding project by name if
project_idis not provided. Ifportfolio_guidis not provided, usesPORTFOLIO_IDfrom.env.create_or_update_rfi(...): Create or update an RFI with flexible parameters:
Required:
subject,question(ordetails), and eitherproject_idorproject_nameOptional:
date_due,importance,details,author_contact_id, etc.Automatically handles date normalization, project name lookup, workflow state detection, and RFI number generation
delete_rfi(portfolio_guid, project_id, rfi_id): Delete an RFI
Submittal Operations
get_submittal(portfolio_guid, project_id, submittal_id): Get an individual Submittal
list_submittals(portfolio_guid, project_id): List Submittals for a project. If
portfolio_guidis not provided, usesPORTFOLIO_IDfrom.env.
Workflow Operations
get_workflow_states(record_type, portfolio_guid, project_id): Get workflow states for a record type (e.g., "RFI", "ActionItem", "Submittal"). If
portfolio_guidis not provided, usesPORTFOLIO_IDfrom.env.
šļø Architecture & Best Practices
This MCP server has been refactored into a scalable, maintainable structure that demonstrates best practices:
Modular Design: Each component in its own file with clear responsibilities
Separation of Concerns: Configuration, authentication, API client, and tools are separated
Organized Tools: Tools grouped by domain for easy discovery and extension
Comprehensive Documentation: Architecture guide and extension examples included
š Learning Resource
This structure is designed to be a teaching example - use it as a reference when building your own MCP servers! The code demonstrates:
ā Single Responsibility Principle
ā Separation of Concerns
ā Dependency Injection
ā DRY (Don't Repeat Yourself)
ā Clear Naming Conventions
ā Comprehensive Documentation
ā Type Hints
ā Error Handling Patterns
š Authentication
The server uses OAuth2 client credentials flow with Trimble Identity:
Tokens are automatically cached and refreshed
Token cache is stored at
~/.cache/projectsight/token_cache.jsonTokens are refreshed automatically when expired
š Important Notes
Portfolio ID: The
PORTFOLIO_IDenvironment variable can be either:An integer AccountID (e.g.,
1,2,3)A Portfolio GUID in UUID format (e.g.,
b1123573-2dac-4499-81f4-7ec44b89152c)
Project Lookup: Many tools support finding projects by name (case-insensitive, partial match) if you don't know the project ID.
RFI Creation: The
create_or_update_rfitool is highly flexible and will:Auto-detect workflow states from existing RFIs
Auto-generate RFI numbers
Normalize dates from various formats ("today", "tomorrow", "2026-01-26", etc.)
Map importance text ("high", "normal", "low") to importance IDs
Use existing RFI settings as defaults when appropriate
š Exposing via Public URL (Tunneling)
To make your local server accessible via a public URL, use a tunneling service:
Option 1: ngrok (Recommended)
Install ngrok on Windows:
winget install ngrok.ngrokStart your MCP server:
cd mcp python main.py --httpCreate a tunnel (in a separate terminal):
ngrok http 8000Use the public URL: ngrok will provide a public URL like
https://abc123.ngrok-free.dev. The MCP endpoint is at/mcp:https://abc123.ngrok-free.dev/mcp
Option 2: Cloudflare Tunnel (cloudflared)
Install cloudflared: Download from developers.cloudflare.com
Start your MCP server:
cd mcp python main.py --httpCreate a tunnel (in a separate terminal):
cloudflared tunnel --url http://localhost:8000Use the public URL: Cloudflare will provide a public URL like
https://random-subdomain.trycloudflare.com. Your MCP endpoint will be:https://random-subdomain.trycloudflare.com/mcp
š Security Note
When exposing your server publicly, consider:
Adding authentication/API keys if your MCP server handles sensitive data
Using HTTPS (all tunneling services above provide HTTPS)
Limiting access to specific IPs if possible
Monitoring usage and rate limiting
š Rate Limits
Based on updated guidance from Trimble Cloud, you don't need to pass the x-API-key to the trimblepaas.com endpoints. If you do pass it, there is a limit of 50 requests per second.
š API Documentation
For detailed API documentation, refer to:
š Migration from Old Structure
If you were using the old projectsight.py file directly:
Update command: Use
python main.pyinstead ofpython projectsight.pyConfiguration: Same
.envfile format (place inmcp/directory)MCP Client Config: Update path to point to
mcp/main.pyTools: All tools work the same, just organized better
The old projectsight.py file is still available for reference but the new modular structure is recommended.
š ļø Extending the Server
See mcp/EXAMPLE_EXTENSION.md for detailed examples. Quick template:
Then register it in mcp/tools/__init__.py.
š License
This project is provided as-is for use with the ProjectSight API.
Built with best practices in mind - Use this structure as a reference for building your own MCP servers! š