MCP Servers

Expose integrations as tools for AI agents via the Model Context Protocol.

MCP Servers

MCP (Model Context Protocol) servers expose your integrations as tools that AI agents can discover and use. Create an MCP server, add integration tools, and connect it to Claude, Cursor, ChatGPT, or any MCP-compatible client.

Server Modes

MCP servers operate in one of two modes:

TOOLS Mode

Each integration action is exposed as a separate tool. The AI agent sees a flat list of tools like slack__send_channel_message, github__create_issue, etc. Best for focused servers with a small number of integrations.

CODE Mode

Instead of individual tools, the server exposes three meta-tools:

ToolPurpose
weavz_searchSearch available integrations and actions, including compact parameter signatures
weavz_read_apiRead detailed TypeScript declarations for a specific integration or alias
weavz_executeExecute code that calls integration actions

CODE mode keeps the initial tool surface small by letting the AI agent discover and call actions dynamically through code, rather than loading all tool schemas upfront. Best for agent-facing servers, broad workspaces, and multi-step workflows that combine several integrations.

Creating an MCP Server

bash
curl -X POST https://api.weavz.io/api/v1/mcp/servers \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My AI Tools",
    "workspaceId": "550e8400-e29b-41d4-a716-446655440000",
    "mode": "CODE"
  }'

New MCP servers use OAuth by default. The response includes the MCP endpoint; a one-time bearerToken is returned only if you create the server with authMode: "bearer" or authMode: "oauth_and_bearer".

json
{
  "server": {
    "id": "abc123def456",
    "name": "My AI Tools",
    "mode": "CODE",
    "authMode": "oauth",
    "endUserAccess": "restricted"
  },
  "mcpEndpoint": "https://api.weavz.io/mcp/srv_abc123def456"
}

Connecting MCP Clients

Use the MCP endpoint with OAuth-capable clients whenever possible. OAuth lets the agent sign in through Weavz so tool calls are scoped to the MCP server, workspace, and end user. Bearer-enabled servers can also issue one mcp_ token per end user for provisioned clients that cannot complete OAuth. Static bearer tokens are reserved for service-style clients that intentionally do not identify a user.

ClientRecommended setupNotes
VS Code / GitHub CopilotOne-click vscode:mcp/install or .vscode/mcp.jsonUse type: "http" with the MCP endpoint. Enable the server in Copilot Agent mode.
CursorOne-click Cursor deeplink or ~/.cursor/mcp.jsonCursor accepts a remote server URL and can authenticate through OAuth.
Claude / Claude DesktopAdd a custom connector with the endpointClaude hosted connectors work across Claude surfaces. Claude Desktop .mcpb packages are for local desktop extensions, not hosted Weavz endpoints.
Claude Codeclaude mcp add --transport http <name> <endpoint>Claude Code opens the browser OAuth flow for compatible remote servers.
ChatGPTCreate a custom MCP app in Developer modeAvailability depends on account and workspace settings. Choose OAuth when configuring the app.
Codexcodex mcp add <name> --url <endpoint>The CLI and IDE extension share the Codex MCP configuration.
WindsurfAdd a remote HTTP MCP in CascadeUse serverUrl or url in ~/.codeium/windsurf/mcp_config.json.
Cline / Kilo CodeAdd an HTTP / Streamable HTTP MCP serverMarketplace one-click installs require marketplace listing; workspace-specific Weavz servers should use custom config.
Gemini CLIgemini mcp add --transport http <name> <endpoint>Verify with /mcp after starting Gemini.
OpenCodeAdd a remote MCP entry under mcp in opencode.jsonUse type: "remote" and url.
ManusAdd a custom MCP server from IntegrationsUse an end-user bearer token or static bearer only when the client cannot complete OAuth.

Example OAuth config for clients that read mcpServers:

json
{
  "mcpServers": {
    "weavz-sales-tools": {
      "type": "http",
      "url": "https://api.weavz.io/mcp/srv_abc123def456"
    }
  }
}

VS Code uses a slightly different project config shape:

json
{
  "servers": {
    "weavz-sales-tools": {
      "type": "http",
      "url": "https://api.weavz.io/mcp/srv_abc123def456"
    }
  }
}

OpenCode uses a top-level mcp object:

json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "weavz-sales-tools": {
      "type": "remote",
      "url": "https://api.weavz.io/mcp/srv_abc123def456",
      "enabled": true
    }
  }
}

Adding Tools

The default way to expose tools is to add integrations to the workspace. MCP servers attached to that workspace sync workspace integrations automatically, so the same alias, connection strategy, enabled actions, input partial defaults, and built-in persistence settings apply to API, SDK, Playground, and MCP usage.

Use manual MCP tool registration only for server-specific exceptions. Manual tools are useful when one MCP server needs a smaller surface than the workspace default, but they should not be the first model for most setups.

