MCP Integration
Model Context Protocol (MCP) is an open standard that enables agents to interact with external tools, resources, and prompts in a standardized way. Instead of custom integrations for each service, MCP provides a universal protocol that works everywhere.
What is MCP?
MCP provides a unified interface for three types of capabilities:
| Capability | Description | Examples |
|---|---|---|
| Tools | Actions agents can perform | API calls, calculations, file operations |
| Resources | Data agents can read | Files, databases, APIs |
| Prompts | Pre-defined prompt templates | Code review, analysis, summarization |
How MCP Works
Agent needs to act --> Calls MCP tool via standard protocol --> MCP server translates to native API --> Results returned in standard format
The agent does not need to know the details of each external service. It speaks MCP, and the MCP server handles the translation.
Built-in MCP Tools
MeetLoyd includes several built-in tools available to all agents:
| Tool | Description |
|---|---|
| Calculator | Mathematical operations (add, subtract, multiply, divide, power, sqrt) |
| Current Time | Get current date and time in any timezone |
| HTTP Request | Make HTTP requests (GET, POST, PUT, DELETE, PATCH) |
| Memory | Store and retrieve persistent data across conversations |
| Random | Generate random numbers, UUIDs, or pick from choices |
| JSON | Parse, stringify, query, and transform JSON data |
Assigning Tools to Agents
Tools are assigned to agents through authorization grants. When you grant a permission, the associated MCP tools become available to the agent automatically.
Via Dashboard (Recommended)
- Go to the Authorization page
- Select an agent and resource
- Pick a permission template (e.g., "Contributor")
- Click Grant -- the agent immediately gets access to the corresponding tools
Or use the Agent Wizard when creating or editing an agent -- the "Access & Permissions" step configures grants visually.
Tools are managed through authorization grants, not a direct tools array on the agent. This ensures consistent security enforcement.
Adding MCP Servers
MCP servers can be installed from three sources:
| Source | Description | Example |
|---|---|---|
| npm | Published npm packages | Anthropic filesystem server |
| GitHub | GitHub repositories | GitHub MCP server |
| URL | Direct URL to server | Custom internal servers |
Popular MCP Servers
| Server | Tools Included |
|---|---|
| Google Workspace | Gmail search/send, Drive list/read, Calendar, Docs, Sheets |
| Microsoft 365 | Outlook search/send, OneDrive, Excel, Teams |
| Filesystem | Read/write files within allowed paths |
| PostgreSQL | Query databases (read-only recommended) |
Creating Custom MCP Tools
You can create custom tools with three execution types:
| Execution Type | Description | Best For |
|---|---|---|
| HTTP | Calls an external API | REST API integrations |
| Webhook | Sends data to a webhook URL | Notifications, Slack messages |
| JavaScript | Runs a JavaScript function | Data transformation, business logic |
| Database | Executes a database query | Read/write to PostgreSQL, MySQL, etc. |
Custom tools define an input schema that validates what the agent can send, and an execution configuration that describes how to call the external service. Secrets (API keys, tokens) are referenced by name and injected securely at runtime -- never hardcoded.
Managing MCP Servers
From the dashboard, you can:
- List all installed servers for an agent
- Update server configuration
- Remove a server from an agent
Best Practices
Assign purpose-built tools (CRM lookup, email send) rather than generic ones (HTTP request). Specific tools have better input validation and security constraints.
Restrict filesystem access to specific directories. Use read-only mode for databases. The principle of least privilege applies to agents too.
Never hardcode API keys or tokens. Use the secrets system so credentials are encrypted at rest and injected securely at runtime.
Define strict input schemas with required fields, types, and bounds. This prevents agents from sending invalid or dangerous data to external services.
Next: Explore Integrations for pre-built connections to popular services.