Skip to main content
Glama
Procore MCP Server

Procore MCP Server

Procore MCP Server

procore-mcp-server MCP server

一个 MCP 服务器,将完整的 Procore REST API 暴露给 Claude 等 AI 助手。使用 TypeScript 和 Model Context Protocol SDK 构建。

适用于 Claude Desktop、Claude Code 以及任何兼容 MCP 的客户端。

功能说明

构建时解析器将 Procore 的 OpenAPI 规范转换为紧凑的目录,然后为每个 API 操作自动生成独立的 MCP 工具。运行时,7 个元工具让 AI 能够发现并调用任何 Procore 端点:

工具

用途

procore_discover_categories

列出 API 类别及端点数量

procore_discover_endpoints

列出某个类别中的端点

procore_search_endpoints

跨所有端点进行全文搜索

procore_get_endpoint_details

获取端点的完整参数结构

procore_api_call

执行任意 Procore API 调用

procore_get_config

显示当前配置和认证状态

procore_set_config

设置运行时配置(company_id、project_id)

Related MCP server: mcp-clickup

前提条件

  • Node.js 18+

  • 一个 Procore Developer Portal 账户

  • 一个使用 Authorization Code 授权类型的 OAuth 应用

  • 将你的重定向 URI 设置为 http://localhost

设置

git clone https://github.com/TylerIlunga/procore-mcp-server.git
cd procore-mcp-server
npm install

复制示例环境变量文件并填写你的凭据:

cp .env.example .env
PROCORE_CLIENT_ID=your_client_id
PROCORE_CLIENT_SECRET=your_client_secret
PROCORE_COMPANY_ID=your_company_id

默认情况下,服务器暴露 7 个发现工具,所有 Procore 端点都通过 procore_api_call 访问。如果改为为每个端点注册专用工具,则会生成约 4.7 MB(~1.2M tokens)的工具定义——超过当前任何模型的上下文窗口——因此该模式是可选加入的:

PROCORE_TOOL_MODE=all

两种模式下的覆盖范围完全相同;不同的只是对外展示的工具列表大小。如果你切换到 all 并且是从 v2.0.0 之前的版本迁移而来,请参阅 data/tool-renames.json 中的旧 -> 新工具名称映射。

你需要将 Procore 的 OpenAPI 规范文件放在 specs/combined_OAS.json。由于该文件体积较大(~54MB),未包含在仓库中。你可以从 Procore 的 API 文档 获取。

构建目录并编译 TypeScript:

npm run build

使用 Procore 进行身份验证(会打开浏览器进行 OAuth):

npm run auth

启动服务器:

npm start

Claude Desktop 配置

添加到你的 Claude Desktop 配置(~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "procore": {
      "command": "node",
      "args": ["/absolute/path/to/procore-mcp-server/dist/src/index.js"],
      "env": {
        "PROCORE_CLIENT_ID": "your_client_id",
        "PROCORE_CLIENT_SECRET": "your_client_secret",
        "PROCORE_COMPANY_ID": "your_company_id"
      }
    }
  }
}

Claude Code 配置

添加到项目根目录下的 .mcp.json:

{
  "mcpServers": {
    "procore": {
      "command": "node",
      "args": ["/absolute/path/to/procore-mcp-server/dist/src/index.js"],
      "env": {
        "PROCORE_CLIENT_ID": "your_client_id",
        "PROCORE_CLIENT_SECRET": "your_client_secret",
        "PROCORE_COMPANY_ID": "your_company_id"
      }
    }
  }
}

项目结构

src/
  auth/       OAuth token exchange, refresh, storage
  api/        HTTP client with auth, rate limits, retries
  catalog/    Endpoint catalog loading, search, filtering
  tools/      MCP tool handlers and registration
scripts/
  generate-catalog.ts          Parse OAS into catalog
  generate-tools-manifest.ts   Generate per-endpoint MCP tools
  validate-catalog.ts          Validate catalog integrity
data/         Build output (committed): catalog.json, endpoint details, tools manifest
specs/        Source OAS file (gitignored — too large for the repo)

