Documentation
Complete guide to Model Context Protocol (MCP) servers and how to integrate them into your AI Agents
Table of Contents
Getting Started
What is Model Context Protocol (MCP)?
Model Context Protocol (MCP) is a powerful framework that enables AI agents to seamlessly integrate with external tools, databases, and services. It provides a standardized way to extend AI capabilities beyond basic text generation.Learn more about MCP
Key Benefits
- •Enhanced Functionality: Add real-world capabilities to your AI agents
- •Standardized Integration: Consistent interface across different tools
- •Scalable Architecture: Easily add or remove capabilities as needed
- •Security: Controlled access to external resources
- •Powerful: Supercharge your AI Agents with popular tools
Installation
Prerequisites
- •AgentX Platform account
- OR
- •AI agent compatible with MCP (e.g., Claude Desktop)
🚀 Recommended: One-Click Installation
The easiest way to get started with MCP servers is through the AgentX platform. Browse our curated collection and install servers with just one click.
Step 1: Edit AI Agent
Visit AgentX platform. Choose your AI Agent and click on the "Edit" button.
Step 2: Go to Tools "-> MCP" Tab
Browse featured MCP servers and select the server you want to install. Click on the "+" to install. If the MCP is not in the list? Dont worry, Click "Add MCP" button to add your own.
Step 3: One-Click Install
Click the "+" button on any server card. And add necessary API key if required. The AgentX platform will:
- •Automatically configure the server for your AI agent
- •Handle all dependencies and environment setup
- •Provide real-time installation status
- •Test the connection and verify functionality
Step 4: Start Using
Once installed, the MCP server will be immediately available in your AI agent. No additional configuration required!
✅ Server installed successfully!
🔗 Connected to your AI agent
🚀 Ready to use
Benefits: Automatic updates, managed dependencies, integrated monitoring, and 24/7 support included with AgentX platform installation.
Note: Local installation requires manual configuration and maintenance. See here for more details. For the best experience, we recommend using the AgentX platform.
Global Installation
# Install MCP server globally
npm install -g @modelcontextprotocol/server-example
# Verify installation
npx @modelcontextprotocol/server-example --version
Local Installation
# Create a new project directory
mkdir my-mcp-setup && cd my-mcp-setup
# Initialize npm project
npm init -y
# Install MCP server locally
npm install @modelcontextprotocol/server-example
Manual Configuration Required
After installation, you'll need to manually configure your AI agent:
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["@modelcontextprotocol/server-example"],
"env": {
"API_KEY": "your-api-key-here"
}
}
}
}
Add this configuration to your Claude Desktop config file located at:
~/Library/Application Support/Claude/claude_desktop_config.json
Environment Variables
Create a .env
file for sensitive configuration:
# .env file
API_KEY=your_api_key_here
DATABASE_URL=your_database_connection
DEBUG=true
Replace @modelcontextprotocol/server-example
with the specific MCP server package you want to install.
Usage Examples
Perplexity MCP
Connect to Perplexity MCP to get real-time search results.Perplexity MCP
Google Maps MCP
Connect to Google Maps MCP to get most accurate map information.Google Maps MCP
NASA MCP
Connect to NASA MCP to get exclusive scientific data.NASA MCP
File System Access
Enable your AI agent to read and write files:
// User: "Please read the contents of README.md and summarize it"
// Agent can now access and read files in the allowed directory
Web Search
Add real-time web search capabilities:
// User: "What are the latest developments in AI?"
// Agent can search the web for current information
Database Operations
Connect to databases for data analysis:
// User: "Show me the top 10 customers by revenue"
// Agent can query your database and return results
Troubleshooting
Common Issues
Server Not Starting
Check that all dependencies are installed and environment variables are set correctly.
npm install && npm run start
Permission Denied
Ensure your MCP server has the necessary permissions to access files or APIs.
chmod +x server-script
Connection Timeout
Check your network connection and API endpoints.
ping api-endpoint.com
API Reference
Server Interface
interface MCPServer {
name: string;
version: string;
capabilities: string[];
tools: Tool[];
resources: Resource[];
}
Tool Definition
interface Tool {
name: string;
description: string;
inputSchema: JSONSchema;
execute: (params: any) => Promise<any>;
}
Resource Access
interface Resource {
uri: string;
name: string;
mimeType?: string;
description?: string;
}