Production Status : 11+ MCP servers available in production with dynamic
discovery, real-time testing, and secure configuration management.
Model Context Protocol (MCP) tools provide AI agents with powerful capabilities across development, blockchain, web automation, and utility functions. Zzyra’s MCP integration enables dynamic tool discovery, secure configuration, and real-time execution monitoring.
Available MCP Servers
Git Repository Server ID : git
Category : DevelopmentCapabilities :
Repository management and operations
Commit history analysis
Branch operations and merging
Diff generation and analysis
Configuration :{
"repository" : "/path/to/git/repo"
}
PostgreSQL Database Server ID : postgres
Category : DatabaseCapabilities :
SQL query execution
Schema introspection
Data manipulation and analysis
Performance optimization
Configuration :{
"databaseUrl" : "postgresql://user:pass@host:5432/db"
}
HTTP Requests Server ID : fetch
Category : APICapabilities :
REST API interactions
HTTP method support (GET, POST, PUT, DELETE)
Custom headers and authentication
Response processing and validation
Configuration :{
"userAgent" : "Zzyra-AI-Agent/1.0" ,
"timeout" : 30000
}
Sequential Thinking Server ID : sequential-thinking
Category : ReasoningCapabilities :
Advanced multi-step reasoning
Problem decomposition
Logical chain construction
Complex decision trees
Configuration :{
"maxSteps" : 10 ,
"temperature" : 0.3
}
GOAT Blockchain SDK Server ID : goat
Category : BlockchainCapabilities :
Multi-chain wallet management
DeFi protocol interactions
Token transfers and swaps
NFT operations
Smart contract interactions
Supported Networks :
Sei Network (Testnet/Mainnet)
Base Sepolia
Ethereum networks
Configuration :{
"EVM_WALLET_PRIVATE_KEY" : "0x..." ,
"RPC_PROVIDER_URL" : "https://yolo-sparkling-sea.sei-atlantic.quiknode.pro/aa0487f22e4ebd479a97f9736eb3c0fb8a2b8e32" ,
"USE_BASE_SEPOLIA" : "false"
}
Sei Network Server ID : sei
Category : BlockchainCapabilities :
Native Sei blockchain operations
CosmWasm smart contracts
Sei-specific token management
Network configuration management
Configuration :{
"WALLET_MODE" : "private-key" ,
"PRIVATE_KEY" : "0x..." ,
"SEI_NETWORK" : "mainnet" ,
"CUSTOM_RPC_URL" : "https://rpc.sei.io"
}
BlockScout Explorer Server ID : blockScout
Category : DatabaseCapabilities :
Blockchain data queries
Transaction analysis
Smart contract verification
Network statistics
Configuration :{
"endpoint" : "https://mcp.blockscout.com/mcp/"
}
Puppeteer Browser Server ID : puppeteer
Category : AutomationCapabilities :
Web scraping and data extraction
Form automation and submission
Screenshot and PDF generation
Performance monitoring
Configuration :{
"headless" : true ,
"viewport" : {
"width" : 1280 ,
"height" : 720
}
}
Brave Search Server ID : brave-search
Category : WebCapabilities :
Real-time web search
News and information gathering
Content research and analysis
Search result processing
Configuration :{
"apiKey" : "your-brave-api-key"
}
Time Services Server ID : time Category : Time Capabilities : - Current time
and date - Timezone conversions - Temporal calculations - Schedule planning
Configuration : None required
Weather Services Server ID : weather Category : Weather Capabilities : - Current
weather conditions - Weather forecasts - Location-based data - Climate
analysis Configuration : None required
MCP Server Management
Dynamic Server Discovery
Zzyra automatically discovers and configures available MCP servers:
// MCP server discovery and management
interface MCPServerManager {
// Discover available servers
discoverServers () : Promise < MCPServerConfig []>;
// Test server connectivity
testConnection ( serverId : string ) : Promise < ConnectionTest >;
// Configure server with validation
configureServer ( serverId : string , config : any ) : Promise < void >;
// Get server status
getServerStatus ( serverId : string ) : Promise < ServerStatus >;
}
// Server configuration with schema validation
interface MCPServerConfig {
id : string ;
name : string ;
displayName : string ;
description : string ;
category : string ;
connection : {
type : "stdio" | "http" | "websocket" ;
command ?: string ;
args ?: string [];
env ?: Record < string , string >;
};
configSchema : {
type : "object" ;
properties : Record < string , any >;
required ?: string [];
};
examples : ConfigExample [];
}
Configuration Management
Schema Validation
Secure Credentials
Connection Testing
// Configuration validation using Zod schemas
const serverConfig = z . object ({
EVM_WALLET_PRIVATE_KEY: z . string (). min ( 1 ),
RPC_PROVIDER_URL: z . string (). url (),
USE_BASE_SEPOLIA: z . enum ([ "true" , "false" ]). optional ()
});
// Validate configuration before applying
const validation = serverConfig . safeParse ( userConfig );
if ( ! validation . success ) {
throw new ConfigurationError ( validation . error . message );
}
// Secure credential management
interface SecureCredentialManager {
// Store sensitive configuration securely
storeCredentials ( serverId : string , credentials : any ) : Promise < void >;
// Retrieve credentials for server execution
getCredentials ( serverId : string ) : Promise < any >;
// Rotate credentials periodically
rotateCredentials ( serverId : string ) : Promise < void >;
// Audit credential access
auditAccess ( serverId : string , operation : string ) : void ;
}
// Environment variable handling for sensitive data
const sensitiveFields = [ "apiKey" , "privateKey" , "password" , "secret" ];
const secureConfig = filterSensitiveFields ( config , sensitiveFields );
// Real-time connection testing
interface ConnectionTester {
testMCPServer (
serverId : string ,
config : Record < string , any >
) : Promise < ConnectionTestResult >;
}
interface ConnectionTestResult {
success : boolean ;
tools : MCPTool [];
error ?: string ;
responseTime ?: number ;
serverVersion ?: string ;
}
// Test server before adding to agent
const testResult = await testMCPServer ( "goat" , {
EVM_WALLET_PRIVATE_KEY: "0x..." ,
RPC_PROVIDER_URL: "https://sepolia.base.org"
});
if ( testResult . success ) {
addServerToAgent ( serverId , config );
} else {
showConfigurationError ( testResult . error );
}
MCP tools are seamlessly integrated into AI agent workflows:
// AI agent with configured MCP tools
interface AIAgentWithTools {
config : AIAgentConfig ;
selectedTools : {
id : string ;
name : string ;
type : "mcp" | "goat" | "builtin" ;
config : Record < string , any >;
enabled : boolean ;
}[];
// Tool execution interface
executeTool ( toolName : string , parameters : any ) : Promise < ToolResult >;
// Tool availability checking
isToolAvailable ( toolName : string ) : boolean ;
// Tool configuration validation
validateToolConfig ( toolId : string , config : any ) : ValidationResult ;
}
// Example tool execution in agent workflow
const agentPrompt = `
You have access to the following tools:
- goat: Blockchain operations (Sei Network, Base, Ethereum)
- fetch: HTTP requests to APIs
- sequential-thinking: Advanced reasoning capabilities
- brave-search: Web search and research
Task: Analyze the current DeFi market conditions and execute a portfolio rebalancing strategy.
1. Use brave-search to gather recent market news
2. Use fetch to get current token prices from APIs
3. Use sequential-thinking to analyze the data
4. Use goat to execute necessary transactions
` ;
Sequential Processing
Parallel Execution
Conditional Execution
// Tools process data sequentially
const workflow = [
{
tool: "brave-search" ,
params: { query: "DeFi market conditions latest news" },
output: "marketNews"
},
{
tool: "fetch" ,
params: { url: "https://api.coingecko.com/api/v3/simple/price" },
output: "priceData"
},
{
tool: "sequential-thinking" ,
params: {
context: "{{marketNews}} {{priceData}}" ,
task: "Analyze market conditions for portfolio decisions"
},
output: "analysis"
},
{
tool: "goat" ,
params: {
operation: "portfolio_rebalance" ,
strategy: "{{analysis.recommendation}}"
},
output: "transactions"
}
];
// Execute independent tools in parallel
const parallelTasks = await Promise . all ([
executeTool ( "fetch" , {
url: "https://api.defipulse.com/v1/egs"
}),
executeTool ( "brave-search" , {
query: "Ethereum gas prices today"
}),
executeTool ( "time" , {
timezone: "UTC"
})
]);
// Combine results for decision making
const context = {
defiData: parallelTasks [ 0 ],
gasInfo: parallelTasks [ 1 ],
currentTime: parallelTasks [ 2 ]
};
// Make informed decision with all data
const decision = await executeTool ( "sequential-thinking" , {
context: JSON . stringify ( context ),
task: "Determine optimal transaction timing"
});
// Execute tools based on conditions
interface ConditionalExecution {
condition : string ;
trueBranch : ToolExecution [];
falseBranch : ToolExecution [];
}
const conditionalWorkflow : ConditionalExecution = {
condition: "{{priceData.ethereum.usd}} > 2000" ,
trueBranch: [
{
tool: "goat" ,
params: { operation: "sell_eth" , amount: "0.5" }
}
],
falseBranch: [
{
tool: "goat" ,
params: { operation: "buy_eth" , amount: "1000" }
}
]
};
Advanced Configuration
Custom MCP Server Development
Create custom MCP servers for specialized functionality:
// Custom MCP server interface
interface CustomMCPServer {
id : string ;
version : string ;
capabilities : {
tools : boolean ;
resources : boolean ;
prompts : boolean ;
};
tools : MCPTool [];
resources ?: MCPResource [];
prompts ?: MCPPrompt [];
}
// Example custom analytics server
class AnalyticsMCPServer implements CustomMCPServer {
id = "custom-analytics" ;
version = "1.0.0" ;
capabilities = { tools: true , resources: false , prompts: false };
tools = [
{
name: "analyze_portfolio" ,
description: "Analyze portfolio performance and risks" ,
inputSchema: {
type: "object" ,
properties: {
portfolioData: { type: "object" },
timeframe: { type: "string" , enum: [ "1d" , "1w" , "1m" , "1y" ] },
},
required: [ "portfolioData" ],
},
},
{
name: "generate_report" ,
description: "Generate comprehensive portfolio report" ,
inputSchema: {
type: "object" ,
properties: {
analysisData: { type: "object" },
format: { type: "string" , enum: [ "json" , "html" , "pdf" ] },
},
},
},
];
async executeTool ( name : string , params : any ) : Promise < any > {
switch ( name ) {
case "analyze_portfolio" :
return this . analyzePortfolio ( params );
case "generate_report" :
return this . generateReport ( params );
default :
throw new Error ( `Unknown tool: ${ name } ` );
}
}
private async analyzePortfolio ( params : any ) : Promise < any > {
// Custom portfolio analysis logic
const { portfolioData , timeframe } = params ;
// Perform analysis
const analysis = {
totalValue: this . calculateTotalValue ( portfolioData ),
performance: this . calculatePerformance ( portfolioData , timeframe ),
risks: this . assessRisks ( portfolioData ),
recommendations: this . generateRecommendations ( portfolioData ),
};
return analysis ;
}
}
Server Registry Management
// MCP server registry for dynamic management
class MCPServerRegistry {
private servers = new Map < string , MCPServerConfig >();
private activeConnections = new Map < string , MCPConnection >();
// Register new server
async registerServer ( config : MCPServerConfig ) : Promise < void > {
// Validate server configuration
const validation = await this . validateServerConfig ( config );
if ( ! validation . success ) {
throw new Error ( `Invalid server config: ${ validation . error } ` );
}
// Test server connection
const connectionTest = await this . testServerConnection ( config );
if ( ! connectionTest . success ) {
throw new Error ( `Server connection failed: ${ connectionTest . error } ` );
}
// Register server
this . servers . set ( config . id , config );
// Start server if needed
if ( config . connection . type === "stdio" ) {
await this . startStdioServer ( config );
}
}
// Get available tools from all servers
async getAvailableTools () : Promise < MCPTool []> {
const allTools : MCPTool [] = [];
for ( const [ serverId , config ] of this . servers ) {
try {
const connection = await this . getConnection ( serverId );
const tools = await connection . listTools ();
allTools . push ( ... tools . map (( tool ) => ({ ... tool , serverId })));
} catch ( error ) {
console . warn ( `Failed to get tools from server ${ serverId } :` , error );
}
}
return allTools ;
}
// Execute tool on appropriate server
async executeTool ( toolName : string , params : any ) : Promise < any > {
const tool = await this . findTool ( toolName );
if ( ! tool ) {
throw new Error ( `Tool not found: ${ toolName } ` );
}
const connection = await this . getConnection ( tool . serverId );
return await connection . callTool ( toolName , params );
}
}
Connection Pooling
Connection Management
Caching Strategy
Load Balancing
// MCP connection pool for performance
class MCPConnectionPool {
private pools = new Map < string , ConnectionPool >();
async getConnection ( serverId : string ) : Promise < MCPConnection > {
let pool = this . pools . get ( serverId );
if ( ! pool ) {
pool = new ConnectionPool ({
serverId ,
minConnections: 1 ,
maxConnections: 5 ,
acquireTimeoutMillis: 10000 ,
idleTimeoutMillis: 30000
});
this . pools . set ( serverId , pool );
}
return await pool . acquire ();
}
async releaseConnection (
serverId : string ,
connection : MCPConnection
) : Promise < void > {
const pool = this . pools . get ( serverId );
if ( pool ) {
await pool . release ( connection );
}
}
}
// Tool result caching for performance
interface ToolCache {
get ( key : string ) : Promise < any >;
set ( key : string , value : any , ttl ?: number ) : Promise < void >;
invalidate ( pattern : string ) : Promise < void >;
}
class MCPToolExecutor {
constructor ( private cache : ToolCache ) {}
async executeTool (
toolName : string ,
params : any ,
options : { cache ?: boolean } = {}
) : Promise < any > {
const cacheKey = this . generateCacheKey ( toolName , params );
// Check cache first
if ( options . cache !== false ) {
const cached = await this . cache . get ( cacheKey );
if ( cached ) {
return cached ;
}
}
// Execute tool
const result = await this . executeToolDirect ( toolName , params );
// Cache result if cacheable
if ( this . isCacheable ( toolName , params )) {
const ttl = this . getCacheTTL ( toolName );
await this . cache . set ( cacheKey , result , ttl );
}
return result ;
}
}
// Load balancing across multiple server instances
class LoadBalancedMCPManager {
private serverPools = new Map < string , MCPServerInstance []>();
private loadBalancer : LoadBalancer ;
constructor () {
this . loadBalancer = new RoundRobinLoadBalancer ();
}
async executeTool ( toolName : string , params : any ) : Promise < any > {
const tool = await this . findTool ( toolName );
const serverInstances = this . serverPools . get ( tool . serverId ) || [];
if ( serverInstances . length === 0 ) {
throw new Error ( `No available instances for server: ${ tool . serverId } ` );
}
// Select server instance using load balancer
const instance = this . loadBalancer . select ( serverInstances );
try {
return await instance . callTool ( toolName , params );
} catch ( error ) {
// Try another instance on failure
const fallbackInstance = this . loadBalancer . selectFallback (
serverInstances ,
instance
);
if ( fallbackInstance ) {
return await fallbackInstance . callTool ( toolName , params );
}
throw error ;
}
}
}
Security Considerations
Credential Management
Secure Storage Encrypted credential storage - API keys encrypted at rest - Private keys
in secure vaults - Access logging and auditing - Credential rotation
policies
Access Controls Fine-grained access permissions - Tool-level access controls - User-based
permissions - Rate limiting and quotas - Audit trails for compliance
Network Security Secure communication protocols - TLS encryption for all connections -
Certificate validation - Network isolation for sensitive tools - VPN support
for private networks
Input Validation Robust input sanitization - Schema validation for all inputs - SQL
injection prevention - Command injection protection - Output sanitization
Best Security Practices
// Security middleware for MCP tools
class MCPSecurityManager {
// Validate and sanitize tool inputs
async validateInput ( toolName : string , params : any ) : Promise < any > {
const tool = await this . getTool ( toolName );
const schema = tool . inputSchema ;
// Schema validation
const validation = validateSchema ( params , schema );
if ( ! validation . valid ) {
throw new SecurityError ( `Invalid input: ${ validation . errors } ` );
}
// Sanitize potentially dangerous inputs
const sanitized = this . sanitizeParams ( params );
// Check against security policies
await this . checkSecurityPolicies ( toolName , sanitized );
return sanitized ;
}
// Rate limiting for tool execution
async checkRateLimit ( userId : string , toolName : string ) : Promise < void > {
const key = `rate_limit: ${ userId } : ${ toolName } ` ;
const current = await this . redis . get ( key );
if ( current && parseInt ( current ) >= this . getRateLimit ( toolName )) {
throw new RateLimitError ( "Rate limit exceeded" );
}
await this . redis . incr ( key );
await this . redis . expire ( key , 3600 ); // 1 hour window
}
// Audit logging
async logToolExecution (
userId : string ,
toolName : string ,
params : any ,
result : any ,
success : boolean
) : Promise < void > {
const auditLog = {
timestamp: new Date (). toISOString (),
userId ,
toolName ,
params: this . sanitizeForLogging ( params ),
resultSize: JSON . stringify ( result ). length ,
success ,
ip: this . getClientIP (),
userAgent: this . getUserAgent (),
};
await this . auditLogger . log ( auditLog );
}
}
Monitoring and Debugging
Troubleshooting Guide
Common Issues
Server Connection Failures
Symptoms : MCP servers showing as disconnected or unreachable
Troubleshooting Steps : 1. Verify network connectivity and firewall
settings 2. Check server configuration and environment variables 3. Validate
API keys and authentication credentials 4. Review server logs for error
messages 5. Test connection manually using curl or similar tools 6. Check
server dependencies and required services Common Solutions : - Update
expired API keys - Fix network routing or proxy settings - Restart dependent
services (databases, etc.) - Update server configuration with correct
endpoints
Symptoms : Tools timing out during execution Troubleshooting Steps : 1.
Check tool-specific timeout settings 2. Verify server resource availability 3.
Monitor network latency and bandwidth 4. Review tool parameters for complexity
5. Check for blocking operations in tool code Common Solutions : - Increase
timeout values for complex operations - Optimize tool parameters and reduce
data size - Implement connection pooling and caching - Scale server resources
or add load balancing
Configuration Validation Errors
Symptoms : Server configuration failing validation Troubleshooting
Steps : 1. Review configuration schema requirements 2. Validate JSON syntax
and structure 3. Check for missing required fields 4. Verify data types and
formats 5. Test with minimal configuration first Common Solutions : - Use
configuration examples as templates - Validate JSON format using online
validators - Check environment variable expansion - Review server
documentation for requirements
Symptoms : Slow tool execution or high resource usage Troubleshooting
Steps : 1. Monitor server resource utilization 2. Check for connection
pooling and caching 3. Review tool execution patterns and frequency 4.
Analyze network latency and throughput 5. Profile tool execution for
bottlenecks Common Solutions : - Implement result caching for frequently
accessed data - Use connection pooling to reduce overhead - Optimize tool
parameters and batch operations - Scale horizontally with load balancing
Next Steps