SE DocsSE Docs
Developer

MCP Setup Guide

Connect AI assistants to your Shocking Energy team data using the Model Context Protocol (MCP).

The Model Context Protocol (MCP) lets AI assistants query and manage your team data through a standardised interface of tools, resources, and prompts. This guide covers how to enable MCP and connect popular AI clients.

MCP integration is in beta. We recommend starting with read-only scopes and verifying AI actions before granting write access. Responses and tool behaviour may change between releases.


Prerequisites

Before connecting an AI assistant:

  1. You must be a team owner to enable MCP
  2. MCP must be enabled in Settings > MCP
  3. For clients other than Claude.ai, you need an API key from Settings > Developer > API Keys

Enable MCP

Navigate to Settings > MCP in the Shocking Energy dashboard.

Toggle Enable MCP on. This exposes the MCP endpoint for your team.

Copy the MCP Endpoint URL shown on the page. You will need this to configure your AI client.


Connect your AI assistant

Claude.ai

Claude.ai connects via OAuth — no API key is required.

Open Claude.ai > Settings > Connectors.

Click Add Custom Connector.

Paste the MCP endpoint URL and confirm.

You will be redirected to Shocking Energy to sign in and approve the requested scopes. After approval, Claude.ai has access.

Claude.ai uses OAuth 2.1 with PKCE for secure authentication. Your access token is scoped to the permissions you approve during consent. No API key is needed.


Claude Code (CLI)

Run this command in your terminal:

claude mcp add --transport http shocking-energy YOUR_MCP_ENDPOINT \
  --header "Authorization: Bearer YOUR_API_KEY"

Replace:

  • YOUR_MCP_ENDPOINT with the MCP endpoint URL from Settings > MCP
  • YOUR_API_KEY with your API key from Settings > Developer > API Keys

Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "shocking-energy": {
      "command": "npx",
      "args": [
        "mcp-remote@latest",
        "YOUR_MCP_ENDPOINT",
        "--header",
        "Authorization: Bearer YOUR_API_KEY"
      ]
    }
  }
}

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Requires Node.js 18+. If using nvm, replace npx with the full path (e.g. ~/.nvm/versions/node/v22.20.0/bin/npx).

If your MCP endpoint uses http:// (local development), add --allow-http after the endpoint URL.


Cursor / Other MCP clients

Add to your .cursor/mcp.json or the MCP settings in your editor:

