aditi711/ab-mcp-server
If you are the rightful owner of ab-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
AB MCP Server is a comprehensive Model Context Protocol server offering advanced development utilities.
agent
AI assistant with auto-detection
swift_code_review
Swift iOS code analysis
kotlin_code_review
Kotlin Android code analysis
python_exec
Python code execution
web_scraper
Single URL scraping
url_analyzer
URL SEO analysis
batch_scraper
Multi-URL scraping
research_assistant
Swift/Kotlin documentation research
server_info
Server status and information
๐ฌ AB MCP Server
A comprehensive Model Context Protocol (MCP) server built with @vercel/mcp-adapter providing advanced development utilities including AI agent assistance, Swift/Kotlin code review, Python integration, web scraping, and research capabilities.
Live Demo: https://ab-mcp.vercel.app
๐ฏ What is AB MCP Server?
AB MCP Server is a production-ready MCP server that provides 9 powerful development tools through a standardized interface. Whether you're working in Cursor, Claude Desktop, or Windsurf, AB MCP Server seamlessly integrates advanced AI capabilities directly into your development workflow.
๐ Key Highlights
- ๐ค AI Agent: OpenAI GPT-powered assistant with intelligent auto-detection
- ๐ฑ Swift Code Review: Comprehensive iOS development analysis with Clean Architecture principles
- ๐ค Kotlin Code Review: Complete Android development review with MVVM patterns
- ๐ Python Integration: Seamless TypeScript-to-Python execution with data science libraries
- ๐ Web Scraping Suite: Advanced web scraping with Firecrawl API (3 tools)
- ๐ Research Assistant: Intelligent Swift/Kotlin documentation research
- โน๏ธ Server Monitoring: Real-time server status and tool availability
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AB MCP SERVER โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Web UI โ โ MCP Server โ โ External APIs โ โ
โ โ โ โ โ โ โ โ
โ โ โโโโโโโโโโโ โ โ โโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ
โ โ โ Agent โโโผโโโโโผโบโ Agent โโโผโโโโโผโบโ OpenAI GPT โ โ โ
โ โ โ Chat โ โ โ โ Tool โ โ โ โ Models โ โ โ
โ โ โโโโโโโโโโโ โ โ โโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโ โ โ โ โ โ
โ โ โโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโ โ โ Swift โ โ โ โ Firecrawl โ โ โ
โ โ MCP โ โ โ Review โ โ โ โ API โ โ โ
โ โ Clients โ โ โโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ
โ โ โโโโโโผโบ โ โ โ โ
โ โ โข Claude โ โ โโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ
โ โ โข Cursor โ โ โ Kotlin โ โ โ โ Python โ โ โ
โ โ โข Windsurf โ โ โ Review โ โ โ โ Runtime โ โ โ
โ โโโโโโโโโโโโโโโ โ โโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ
โ โ โ โโโโโโโโโโโโโโโโโโโ โ
โ โ โโโโโโโโโโโโ โ โ
โ โ โ Python โ โ โ
โ โ โ Exec โ โ โ
โ โ โโโโโโโโโโโโ โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโ โ โ
โ โ โ Web โ โ โ
โ โ โ Scraping โ โ โ
โ โ โโโโโโโโโโโโ โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโ โ โ
โ โ โ Research โ โ โ
โ โ โ Assistantโ โ โ
โ โ โโโโโโโโโโโโ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โจ Core Features
๐ค AI Agent Assistant
The OpenAI GPT-powered agent provides intelligent assistance with auto-detection capabilities and seamless integration across development workflows.
๐ง Key Features
- Intelligent Auto-Detection: Automatically suggests relevant tools based on user queries
- Multi-Model Support: GPT-4o, GPT-4, GPT-3.5 Turbo with model selection
- Web Interface: Real-time chat interface with conversation management
- MCP Integration: Seamless integration with Cursor, Claude Desktop, Windsurf
๐ฑ Swift iOS Code Review
Comprehensive iOS development analysis with industry best practices, Clean Architecture principles, and SOLID design patterns.
๐ Review Capabilities
- Memory Management: Force unwrapping detection, retain cycle analysis, weak/strong patterns
- Threading Safety: DispatchQueue usage, async/await patterns, main thread validation
- SwiftUI/UIKit: Modern pattern detection, deprecated API warnings
- Performance: String operations, collection efficiency, algorithmic improvements
- Security: Keychain vs UserDefaults, HTTPS enforcement, data protection
- Architecture: MVVM patterns, Repository design, Dependency Injection
- Clean Code: Function length, meaningful naming, documentation standards
- SOLID Principles: Single Responsibility, Open/Closed, Liskov Substitution
๐ค Kotlin Android Code Review
Complete Android development review with Clean Architecture, MVVM patterns, and modern Kotlin best practices.
๐ Review Capabilities
- Null Safety: Proper nullable handling, safe calls, elvis operator usage
- Coroutines: Structured concurrency, proper dispatchers, Flow patterns
- Android Lifecycle: Activity/Fragment patterns, ViewBinding vs findViewById
- Architecture: MVVM implementation, Repository pattern, Hilt/Dagger DI
- Data Classes: Proper usage vs regular classes, immutability patterns
- Performance: Memory leak detection, GlobalScope avoidance, efficiency
- Clean Code: Function composition, meaningful names, magic number elimination
- SOLID Principles: Applied to Android/Kotlin development context
๐ Python Integration
Seamless TypeScript-to-Python execution with built-in data science libraries and dynamic package management.
๐ Key Features
- Built-in Libraries: pandas, numpy, matplotlib, seaborn, datetime
- Dynamic Package Installation: Install any PyPI package on-demand
- Multiple Return Types: Text, JSON, and image (matplotlib plots)
- TypeScript Integration: Seamless data exchange between TS and Python
๐ Web Scraping & Analysis Suite
Advanced web scraping powered by Firecrawl API for clean, structured data extraction with SEO analysis capabilities.
๐ง Three Tools Available
- Web Scraper: Clean content extraction with main content filtering
- URL Analyzer: SEO analysis, content structure, and meta tag validation
- Batch Scraper: Multi-URL processing (up to 5 URLs simultaneously)
๐ Research Assistant
Intelligent research capabilities for Swift/Kotlin documentation with automatic source discovery and relevance analysis.
๐ง Key Features
- Source Discovery: Automatically finds relevant documentation from Swift.org and Kotlinlang.org
- Content Analysis: Extracts key information and best practices
- Relevance Scoring: Ranks results by relevance to your query
- Multi-language: Supports both Swift and Kotlin research
โน๏ธ Server Information & Monitoring
Real-time server status and comprehensive tool availability monitoring.
Provides real-time server status, tool availability, performance metrics, and system information.
๐ Getting Started
๐ Prerequisites
- Node.js 18 or higher
- npm or pnpm package manager
- OpenAI API Key for AI agent functionality
- Firecrawl API Key for web scraping features
โก Quick Setup
- Clone and Install:
git clone https://github.com/aditi711/ab-mcp-server.git
cd ab-mcp-server
npm install
- Environment Configuration:
Create
.env.local
file:
# Required for AI Agent functionality
OPENAI_API_KEY=sk-proj-your-openai-api-key-here
# Required for web scraping features
FIRECRAWL_API_KEY=fc-your-firecrawl-api-key-here
Get your API keys:
- OpenAI: https://platform.openai.com/api-keys
- Firecrawl: https://firecrawl.dev
- Start Development Server:
npm run dev
- Access Web Interface: Open http://localhost:3000 to see the server status page and AI agent chat interface.
๐ MCP Client Configuration
The MCP server endpoint: http://localhost:3000/api/sse
Claude Desktop
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"ab-mcp-server": {
"transport": {
"type": "sse",
"url": "http://localhost:3000/api/sse"
}
}
}
}
Cursor
Method 1: One-Click Integration (Recommended) Use the "๐ Add to Cursor" button on https://ab-mcp.vercel.app for direct integration.
Method 2: Terminal Command
# Direct installation using mcp-remote
npx mcp-remote add http://localhost:3000/api/sse --name ab-mcp-server --type sse
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json
:
{
"mcpServers": {
"ab-mcp-server": {
"transport": {
"type": "sse",
"url": "http://localhost:3000/api/sse"
}
}
}
}
๐งช Testing & Development
๐ง MCP Server Testing
Basic Connectivity:
# Test server health
curl -X GET http://localhost:3000/api/sse
# List all available tools
curl -X POST http://localhost:3000/api/sse \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
# Test server info tool
curl -X POST http://localhost:3000/api/sse \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"server_info","arguments":{}},"id":1}'
Production Server Testing:
# Test deployed server
curl -X POST https://ab-mcp.vercel.app/api/sse \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
๐ฑ Swift Code Review Testing
Test with broken Swift code:
# Test Swift code review tool
curl -X POST http://localhost:3000/api/sse \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"swift_code_review","arguments":{"code":"'"$(cat test_swift_broken.swift)"'"}},"id":1}'
Expected detections:
- Force unwrapping without safety checks
- Retain cycles in closures
- UI updates on background threads
- Poor naming conventions
- Magic numbers and hardcoded values
- SOLID principle violations
๐ค Kotlin Code Review Testing
Test with broken Kotlin code:
# Test Kotlin code review tool
curl -X POST http://localhost:3000/api/sse \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"kotlin_code_review","arguments":{"code":"'"$(cat test_kotlin_broken.kt)"'"}},"id":1}'
Expected detections:
- Null safety violations
- Poor coroutine usage with GlobalScope
- Memory leaks and context references
- Architecture pattern violations
- Threading and lifecycle issues
๐ Python Integration Testing
Data Analysis Example:
# Test Python execution with data science
curl -X POST http://localhost:3000/api/sse \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"method":"tools/call",
"params":{
"name":"python_exec",
"arguments":{
"code":"import pandas as pd; import numpy as np; data = pd.DataFrame({\"x\": np.random.randn(100), \"y\": np.random.randn(100)}); print(data.describe())",
"return_type":"text"
}
},
"id":1
}'
Visualization Example:
# Test matplotlib plotting
curl -X POST http://localhost:3000/api/sse \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"method":"tools/call",
"params":{
"name":"python_exec",
"arguments":{
"code":"import matplotlib.pyplot as plt; import numpy as np; x = np.linspace(0, 10, 100); y = np.sin(x); plt.plot(x, y); plt.title(\"Sine Wave\"); plt.savefig(\"plot.png\")",
"return_type":"image"
}
},
"id":1
}'
๐ Web Scraping Testing
Single URL Scraping:
# Test web scraper
curl -X POST http://localhost:3000/api/sse \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"method":"tools/call",
"params":{
"name":"web_scraper",
"arguments":{
"url":"https://example.com",
"onlyMainContent":true
}
},
"id":1
}'
SEO Analysis:
# Test URL analyzer
curl -X POST http://localhost:3000/api/sse \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"method":"tools/call",
"params":{
"name":"url_analyzer",
"arguments":{
"url":"https://example.com"
}
},
"id":1
}'
Batch Scraping:
# Test batch scraper
curl -X POST http://localhost:3000/api/sse \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"method":"tools/call",
"params":{
"name":"batch_scraper",
"arguments":{
"urls":["https://example.com", "https://httpbin.org/json"],
"onlyMainContent":true
}
},
"id":1
}'
๐ Research Assistant Testing
Swift Research:
# Test Swift documentation research
curl -X POST http://localhost:3000/api/sse \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"method":"tools/call",
"params":{
"name":"research_assistant",
"arguments":{
"query":"Swift async await best practices",
"language":"swift"
}
},
"id":1
}'
Kotlin Research:
# Test Kotlin documentation research
curl -X POST http://localhost:3000/api/sse \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"method":"tools/call",
"params":{
"name":"research_assistant",
"arguments":{
"query":"Kotlin coroutines lifecycle management",
"language":"kotlin"
}
},
"id":1
}'
๐ค AI Agent Testing
Interactive Web Interface:
- Navigate to
http://localhost:3000
- Use the chat interface to test natural language queries
- Try queries like:
- "Review this Swift code for issues"
- "Analyze this Python data and create a visualization"
- "Scrape this website and summarize the content"
MCP Client Testing:
- Use the agent through Cursor, Claude Desktop, or Windsurf
- Test auto-detection of user intent
- Verify tool recommendations and execution
๐ Sample Test Files
๐ฑ test_swift_broken.swift
A comprehensive Swift test file with intentional issues for code review demonstration:
// Multiple issues for testing Swift code review
class UserManager {
var users: [User]! = nil // โ Force unwrapping
static let shared = UserManager() // โ Singleton without thread safety
func loadUsers() {
DispatchQueue.global().async {
// Data loading...
self.updateUI() // โ UI update on background thread
}
}
func saveUser(_ user: User) {
try! realm.write { // โ Force try
realm.add(user)
}
}
}
Issues detected:
- Memory: Force unwrapping, retain cycles
- Threading: UI updates on background thread
- Error Handling: Force try without proper error management
- Architecture: Single responsibility principle violations
- Performance: Inefficient algorithms and string operations
๐ค test_kotlin_broken.kt
A comprehensive Kotlin test file with Android-specific issues:
// Multiple issues for testing Kotlin code review
class UserRepository {
companion object {
var instance: UserRepository? = null // โ Not thread-safe singleton
}
fun getUsers(): List<User>? {
return null!! // โ Null safety violation
}
fun saveUser(user: User) {
GlobalScope.launch { // โ Poor coroutine scope usage
Thread.sleep(1000) // โ Blocking call in coroutine
// Save logic
}
}
}
Issues detected:
- Null Safety: Dangerous null handling patterns
- Concurrency: GlobalScope usage, blocking calls in coroutines
- Memory: Context leaks, static references
- Architecture: MVVM pattern violations, poor separation of concerns
- Android: findViewById usage instead of ViewBinding
๐ Project Architecture
ab-mcp-server/ # ๐ Project root
โโโ app/ # ๐ Next.js application
โ โโโ api/ # API routes
โ โ โโโ [transport]/ # ๐ง MCP protocol handler
โ โ โ โโโ route.ts # Main MCP server implementation
โ โ โโโ agent/ # ๐ค Client-side agent API
โ โ โ โโโ route.ts # Web interface agent endpoint
โ โ โโโ tools/ # ๐ ๏ธ MCP Tools implementation
โ โ โโโ agent.ts # AI agent tool
โ โ โโโ index.ts # Tool exports and type definitions
โ โ โโโ kotlin.ts # Kotlin code review tool
โ โ โโโ python.ts # Python execution tool
โ โ โโโ server.ts # Server info tool
โ โ โโโ swift.ts # Swift code review tool
โ โ โโโ web-scraping.ts # Web scraping and research tools
โ โโโ components/ # ๐จ React components
โ โ โโโ AgentChat.tsx # Client-side chat interface
โ โโโ globals.css # ๐จ Global styles
โ โโโ layout.tsx # ๐ฑ App layout
โ โโโ page.tsx # ๐ Home page with agent interface
โโโ test_swift_broken.swift # ๐ฑ Swift test file with issues
โโโ test_kotlin_broken.kt # ๐ค Kotlin test file with issues
โโโ SECURITY.md # ๐ Security guidelines and best practices
โโโ next.config.js # โ๏ธ Next.js configuration
โโโ package.json # ๐ฆ Dependencies & scripts
โโโ tsconfig.json # ๐ TypeScript configuration
โโโ vercel.json # ๐ Deployment configuration
โโโ README.md # ๐ Documentation
๐ ๏ธ Tool Architecture
MCP Server Tools (9 total):
โโโ ๐ค agent # AI assistant with auto-detection
โโโ ๐ฑ swift_code_review # Swift iOS code analysis
โโโ ๐ค kotlin_code_review # Kotlin Android code analysis
โโโ ๐ python_exec # Python code execution
โโโ ๐ web_scraper # Single URL scraping
โโโ ๐ url_analyzer # URL SEO analysis
โโโ ๐ batch_scraper # Multi-URL scraping
โโโ ๐ research_assistant # Swift/Kotlin documentation research
โโโ โน๏ธ server_info # Server status and information
๐ฎ Future Development Roadmap
๐ฏ Planned Features (Not Yet Implemented)
๐ง Enhanced AI Capabilities
- Memory Persistence: Conversation context across sessions
- Multi-step Workflows: Complex analysis with dependencies
- Custom Agents: Domain-specific expertise modules
- Code Generation: AI-powered code scaffolding and templates
๐ Advanced Code Analysis
- Static Analysis Integration: ESLint, SwiftLint, ktlint integration
- Performance Profiling: Runtime analysis and optimization suggestions
- Security Scanning: Vulnerability detection and remediation
- Dependency Analysis: Package security and update recommendations
๐ Enhanced Web Capabilities
- Real-time Monitoring: Website change detection and alerts
- API Testing: Automated API endpoint testing and validation
- Performance Auditing: Core Web Vitals and accessibility scoring
- Content Management: Automated content extraction and organization
๐ Advanced Python Features
- Jupyter Integration: Notebook-style execution and visualization
- Machine Learning: scikit-learn, TensorFlow, PyTorch integration
- Database Connectivity: PostgreSQL, MongoDB, Redis connections
- Async Processing: Background task execution and queuing
๐ฑ Mobile Development Tools
- React Native: Cross-platform code review and analysis
- Flutter/Dart: Dart code review and optimization suggestions
- CI/CD Integration: GitHub Actions, Bitrise, Fastlane automation
- App Store Optimization: ASO analysis and recommendations
๐ง Developer Experience
- IDE Extensions: VS Code, Xcode, Android Studio plugins
- CLI Interface: Command-line tool for local development
- Custom Templates: Project scaffolding and boilerplate generation
- Documentation: Auto-generated API docs and code documentation
๐ Contributing
This project is open for contributions! Priority areas:
- Enhanced AI Agents: Memory persistence, multi-step workflows
- Mobile Development: React Native, Flutter integration
- Performance: Caching, optimization, concurrent processing
- Security: Enhanced code scanning, vulnerability detection
- Documentation: Comprehensive guides, video tutorials
How to contribute:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request with detailed description
Built with โค๏ธ using TypeScript, Next.js, OpenAI, Python, and the Model Context Protocol.
๐ Ready for production deployment and continuous enhancement!