Mcp Integrations
Learn about mcp integrations and how to implement it effectively.
5 min read
🆕Recently updated
Last updated: 12/9/2025
MCP (Model Context Protocol) Integrations
Model Context Protocol (MCP) integrations provide standardized interfaces for AI agents to interact with external systems, databases, and services through a unified protocol.
Overview
MCP integrations in Forjinn enable:
- Standardized tool interfaces across different systems
- Secure, isolated execution environments
- Dynamic tool discovery and loading
- Consistent error handling and caching
Chrome MCP
Overview
Chrome MCP provides comprehensive browser automation capabilities, enabling AI agents to control Chrome browsers remotely with full debugging support.
Architecture
- MCP Server: Uses
@playwright/mcpfor browser automation - Connection: WebSocket debugging protocol to Chrome
- Security: Supports ngrok tunneling for remote access
- Tools: 40+ browser automation tools available
Setup Instructions
Windows Setup
:: 1. Create persistent profile directory
mkdir %USERPROFILE%\chrome-profile
:: 2. Launch Chrome in headful mode
start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="%USERPROFILE%\chrome-profile" --no-first-run --disable-default-apps
:: 3. Wait for Chrome to start
timeout /t 5
:: 4. Start ngrok tunnel
ngrok http 9222
Linux/macOS Setup
# 1. Create persistent profile directory
mkdir -p ~/chrome-profile
# 2. Launch Chrome in headful mode
google-chrome --remote-debugging-port=9222 --user-data-dir=~/chrome-profile --no-first-run --disable-default-apps &
# 3. Wait for Chrome to start
sleep 3
# 4. Start ngrok tunnel
ngrok http 9222
Available Tools
Navigation Tools
browser_navigate- Navigate to a URLbrowser_navigate_back- Go back to previous pagebrowser_reload- Reload current pagebrowser_goto- Advanced navigation with options
Interaction Tools
browser_click- Click on elementsbrowser_fill- Fill form fieldsbrowser_type- Type text into elementsbrowser_press_key- Press keyboard keysbrowser_hover- Hover over elementsbrowser_drag- Drag and drop operations
Content Extraction
browser_get_content- Get page HTML contentbrowser_get_text- Extract text from elementsbrowser_get_attribute- Get element attributesbrowser_get_property- Get element properties
Visual Tools
browser_take_screenshot- Capture screenshotsbrowser_full_page_screenshot- Full page screenshotsbrowser_element_screenshot- Screenshot specific elements
Form Handling
browser_select_option- Select dropdown optionsbrowser_check- Check checkboxesbrowser_uncheck- Uncheck checkboxesbrowser_file_upload- Upload files
Advanced Features
browser_evaluate- Execute JavaScriptbrowser_add_script- Add script tagsbrowser_add_style- Add CSS stylesbrowser_set_viewport- Set viewport sizebrowser_emulate_media- Emulate media types
Network & Cookies
browser_set_extra_headers- Set HTTP headersbrowser_set_cookie- Set cookiesbrowser_get_cookies- Get cookiesbrowser_clear_cookies- Clear cookies
Waiting & Synchronization
browser_wait_for_element- Wait for elementsbrowser_wait_for_navigation- Wait for page loadsbrowser_wait_for_timeout- Wait for specific timebrowser_wait_for_function- Wait for JavaScript conditions
Security Considerations
- Use authenticated ngrok tunnels:
ngrok http 9222 --basic-auth="username:password" - Never use personal Chrome profile for debugging
- Consider Cloudflare Tunnel for production environments
- Implement proper firewall rules for remote access
Database MCP Integrations
MySQL MCP
Features:
- Full CRUD operations
- Schema introspection
- Query execution
- Connection pooling
- SSL support
Available Tools:
mysql_query- Execute SQL queriesmysql_describe_table- Get table schemamysql_list_tables- List all tablesmysql_insert- Insert recordsmysql_update- Update recordsmysql_delete- Delete records
Configuration:
{
host: "localhost",
port: "3306",
user: "username",
password: "password",
database: "database_name"
}
PostgreSQL MCP
Features:
- Advanced SQL support (CTEs, window functions)
- JSON/JSONB operations
- Full-text search capabilities
- Read-only mode for safety
- Connection URL support
Available Tools:
postgres_query- Execute SELECT queriespostgres_describe_table- Get table informationpostgres_list_tables- List tables and viewspostgres_get_schema- Get database schemapostgres_explain- Explain query execution plans
Configuration:
{
postgresUrl: "postgresql://user:password@host:port/database"
}
MSSQL MCP
Features:
- Full T-SQL support
- Windows Authentication support
- Stored procedure execution
- Bulk operations
- TLS/SSL encryption
Available Tools:
mssql_query- Execute T-SQL queriesmssql_execute_procedure- Execute stored proceduresmssql_get_tables- List tables and viewsmssql_get_columns- Get column informationmssql_bulk_insert- Bulk data operations
Configuration:
{
serverName: "server.domain.com",
databaseName: "database_name",
username: "username",
password: "password"
}
MongoDB MCP
Features:
- Document CRUD operations
- Aggregation pipeline support
- Index management
- Collection operations
- Read-only mode
Available Tools:
mongodb_find- Find documentsmongodb_aggregate- Run aggregation pipelinesmongodb_count- Count documentsmongodb_distinct- Get distinct valuesmongodb_list_collections- List collectionsmongodb_get_indexes- Get collection indexes
Configuration:
{
connectionString: "mongodb://user:password@host:port/database"
}
Common MCP Features
Caching System
MCP integrations implement intelligent caching to improve performance:
- Tool definitions cached for 5-30 minutes
- Connection pooling for database MCPs
- Automatic cache invalidation on errors
Error Handling
Robust error handling across all MCP integrations:
- Graceful degradation on connection failures
- Detailed error messages for debugging
- Automatic retry mechanisms
- Fallback to empty tool arrays when needed
Security
- Credential encryption and secure storage
- Connection string validation
- SQL injection prevention
- Resource limits and timeouts
Best Practices
- Connection Management: Use connection pooling for database MCPs
- Security: Always use encrypted connections in production
- Error Handling: Implement proper error handling in workflows
- Monitoring: Monitor MCP tool performance and availability
- Caching: Leverage built-in caching for better performance
- Testing: Test MCP integrations thoroughly before deployment
Troubleshooting
Common Issues
- Connection failures: Check network connectivity and credentials
- Tool loading errors: Verify MCP server availability
- Permission errors: Ensure proper database/service permissions
- Timeout issues: Adjust timeout settings for slow operations
Debug Steps
- Check MCP server logs
- Verify credential configuration
- Test connections manually
- Review network and firewall settings
- Monitor resource usage and limits