工作原理

  1. 构建时:scripts/generate-catalog.ts 解析约 54MB 的 Procore OpenAPI 规范(3,155 个操作),生成紧凑的 data/catalog.json 以及 data/endpoint-details/ 中各个端点的详情文件。然后 scripts/generate-tools-manifest.ts 生成一个工具清单,其中每个 API 操作对应一个命名的 MCP 工具——在合并同一路径的旧版本重复项后,共 2,929 个。

    每个生成的工具都带有结构化描述,涵盖其作用对象、何时使用它、需要先解析哪些父级 id、返回什么以及如何失败。Procore 已弃用的端点会在描述中注册其停用日期,并带有 (Deprecated) 标题。交互式 /oauth/* 端点不会注册为工具——npm run auth 负责该流程——但仍可通过 procore_api_call 访问。

  2. 认证:运行一次 npm run auth 即可在浏览器中完成 OAuth 流程。令牌保存在 ~/.procore-mcp/tokens.json 中,过期后会自动刷新。

  3. 运行时:MCP 服务器加载目录并注册 7 个发现工具(当 PROCORE_TOOL_MODE=all 时还会注册完整的逐端点工具面)。当 AI 助手调用工具时,服务器会将其映射到正确的 Procore API 端点,注入认证头,处理速率限制和分页,并返回响应。

灵感

构建这个项目的初衷是帮助我的女朋友,她是一名每天使用 Procore 的施工工程师。

许可证

MIT

Available Tools

7 tools
procore_api_callExecute Any Procore API CallA
Destructive

Executes any Procore REST API call. This is the only tool here that reaches Procore and the only one that can change data — resolve the exact method, path, and parameters with procore_get_endpoint_details first. WRITES ARE REAL: DELETE permanently removes the record, POST creates one, and PATCH/PUT overwrite fields, so confirm the target id before calling and prefer a GET to verify it exists. Handles OAuth from the saved tokens, substitutes {placeholders} from path_params, and rewrites double underscores in query keys into brackets (filters__status becomes filters[status]). company_id and project_id fall back to whatever procore_set_config holds when the path needs them and you omit them. Returns the parsed JSON response together with pagination and rate-limit metadata. Failures come back as an error payload carrying the HTTP status — commonly 401 when the token has expired, 403 without tool permission, 404 when an id does not resolve, 422 when the body fails validation, and 429 when the rate limit is exhausted. Step 4 of the workflow; this reaches every Procore endpoint, including any not exposed as a dedicated tool.

Inputs: path (required), method (required), body, page, +4 more.

procore_discover_categoriesDiscover Procore API CategoriesA
Read-onlyIdempotent

Lists Procore's API surface as a Category > Module tree with an endpoint count for each. Start here when you do not yet know which part of Procore holds the data you need; if you already know the resource by name ('RFI', 'budget'), procore_search_endpoints gets you there in one step instead of three. The category and module names returned are the exact values procore_discover_endpoints expects. Takes no arguments and returns a JSON object. Reads the catalog bundled with this server, so it makes no Procore request and needs no authentication — it cannot fail with 401/403 and costs no rate limit. Step 1 of the discover -> detail -> call workflow.

Inputs: no named parameters.

procore_discover_endpointsDiscover Endpoints in a CategoryA
Read-onlyIdempotent

Lists the Procore endpoints inside one category or module, optionally narrowed by a summary substring or HTTP method. Use it after procore_discover_categories to enumerate a focused area; prefer procore_search_endpoints when you have a keyword but no category. Every argument is optional, but omitting all of them returns the entire ~3,100-endpoint catalog, so pass at least a category or a search term. Returns a JSON array of {operationId, summary, method, path}; feed an operationId to procore_get_endpoint_details. Filters that match nothing return an empty array, not an error. Reads the bundled catalog: no Procore request, no authentication, no rate-limit cost. Step 2 of the workflow.

Inputs: module, search, category, method_filter.

procore_get_configShow Server ConfigurationA
Read-onlyIdempotent

Reports this server's current state: whether Procore OAuth tokens are present and still valid, the default company_id, and the active project_id that procore_api_call substitutes when you omit those parameters. Check this first when a call fails with 401 or 403, or to confirm which project subsequent calls will target before running a write. Never returns token values or the client secret — only whether credentials are present. Takes no arguments and returns a JSON object. Reads local process state, so it makes no Procore request. Pair with procore_set_config to change any of it.

Inputs: no named parameters.

procore_get_endpoint_detailsGet Full Endpoint DetailsA
Read-onlyIdempotent

Returns the complete parameter schema for one Procore endpoint: every path, query, and body field with its type and required flag, plus the response shape. Call this after discovery and before procore_api_call — api_call needs exact parameter names, and guessing them is the most common cause of a rejected request. Takes the operationId string that procore_discover_endpoints and procore_search_endpoints return; an unrecognized operation_id comes back as a not-found message rather than an error. Reads the bundled catalog: no Procore request, no authentication, no rate-limit cost. Step 3 of the workflow.

Inputs: operation_id (required).

procore_search_endpointsFull-Text Search Across EndpointsA
Read-onlyIdempotent

Searches every Procore endpoint's summary, tag, and path for a term and returns the matches ranked by relevance. This is the fastest way in when you already know roughly what you want ('punch list', 'submittal', 'budget line item'); reach for procore_discover_categories instead when you want to browse the API surface rather than search it. Returns a JSON array of {operationId, summary, method, path}; feed an operationId to procore_get_endpoint_details to get its parameters. A term with no matches returns an empty array, so retry with a broader or singular form before concluding the endpoint does not exist. Reads the bundled catalog: no Procore request, no authentication, no rate-limit cost.

Inputs: query (required).

procore_set_configSet Runtime Configuration ValueA
Idempotent

Sets the default company_id or project_id that later procore_api_call requests use when the path needs one and you omit it. Use it to switch project context mid-session instead of restarting the server, then call procore_get_config to confirm what took effect. Only 'company_id' and 'project_id' are accepted; both are coerced to integers, and a non-numeric value is reported back as a message rather than stored. The change lives in memory for this server process only — it is never written to disk and is lost on restart. Setting the same value twice is a no-op, and nothing in Procore is modified: this only changes which ids this server fills in for you. Returns a confirmation plus the full updated configuration.

Inputs: key (required), value (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.8/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a clearly distinct role: browse categories, search endpoints, get endpoint details, execute an API call, and read/write config. Even discover_endpoints and search_endpoints both return endpoints, but their descriptions frame them as browse vs. keyword lookup, so an agent should not misselect.

    Naming Consistency4/5

    All tools share a procore_ snake_case prefix and most follow a verb_noun pattern (discover_categories, get_config, search_endpoints). The one outlier is procore_api_call, which reads as noun_noun rather than call_api, but it remains clear and does not create real confusion.

    Tool Count5/5

    Seven tools is well-scoped for a generic API-access server: discovery, search, schema inspection, execution, and config get/set each earn their place. There is no redundancy and no obvious missing companion tool.

    Completeness5/5

    The tool set fully covers its stated discover -> detail -> call workflow, with search added for faster lookup and config tools for context switching. Since procore_api_call can reach every Procore endpoint, no dedicated per-resource tools are needed for the server's purpose.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers