← Back to docs

Model Context Protocol (MCP)

Model Context Protocol (MCP)

ToolsAPI exposes a remote MCP endpoint at /mcp. MCP clients use the same owner-bound API-key model as the rest of ToolsAPI; MCP does not create a second account or credential store.

Authentication

Create or update a personal API key from My API Keys and grant it the mcp.connect scope. Send that secret as a bearer token:

Authorization: Bearer YOUR_TOOLS_API_KEY

X-Api-Key is accepted as a compatibility fallback for server-side clients. Do not place either credential in browser JavaScript, URLs, logs, screenshots, prompts or public configuration.

The mcp.connect scope only opens the MCP boundary. Every domain tool may require additional scopes and ownership checks. A client can discover only tools that its API key can actually invoke.

Endpoint and protocol

Canonical endpoint:

https://YOUR_TOOLS_HOST/mcp

The primary protocol revision is 2026-07-28, using the stateless MCP HTTP model. Current requests send MCP-Protocol-Version and Mcp-Method; calls to named tools also send Mcp-Name. The endpoint also keeps bounded stateless compatibility for 2025-11-25 and 2025-06-18 clients.

The server does not issue or depend on Mcp-Session-Id for this integration.

Connection status and discovery

  • toolsapi.connection_status is available with mcp.connect. It confirms authentication and reports whether mcp.todo is granted and which additional To Do scope is missing, without revealing credentials.
  • Domain tools, including Microsoft To Do and Google Calendar, appear in tools/list only when the authenticated client has the required scopes. Every discoverable tool advertises its required OAuth scopes in securitySchemes and _meta.securitySchemes for clients that support those hints. These hints never replace server-side authorization.

Current-protocol example

POST /mcp
Authorization: Bearer YOUR_TOOLS_API_KEY
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: toolsapi.connection_status
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "toolsapi.connection_status",
    "arguments": {},
    "_meta": {
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-client",
        "version": "1.0"
      }
    }
  }
}

User and administrator views

  • /me/mcp shows the endpoint, supported protocol revisions, the signed-in user's MCP-capable key names/IDs and the tools visible to those keys. Secret key values are never rendered there.
  • /admin/mcp shows the registered tool catalog and recent structured MCP audit records. It is administrator-only.
  • /services provides service discovery without adding MCP to the main navbar.

Audit and diagnostics

Meaningful tool calls are written to the dedicated MCP audit log with safe actor, tool, protocol/client, result and correlation metadata. Tokens and credential-like context are redacted.

Unexpected operational tool failures are also logged through the normal ToolsAPI operational diagnostics path so they remain visible in #toolsapi independently of audit persistence. Expected authentication, protocol and validation rejections are returned to the client without generating operational-alert noise.

Cross-origin requests

Remote server-to-server MCP clients normally do not send a browser Origin header. If an Origin header is present in the foundation implementation, it must match the ToolsAPI request host; malformed or cross-host browser origins are rejected. Managed OAuth/client-origin support is tracked separately from the core transport.

Google Calendar

Calendar event listing follows Google pagination for a maximum of ten pages. If Google still reports more pages or repeats a page token, the tool returns an error rather than an incomplete list; narrow the date range and try again.

Sign in to Tools and open /me/mcp. Select Connect Google Calendar and authorize Calendar events access for your Google account. An ordinary Google login is not sufficient for Calendar writes. Calendar consent reuses the existing Google sign-in callback /auth/google/callback rather than a separate /me/google-calendar/callback URL. Ensure the exact redirect URI displayed on /me/mcp matches an authorized URI for the existing Google Cloud OAuth web client, including scheme, host and path. Calendar authorization uses /auth/google/callback as its callback address. The Calendar connection is scoped to the signed-in Tools account and stays separate from ordinary Google sign-in and account linking.

A personal MCP token requires both mcp.connect and mcp.calendar, or the same scopes approved through MCP OAuth. The tools are toolsapi.calendar_list_events (primary calendar events in a bounded date range) and toolsapi.calendar_create_event (requires explicit confirmation, exact start/end date-times with offsets, IANA timezone, and optionally a location/description). A caller may supply an idempotency_key to avoid duplicate events on an uncertain retry. Reconnect under /me/mcp if authorization expires. Disconnect removes the linked Calendar tokens.

Microsoft To Do tools

Grant the personal key both mcp.connect and mcp.todo. The seven registered To Do tools are toolsapi.todo_list_lists, toolsapi.todo_list_tasks, toolsapi.todo_create_list, toolsapi.todo_create_task, toolsapi.todo_create_tasks, toolsapi.todo_update_task, and toolsapi.todo_complete_task. All operations use the authenticated key owner's existing Microsoft To Do connection and local sync queue. Create and update operations are queued locally (sync_deferred: true) until the normal Microsoft To Do sync runs. Specify a list ID to override the owner's default; clients must request user confirmation before writes. Batch creation accepts 1-20 tasks and reports each result. The MCP endpoint does not transcribe audio; clients submit already transcribed text.

Default Microsoft To Do list

When list_id is omitted from todo_list_tasks, todo_create_task, or todo_create_tasks, the server uses the signed-in owner's saved default list. On first use, an existing ChatGPT To-Do list is reused, or a new list with that name is queued for creation. Its stable local ID is saved, so renaming does not change the default. Choose another existing list under /me/mcp. An explicitly supplied list ID overrides the default for that call. If the saved list was deleted, the call fails until a new default is selected. Microsoft Graph synchronization is deferred; queued local changes are not proof of remote delivery.

Managed OAuth clients connect through authorization-code/PKCE consent. Existing bearer API keys remain supported.

ChatGPT connection and missing To Do tools

A ChatGPT client using Microsoft To Do must request both mcp.connect and mcp.todo at OAuth authorization. If the same connection also exposes Google Calendar, request mcp.calendar too. This example includes all three scopes; only request a scope when the user should be able to grant that capability. A plugin manifest using OpenAI's MCP extension can declare:

{
  "mcpServers": {
    "toolsapi": {
      "type": "streamable-http",
      "url": "https://YOUR_TOOLS_HOST/mcp",
      "extensions": {
        "com.openai": {
          "auth": {
            "type": "oauth",
            "baseScopes": ["mcp.connect", "mcp.todo", "mcp.calendar"]
          }
        }
      }
    }
  }
}

If ChatGPT displays only toolsapi.connection_status, check todo_scope_granted and missing_scopes in that tool's response. For an existing grant missing mcp.todo, revoke that client's old consent in /me/mcp and reconnect the ChatGPT plugin, approving both requested scopes. Changing the plugin manifest or deploying server code cannot silently upgrade an existing OAuth grant. A successful ToolsAPI connection also does not by itself prove that the separate personal Microsoft To Do/Graph account connection has completed synchronization.

Managed OAuth clients

Clients can discover authorization at /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server. Public clients register redirect URIs through POST /oauth/register, then start an authorization-code flow at /oauth/authorize with PKCE S256, explicit mcp.connect and, as needed, mcp.todo and/or mcp.calendar scopes. After the owner approves, the client exchanges the code at /oauth/token; access tokens expire after one hour and refresh tokens after 30 days, with rotation. Owners can revoke client grants at /me/mcp; clients can revoke tokens at /oauth/revoke. Existing API-key clients continue to work. Each ChatGPT app or plugin registration must independently request its required scopes. The server's OAuth metadata and GitHub plugin manifest cannot silently change an existing ChatGPT registration or an already approved grant.

Quick reconnection from the MCP page

The /me/mcp page links to the existing Microsoft To Do OAuth flow and To Do integration page. These are separate from the MCP client's OAuth grant. Choose Connect / reconnect Microsoft To Do when Microsoft Graph needs reauthorization; doing so does not upgrade ChatGPT permissions.

Authorized MCP clients lists the tools the server expects to offer based on each client's scopes. This does not confirm what ChatGPT's cached tool discovery currently exposes. When both mcp.connect and mcp.todo are granted but ChatGPT only displays toolsapi.connection_status, refresh or reconnect the plugin inside ChatGPT so its tool list is fetched again. If mcp.todo is missing, revoke only that client's grant and reauthorize it. Avoid unnecessary revocation of other clients or the Microsoft account.

Missing mcp.todo and ChatGPT write permissions

An MCP OAuth client with only mcp.connect can read connection status but not To Do tools. The status tool now emits a standard insufficient_scope challenge through _meta["mcp/www_authenticate"], allowing compatible clients to request explicit new consent for mcp.connect mcp.todo. No scopes are granted automatically. API keys only receive diagnostics.

The separately registered App SDK app and MCP plugin are distinct connections. The MCP plugin manifest does not update the other app's OAuth configuration. mcp.todo covers both task reads and writes. Allow low-risk tools may automatically approve some writes, whereas Allow read-only tools allows unprompted reads and requests approval for changes. Neither setting grants OAuth scopes.

Create a To Do list through MCP

Use toolsapi.todo_create_list with the required display_name (1-190 characters). The tool requires mcp.connect and mcp.todo, is a write operation and may require user approval in the ChatGPT client. It calls the current user's existing Microsoft To Do service, not a shared administrative account.

Example MCP tools/call parameters:

{
  "name": "toolsapi.todo_create_list",
  "arguments": { "display_name": "My planning list" }
}

The structuredContent of a successful creation has this shape (IDs are illustrative):

{
  "ok": true,
  "data": {
    "list": { "id": 123, "name": "My planning list", "sync_pending": true },
    "created": true,
    "sync_deferred": true
  }
}

Use data.list.id as list_id with toolsapi.todo_create_task or toolsapi.todo_create_tasks. Omitting list_id when adding tasks instead selects the owner's separately configured default list. A repeated creation with the same case-insensitive active list name normally returns created: false and the existing ID. This is not a concurrency-safe deduplication guarantee.

Remote sync: A successful MCP write records the new list or task in ToolsAPI. When sync_pending: true or sync_deferred: true, Microsoft Graph has not yet confirmed the change. Run normal Microsoft To Do synchronization from the To Do integration (or its /todo workspace) and inspect its status. Do not claim the list has arrived in Microsoft's app before sync succeeds.

Refresh, reconnect, and scope changes

  • Refresh / tool rediscovery: After deploying a new MCP tool such as toolsapi.todo_create_list, refresh the existing ChatGPT MCP connection to fetch the updated tool catalog. No reinstallation is required solely for new tools when the existing OAuth grant has their required scopes.
  • New OAuth scope: Refreshing tools does not add permissions to a previously approved token. A ChatGPT client must request the new scope and the user must approve it in a new OAuth authorization. For a combined To Do and Calendar app, the source-controlled plugin baseScopes are mcp.connect, mcp.todo, and mcp.calendar.
  • Separate providers: mcp.todo is not Microsoft's Graph Tasks.ReadWrite; mcp.calendar is not Google Calendar account authorization. Each account integration must be connected separately under the same ToolsAPI user.
  • Separate ChatGPT registrations: Updating source-controlled MCP plugin manifests does not update independently registered App SDK apps. Verify each application's Base scopes in its own ChatGPT configuration.

When all three MCP scopes are granted, the server advertises 10 tools: one connection-status tool, seven Microsoft To Do tools, and two Google Calendar tools. The client's cached tool list may still require Refresh. The server never silently expands existing OAuth grants.