{
  "mcpServers": {
    "shocking-energy": {
      "url": "YOUR_MCP_ENDPOINT",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

This configuration works with any MCP client that supports HTTP Streamable transport.


Available tools

MCP exposes tools organised by resource. Each tool includes annotations that tell AI clients whether a tool is read-only, writes data, or is destructive.

Jobs

Scope: jobs.read / jobs.write

ToolTypeDescription
jobs_listReadList jobs with filters (status, date range, engineer)
jobs_getReadGet full details of a specific job
jobs_countReadCount jobs by status
jobs_auditsReadView audit history for a job
jobs_createWriteCreate a new job
jobs_assign_engineerWriteAssign an engineer to a job
jobs_startWriteStart a job
jobs_completeWriteMark a job as completed
jobs_rescheduleWriteReschedule a job to a new date
jobs_delegateWriteDelegate a job to another team
jobs_cancelDestructiveCancel a job (cannot be undone)
jobs_abortDestructiveAbort a job (cannot be undone)

Flows

Scope: flows.read / flows.write

ToolTypeDescription
flows_list_groupsReadList flow groups
flows_get_groupReadGet a specific flow group
flows_list_by_groupReadList flows within a group
flows_getReadGet a specific flow
flows_regenerateWriteRegenerate a flow
flows_resendWriteResend a flow

Metrics

Scope: metrics.read

ToolTypeDescription
metrics_jobsReadJob completion metrics over time
metrics_jobs_by_typeReadJob metrics grouped by job type
metrics_logs_by_typeReadLog metrics grouped by type
metrics_flows_by_timeReadFlow metrics over time

Scope: search.read

ToolTypeDescription
search_globalReadSemantic search across all team data

Team

Scope: team.read

ToolTypeDescription
team_infoReadTeam profile and configuration
team_membersReadList team members
team_job_typesReadAvailable job types
team_job_type_detailReadFull details of a job type
team_suppliersReadAvailable suppliers

Assets

Scope: assets.read / assets.write

ToolTypeDescription
assets_listReadList assets with filters
assets_getReadGet asset by UUID/reference
assets_history_listReadList asset history events
asset_types_listReadList asset types
assets_createWriteCreate new asset
assets_updateWriteUpdate asset fields
assets_archiveDestructiveArchive an asset
assets_restoreWriteRestore asset from history
asset_types_createWriteCreate asset type
asset_type_versions_publishWritePublish asset type version

Projects

Scope: projects.read / projects.write

ToolTypeDescription
projects_listReadList projects
projects_getReadGet project by UUID/document reference
projects_revisions_listReadList project revisions
project_templates_listReadList project templates
clients_listReadList clients
sites_listReadList sites
projects_createWriteCreate project
projects_revisions_createWriteCreate revision from current
projects_jobs_addWriteLink job to project
projects_assets_addWriteLink asset to project
projects_invoices_addWriteLink invoice to project
projects_exportWriteTrigger PDF/DOCX export
project_templates_createWriteCreate project template
clients_createWriteCreate client
sites_createWriteCreate site

Invoices

Scope: invoices.read / invoices.write

ToolTypeDescription
invoices_listReadList invoices
invoices_getReadGet invoice by UUID/number
invoices_summaryReadInvoice totals/counts summary
invoicing_profile_getReadGet team invoicing profile
invoicing_contracts_listReadList contracts
invoicing_rates_listReadList rates
invoices_draft_upsertWriteCreate/update draft invoice
invoices_finalizeWriteFinalize and optionally send
invoices_approveWriteApprove invoice
invoices_cancelDestructiveCancel invoice
invoices_deleteDestructiveDelete draft/cancelled invoice
invoicing_profile_upsertWriteUpsert company/bank profile
invoicing_contracts_createWriteCreate contract
invoicing_rates_createWriteCreate rate
invoice_template_upsertWriteUpsert invoice template

Tool annotations

Every tool includes annotations that help AI clients assess safety:

AnnotationMeaning
ReadRead-only, safe to call freely. Will not modify any data.
WriteCreates or modifies data. AI clients should confirm before calling.
DestructiveCancels or aborts an operation. Cannot be undone. AI clients should always confirm.

AI clients like Claude use these annotations to decide whether to ask for confirmation before calling a tool. Read-only tools can be called freely, while write and destructive tools prompt for approval.


Resources

MCP resources provide static team data through the resources/read protocol method. Resources are cheaper than tool calls for data that rarely changes.

All resources require the team.read scope.

ResourceURIDescription
Team Infoshocking-energy://team/infoTeam profile, plan, timezone, and configuration
Team Membersshocking-energy://team/membersAll members with name, email, role, and avatar
Job Typesshocking-energy://team/job-typesAvailable job types with current version info
Suppliersshocking-energy://team/suppliersAvailable suppliers with MPID codes

Prompts

MCP prompts are pre-built analysis templates available via the prompts/get protocol method. They guide AI assistants through multi-step analysis workflows.

PromptDescription
job_health_checkAnalyse job completion, abort, and cancellation rates. Identifies SLA risks and trends.
flow_analysisAnalyse data flow success and failure rates. Identifies stuck flows and recurring errors.
engineer_performanceAnalyse workload distribution across engineers: job counts, completion times, and balance.
daily_operations_summaryEnd-of-day overview: jobs completed, flows processed, open issues, and next-day outlook.

Using prompts

Ask your AI assistant to use a prompt by name:

"Run the job health check for the last 7 days"

"Give me a daily operations summary for today"

The AI assistant will fetch the prompt template from the MCP server and use it to structure its analysis.


Security best practices

Treat API keys like passwords. Never commit them to version control or share them in plain text.

  • Start with read-only access — create API keys with apis.read scope first, then add write scopes only when needed
  • Scope by domain — use assets.*, projects.*, and invoices.* scopes for least-privilege integrations
  • Use dedicated keys per integration — create a separate API key for each AI client so each can be revoked independently
  • Review tool calls — destructive tools (cancel, abort) require write scope and AI clients will ask for confirmation
  • Rotate keys regularly — revoke and recreate API keys periodically
  • Use OAuth for third-party access — OAuth tokens are time-limited and can be revoked by the user at any time

Troubleshooting

On this page