External MCP Tools for Chat Agents
Connect your Chat agents (Chat Apps and Chat Widgets) to external MCP servers to access custom tools and integrations beyond Vectorize's built-in capabilities. This feature enables Chat agents to use tools from any MCP-compatible server alongside your Vectorize retrieval tools.
This feature is only available for Chat agents (Chat Apps and Chat Widgets).
Overview
External MCP tools allow your Chat agents to:
- Connect to third-party MCP servers via HTTPS
- Use custom tools for specialized tasks (e.g., Linear issue creation, GitHub operations)
- Authenticate using various methods (Bearer tokens, OAuth 2.1, custom headers)
- Combine external tools with Vectorize retrieval for comprehensive agent capabilities
How It Works
When you configure an external MCP server:
- Discovery - Vectorize connects to the MCP server and discovers available tools
- Integration - Tools are made available to your agent alongside Vectorize tools
- Execution - When the agent needs a tool, Vectorize proxies the request to the external server
- Results - Responses are returned to the agent for processing
Adding External MCP Servers
Navigate to Tools Settings
- Open your Chat agent's admin panel (Chat App or Widget)
- Click Tools & Functions in the sidebar
- You'll see sections for Vectorize tools and MCP servers
Add a New MCP Server
Click Add MCP Server to configure a new external server:
Basic Configuration
- Server Name: A descriptive name for this server
- URL: The HTTPS endpoint of the MCP server
- Must use HTTPS for security
- Example:
https://api.example.com/mcp
Authentication Options
Choose the authentication method your MCP server requires:
1. No Authentication
- For public MCP servers
- No additional configuration needed
2. Bearer Token
- Provide a static API key or token
- Token is encrypted and stored securely
- Sent as
Authorization: Bearer YOUR_TOKEN
3. OAuth 2.1
- For servers supporting OAuth 2.1 authentication
- Two modes supported:
- Dynamic Client Registration: Vectorize automatically registers as an OAuth client (preferred)
- Static Client Credentials: For servers like GitHub that require pre-registered OAuth apps
- Vectorize handles the OAuth flow and token refresh automatically
- Admin users authenticate once per agent
4. Custom Headers
- For servers requiring custom authentication headers
- Add any headers needed (e.g.,
X-API-Key,X-Client-ID) - Values are stored securely
What Happens After Adding a Server
After clicking Add Server:
For non-OAuth servers (Bearer Token, Custom Headers, None):
- Server is created and connection is tested automatically
- If successful, tools are discovered and the server status shows "Active"
- If connection fails, server status shows "Error" with details
- You're returned to the Tools settings page
For OAuth 2.1 servers:
- Server is created
- You're redirected to authorize the connection
- After authorization, you're returned to Tools settings
- Tools are automatically discovered
Managing Tools
Once a server is connected:
- Click the server card to expand and view discovered tools
- Toggle individual tools on/off for your agent
- Click Refresh/Discover Tools (refresh icon) to update the tool list
- Use Enable All or Disable All buttons to toggle all tools at once
- Tools are immediately available to the agent when enabled
OAuth 2.1 Authentication Flow
Vectorize supports two OAuth 2.1 authentication approaches:
Dynamic Client Registration (Recommended)
For MCP servers that support OAuth 2.1 dynamic client registration:
- Add the MCP server and select OAuth 2.1 as the auth type
- Leave the Client ID and Client Secret fields empty
- Click Add Server
- Vectorize automatically registers as an OAuth client with the server
- You're redirected to authorize access
- After authorization, you're returned to the Tools settings
- Tools are discovered automatically
This approach requires no pre-configuration and works with any OAuth 2.1 server supporting dynamic client registration.
Static Client Credentials
For services like GitHub that require pre-registered OAuth apps:
- Create an OAuth app in the service's developer settings
- Set the redirect URI to:
https://agents.vectorize.io/api/mcp-servers/oauth2/callback - Note your Client ID and Client Secret
- In Vectorize, add the MCP server and select OAuth 2.1
- Enter your Client ID and Client Secret
- Click Add Server
- You're redirected to authorize the app
- After authorization, you're returned to the Tools settings
Required OAuth Scopes: Check the MCP server's documentation for required scopes. For example:
- GitHub MCP:
repo,workflow
Token Management
After successful OAuth authorization:
- Access and refresh tokens are encrypted and stored per agent
- Tokens are automatically refreshed before expiration
- If token refresh fails, the server status changes to "error"
- Click Authorize with OAuth 2.1 to re-authenticate
Using External Tools
In Chat Agents
External tools work seamlessly in chat interfaces:
- The LLM sees all available tools (Vectorize + external)
- Tools are invoked based on user queries
- Results are incorporated into responses
Tool Execution Flow
- User Query - "Create an issue for the bug in the login system"
- Tool Selection - Agent identifies the appropriate tool from enabled MCP tools
- Parameter Extraction - Agent extracts required parameters from context
- Execution - Vectorize proxies the request to the external MCP server
- Response - Tool results returned and incorporated into agent's response
Managing MCP Servers
View Server Status
In the Tools settings:
- Active - Server is connected and tools are available
- Inactive - Server is configured but disabled
- Error - Connection or authentication issues
Refresh Tools
To update the tool list from an MCP server:
- Click the Refresh/Discover Tools icon (refresh icon) on the server card
- Vectorize will re-query the server for available tools
- New or updated tools will appear in the tool list
Remove a Server
To delete a server:
- Click the delete icon on the server card
- Confirm removal
- All associated tools are removed from the agent
Technical Details
Supported Transport Protocols
Vectorize automatically detects and supports multiple MCP transport protocols:
1. JSON-RPC over HTTP
- Standard MCP protocol over HTTPS
- Most common for custom MCP servers
- Bidirectional request/response
2. Server-Sent Events (SSE)
- For servers ending in
/sse - Supports streaming responses
- Ideal for long-running operations
3. Streamable HTTP
- For servers ending in
/mcp(e.g., Linear) - Efficient for real-time data
- Supports progress updates
The transport type is automatically detected based on the server URL. No configuration needed.
Tool Discovery
When you connect an MCP server:
- Vectorize calls the
initializemethod to establish connection - Calls
tools/listto discover available tools - Stores the discovered tools and timestamps when they were discovered
- Click Refresh/Discover Tools to re-discover tools from the server
Tool Execution
When an agent uses an external tool:
- Agent determines which tool to call based on user query
- Vectorize validates the tool parameters
- Request is proxied to the external MCP server with authentication
- Response is returned to the agent for processing
- Agent incorporates results into its response
Security Considerations
HTTPS Required
- All external MCP servers must use HTTPS
- HTTP endpoints are rejected for security
- Self-signed certificates are not supported
Credential Storage
- All credentials are encrypted at rest
- OAuth tokens automatically refreshed before expiration
- MCP servers are configured per agent by admin users
- Once configured, all users of the chat agent can use the connected tools
- Credentials never exposed in logs or API responses
Request Security
- 30-second timeout on all MCP requests
- Requests include authentication headers automatically
- OAuth tokens refreshed automatically before expiration
- Session IDs maintained for stateful servers (e.g., GitHub MCP)
Example Integrations
Example: Custom MCP Server
Connect a custom MCP server with Bearer token authentication:
-
Add MCP Server
- Name: "My Custom Tools"
- URL:
https://mcp.example.com - Auth: Bearer Token
- Token: Your API key
-
What Happens
- Server is tested automatically
- Tools are discovered
- Server status shows "Active" if successful
-
Available Tools
- Tools depend on your MCP server implementation
- Each tool's description helps the agent know when to use it
-
Example Usage
User: "Create a ticket for the login issue"
Agent: "I'll create a ticket using the custom tools."
[Uses create-ticket tool]
Agent: "Created ticket #1234: Login timeout issue"
GitHub Integration
Connect GitHub for repository operations:
-
Create GitHub OAuth App
- Go to Settings → Developer settings → OAuth Apps
- New OAuth App with:
- Application name: "Vectorize Chat Agent"
- Homepage URL:
https://agents.vectorize.io - Callback URL:
https://agents.vectorize.io/api/mcp-servers/oauth2/callback
- Note the Client ID and generate a Client Secret
-
Add MCP Server in Vectorize
- Name: "GitHub"
- URL:
https://mcp.github.com/mcp(or your GitHub MCP server) - Auth: OAuth 2.1 (Static Credentials)
- Enter Client ID and Client Secret
-
Available Tools (depends on GitHub MCP server)
search-code- Search code across repositoriescreate-issue- Create GitHub issuescreate-pull-request- Create pull requestslist-repositories- List accessible repositories
-
Example Usage
User: "Search for authentication code in our repos"
Agent: "I'll search our GitHub repositories for authentication-related code."
[Uses search-code tool]
Agent: "Found 15 files containing authentication logic across 3 repositories..."
Troubleshooting
Server Status: Error
If an MCP server shows "Error" status:
Check Authentication
- Bearer Token: Verify the token is correct and hasn't expired
- OAuth 2.1: Click Authorize with OAuth 2.1 to re-authenticate
- Custom Headers: Ensure header values are valid
Test Connection
- When a server status is "Error", a Test Connection icon (WiFi icon) appears on the server card
- Click it to retry the connection
- Review the error message for specifics
- Check that the server URL is accessible from the internet
Common Error Messages
- "Connection timeout": Server took too long to respond (>30s). Check if server is running.
- "Authentication required": Credentials are invalid or missing. Update auth configuration.
- "OAuth authentication required": OAuth token expired or revoked. Re-authorize the connection.
- "Server endpoint not found (404)": URL is incorrect. Verify the MCP server endpoint.
- "Access forbidden (403)": API key lacks required permissions. Check OAuth scopes or API key permissions.
- "Network error": Server is unreachable. Verify URL and ensure server is online.
Tools Not Appearing
If tools aren't showing after connecting:
- Click Refresh/Discover Tools on the server card
- Check that the server status is "Active"
- Verify the MCP server implements
tools/listmethod correctly - Check browser console for errors
Tool Execution Failures
If tools fail during agent conversations:
- Check the server status - it may have become disconnected
- Review tool parameter requirements - agent may be passing invalid data
- Verify OAuth token hasn't expired - re-authorize if needed
- Check rate limits on the external service
OAuth Redirect Issues
If OAuth redirects aren't working:
- Verify redirect URI matches exactly:
https://agents.vectorize.io/api/mcp-servers/oauth2/callback - Check that your OAuth app is active in the service's developer settings
- Clear browser cookies and try again
Tools Not Being Used
If the agent isn't using configured tools:
- Verify tools are enabled (toggle should be on)
- Check tool descriptions - agent uses them to decide when to invoke tools
- Review system prompt - it should encourage tool usage when appropriate
- Test with explicit requests: "Use the create-issue tool to create a ticket for..."
Quick Reference
Supported Authentication Methods
| Method | Use Case | Configuration Required |
|---|---|---|
| None | Public MCP servers | Server URL only |
| Bearer Token | API key authentication | API key/token |
| OAuth 2.1 (Dynamic) | Services supporting dynamic registration | Server URL only |
| OAuth 2.1 (Static) | GitHub and other pre-registered apps | Client ID + Secret |
| Custom Headers | Services with custom auth | Header key-value pairs (JSON) |
OAuth Redirect URI
When configuring OAuth apps in external services, use this redirect URI:
https://agents.vectorize.io/api/mcp-servers/oauth2/callback
Transport Protocol Detection
| Server URL Pattern | Transport Type | Example |
|---|---|---|
Ends with /sse | Server-Sent Events | https://api.example.com/sse |
Ends with /mcp | Streamable HTTP | https://mcp.linear.app/mcp |
| Other HTTPS URL | JSON-RPC | https://mcp.example.com |
What's Next?
- Creating Agent Tools - Build custom Vectorize tools
- MCP Protocol Overview - Understand MCP concepts
- Chat Agent Setup - Configure chat interfaces