Hopp til hovedinnhold

MCP integration

Scoutello provides a remote Model Context Protocol (MCP) server for controlled access to organization data. It uses the same integrations, API keys, scopes, tenant checks, rate limits, and record behavior as the Scoutello REST API.

Use MCP when an AI client or agent should discover and call Scoutello operations as tools. Use REST when an application needs conventional HTTP endpoints or a generated OpenAPI client. Both surfaces use the same underlying data contract.

Before connecting

An organization administrator must create an integration in Organization settings → Developer/API. When creating or rotating its key:

  1. Select only the read and write scopes the MCP client needs.
  2. Save the complete sctl_api_ key when it is shown. Scoutello displays it once.
  3. Store the key in the MCP client's secret or environment configuration, not in source control.

The same integration key can call REST and MCP. Creating a second MCP-specific key is neither required nor recommended. Former sctl_mcp_ keys are not accepted.

Connection values

Configure the client with these values:

Transport: Streamable HTTP
URL: https://admin.scoutello.com/api/v1/mcp
Header name: Authorization
Header value: Bearer YOUR_API_KEY

Replace YOUR_API_KEY with the saved integration key. Client configuration formats differ, but the transport, URL, and HTTP header above stay the same. If a client cannot set Authorization, it may send the key in x-api-key instead. Do not configure both headers.

The legacy https://admin.scoutello.com/api/mcp URL remains a compatibility alias. New connections should use the versioned /api/v1/mcp endpoint.

Verify the connection

After the client connects, call the whoami tool first. It returns the current integration and organization, credential expiry and usage information, rate-limit state, and granted scopes without exposing organization records.

If whoami identifies an unexpected organization or integration, disconnect the client and correct its key before calling another tool.

Tools and scopes

The MCP server only advertises tools granted by the current key. A client cannot discover or call a write tool using only the corresponding read scope.

API scopeMCP tools
contacts.readcontacts_list, contacts_get, contacts_get_by_external_id
contacts.writecontacts_batch_upsert
tasks.readtasks_list, tasks_get, tasks_get_by_external_id
tasks.writetasks_batch_upsert
protocols.readprotocols_list, protocols_get, protocols_get_by_external_id
protocols.writeprotocols_batch_upsert
opportunities.readopportunities_list, opportunities_get, opportunities_get_by_external_id
opportunities.writeopportunities_batch_upsert
projects.readprojects_list, projects_get, projects_get_by_external_id
projects.writeprojects_batch_upsert
events.readevents_list, events_get, events_get_by_external_id
events.writeevents_batch_upsert
mails.readmails_list, mails_get
tags.readtags_list

whoami is always available to an authenticated connection. Tool inputs and results follow the same schemas and response envelopes as their linked REST operations.

Write safely

Batch-upsert tools can change Scoutello data immediately. They are idempotent for the same integration and external IDs, but callers should still review the intended resource, organization, and scope before applying changes.

Set mode to validate to run matching and validation without writing. After inspecting the results, repeat the call with mode: "apply" to accept valid records. MCP does not expose delete operations.

Pausing an integration rejects both REST and MCP requests using its keys. Rotating replaces its credential, and revoking permanently disables every credential belonging to the integration.

Troubleshooting

ResultWhat to check
401 authentication errorConfirm that the complete key is present and the header uses Bearer, with no quotes around the key.
403 authorization errorGrant the required scope by rotating the integration key, then update the client with the replacement key.
404 at the MCP URLConfirm the URL ends in /api/v1/mcp. The MCP service may not yet be enabled in that Scoutello environment.
429 rate-limit errorWait until the returned reset time before retrying. REST and MCP consume the same integration quota.
Tool is missingCheck the key's scopes with whoami; unavailable tools are intentionally omitted from discovery.

For record fields, pagination, batch behavior, and error envelopes, continue with the Scoutello API reference.