bash
curl -X POST https://api.weavz.io/api/v1/workspaces/{workspaceId}/integrations \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "alias": "slack_bot",
    "connectionStrategy": "fixed",
    "connectionId": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
    "enabledActions": ["send_channel_message"]
  }'

When the same integration is configured more than once, the workspace integration alias becomes the MCP integrationAlias. Tool Mode names synced tools from a tool-safe version of the alias, and Code Mode exposes a JavaScript-safe namespace under weavz. For example, google-sheets becomes google_sheets. Use workspaceIntegrationId when your backend has the exact configured integration UUID.

For advanced server-specific manual tools, use POST /api/v1/mcp/servers/:id/tools and pass integrationAlias when you need a server-local alias override.

When an action input is invalid, MCP calls return a tool error with the validation details. For example, Code Mode reports unknown key "date"; missing required key "dateString" for datetime.parse_date({ date: "..." }), and reports allowed enum values for dropdown fields such as hash.hash({ algorithm: "SHA-256" }).

Tool Naming

In TOOLS mode, synced tools are named using the pattern {toolSafeIntegrationAlias}__{actionName}. Hyphens and other non-identifier characters are normalized to underscores. If you did not configure a custom alias, the integration name is used as the default alias:

  • slack__send_channel_message
  • github__create_issue
  • google_sheets__read_rows

Advanced Manual Tool Aliases

For most workspaces, configure the same integration multiple times with different workspace integration aliases. MCP tools inherit those aliases automatically.

Use manual MCP tool creation only when one server needs an override that should not affect the workspace integration. In that case, integrationAlias is a server-local tool alias:

bash
curl -X POST https://api.weavz.io/api/v1/mcp/servers/{serverId}/tools \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "integrationAlias": "slack_bot",
    "actionName": "send_channel_message",
    "connectionId": "conn_bot"
  }'

This creates a server-specific tool named slack_bot__send_channel_message instead of slack__send_channel_message. For shared aliases that should apply across API, SDK, Playground, and MCP, use workspace integrations.

Alias format: lowercase letters, numbers, hyphens, and underscores. Must start with a letter, max 64 characters.

Helper Tools

For actions with select inputs (e.g., selecting a Slack channel), MCP servers auto-generate companion tools so the AI agent can discover valid values:

slack__list_channels   →  companion tool for the "channel" select input on the `slack` alias

Helper tool naming: {integrationAlias}__list_{propertyName}s

Input Partials

Input partials are scoped to a workspace integration alias. Synced MCP tools receive matching default partials automatically, so slack_bot__send_channel_message can use partials scoped to slack_bot without affecting another Slack alias. Enforced keys are locked and cannot be overridden by the AI agent; they are also stripped from the tool schema so the agent never sees them.

Advanced manual MCP tools can assign explicit partialIds when that server needs a tool-specific preset:

bash
curl -X POST https://api.weavz.io/api/v1/mcp/servers/{serverId}/tools \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "actionName": "send_channel_message",
    "integrationAlias": "slack_bot",
    "connectionId": "conn_abc123",
    "partialIds": ["partial_001", "partial_002"]
  }'

Managing Tools

List tools on a server

bash
curl https://api.weavz.io/api/v1/mcp/servers/{serverId} \
  -H "Authorization: Bearer wvz_your_api_key"

Remove a tool

bash
curl -X DELETE https://api.weavz.io/api/v1/mcp/servers/{serverId}/tools/{toolId} \
  -H "Authorization: Bearer wvz_your_api_key"

End-User MCP Servers

For per-user integrations, prefer MCP OAuth when the MCP client can open a browser sign-in flow. The MCP client signs in as the actual user and Weavz scopes the resulting token to the server, workspace, and end user.

When you provision MCP clients from your own application and already know the end user, create a bearer-enabled MCP server and issue one end-user bearer token per client. These mcp_ tokens are still scoped to the server, workspace, and end user, unlike a shared static bearer token.

Use endUserAccess to control who may authorize the server:

  • restricted — only pre-existing workspace end users can authorize. Weavz matches the signed-in user by linked account or email and links the record when needed.
  • open — any signed-in user can authorize the server; Weavz creates or links their workspace end-user record.

If you are provisioning clients programmatically for a bearer-enabled server, issue an end-user bearer token for an existing end user:

bash
curl -X POST https://api.weavz.io/api/v1/mcp/servers/abc123def456/access-tokens \
  -H "Authorization: Bearer wvz_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "endUserId": "user_123"
  }'

When a tool call fails because the end user hasn't connected the required integration, the error response includes a setup URL. Share this URL with the end user so they can connect their account and retry.

Next Steps

Create your first MCP server in the dashboard, start with the MCP Code Mode guide for broad agent access, or use MCP Tool Mode for small focused servers.