Discover Awesome MCP Servers

Extend your agent with 84,517 capabilities via MCP servers.

All84,517
Reddit Buddy MCP

Reddit Buddy MCP

Enables AI assistants to browse Reddit, search posts, analyze user activity, and fetch comments without requiring API keys. Features smart caching, clean data responses, and optional authentication for higher rate limits.

Emcee

Emcee

Okay, I understand. You want me to create an **MCP (Mock Control Plane) server** that can simulate the behavior of any API endpoint described by an OpenAPI (formerly Swagger) document. This is a complex task, but I can outline the key steps and provide code snippets to get you started. Keep in mind that a fully functional, robust solution would require a significant amount of code and potentially external libraries. Here's a breakdown of the process and some example code (using Python and Flask, a popular choice for lightweight web servers): **1. Core Idea:** The MCP server will: * **Parse the OpenAPI document:** Read the OpenAPI specification (YAML or JSON) and understand the API's structure, endpoints, request parameters, and response schemas. * **Create routes:** Dynamically generate Flask routes (or equivalent in your chosen framework) based on the paths defined in the OpenAPI document. * **Handle requests:** When a request comes in, the server will: * **Validate the request:** Check if the request parameters (query parameters, headers, request body) match the OpenAPI specification. * **Generate a response:** Based on the OpenAPI document, generate a mock response. This could be: * **Static responses:** If the OpenAPI document provides example responses, use those. * **Dynamic responses:** Generate responses based on the schema defined in the OpenAPI document (e.g., create random data that conforms to the schema). * **Provide control:** Allow you to configure the server's behavior, such as: * **Response codes:** Specify which HTTP status code to return for a given endpoint. * **Response data:** Override the default mock response with custom data. * **Latency:** Simulate network latency by adding a delay before sending the response. **2. Example Code (Python and Flask):** ```python from flask import Flask, request, jsonify import yaml import json import jsonschema import random import time app = Flask(__name__) def load_openapi_spec(spec_file): """Loads an OpenAPI specification from a YAML or JSON file.""" try: with open(spec_file, 'r') as f: if spec_file.endswith('.yaml') or spec_file.endswith('.yml'): return yaml.safe_load(f) elif spec_file.endswith('.json'): return json.load(f) else: raise ValueError("Unsupported file type. Use YAML or JSON.") except FileNotFoundError: print(f"Error: OpenAPI specification file not found: {spec_file}") return None except Exception as e: print(f"Error loading OpenAPI specification: {e}") return None def validate_request(request, operation): """Validates the request against the OpenAPI operation definition.""" try: # Validate query parameters for param in operation.get('parameters', []): if param['in'] == 'query': param_name = param['name'] if param_name in request.args: # You could add more sophisticated validation here based on the schema pass # Example: check type, required, etc. elif param['required']: return f"Missing required query parameter: {param_name}", 400 # Validate request body (if present) if 'requestBody' in operation: request_body_schema = operation['requestBody']['content']['application/json']['schema'] # Assuming JSON try: jsonschema.validate(request.json, request_body_schema) except jsonschema.exceptions.ValidationError as e: return f"Invalid request body: {e}", 400 return None, 200 # Request is valid except Exception as e: print(f"Validation error: {e}") return "Internal server error during validation", 500 def generate_mock_response(operation): """Generates a mock response based on the OpenAPI operation definition.""" try: # Try to use example responses if available if 'responses' in operation: for status_code, response_def in operation['responses'].items(): if 'content' in response_def and 'application/json' in response_def['content']: if 'example' in response_def['content']['application/json']: return response_def['content']['application/json']['example'], int(status_code) elif 'schema' in response_def['content']['application/json']: # Generate a response based on the schema (more complex) # This is a placeholder - you'd need a library to generate data from a JSON schema print("Warning: Generating response from schema is not fully implemented.") return {"message": "Generated from schema (not fully implemented)"}, 200 return {"message": "No example or schema found in OpenAPI spec"}, 500 except Exception as e: print(f"Error generating mock response: {e}") return {"message": "Error generating mock response"}, 500 def create_routes_from_openapi(app, spec): """Creates Flask routes based on the OpenAPI specification.""" for path, path_def in spec['paths'].items(): for method, operation in path_def.items(): endpoint_name = operation.get('operationId', f"{method}_{path.replace('/', '_')}") def view_func(path=path, method=method, operation=operation): # Simulate latency (optional) latency = float(request.args.get('latency', 0)) # Get latency from query parameter time.sleep(latency) # Validate the request validation_error, status_code = validate_request(request, operation) if validation_error: return jsonify({"error": validation_error}), status_code # Generate the mock response response_data, status_code = generate_mock_response(operation) return jsonify(response_data), status_code view_func.__name__ = endpoint_name # Important for Flask routing app.add_url_rule(path, view_func=view_func, methods=[method.upper()]) return app if __name__ == '__main__': openapi_spec_file = 'openapi.yaml' # Replace with your OpenAPI file spec = load_openapi_spec(openapi_spec_file) if spec: app = create_routes_from_openapi(app, spec) app.run(debug=True) else: print("Failed to load OpenAPI specification. Exiting.") ``` **3. Explanation and Key Improvements:** * **`load_openapi_spec(spec_file)`:** Loads the OpenAPI specification from a YAML or JSON file. Handles file not found and parsing errors. * **`validate_request(request, operation)`:** Validates the incoming request against the OpenAPI definition. This example validates query parameters and the request body (if present). It uses the `jsonschema` library for body validation. You'll need to install it: `pip install jsonschema`. * **`generate_mock_response(operation)`:** Generates a mock response. It first tries to use the `example` provided in the OpenAPI document. If no example is found, it attempts to generate a response based on the `schema`. **Important:** The schema-based response generation is a placeholder. You'll need a library like `Faker` or `mimesis` to generate realistic data based on the schema. * **`create_routes_from_openapi(app, spec)`:** This is the core function. It iterates through the `paths` in the OpenAPI document and dynamically creates Flask routes for each endpoint. It uses `app.add_url_rule` to register the routes. The `view_func` is the function that will be called when a request is made to that endpoint. * **Latency Simulation:** The `view_func` includes an optional latency simulation using `time.sleep()`. You can pass a `latency` query parameter to the endpoint to simulate network delay (e.g., `http://localhost:5000/users?latency=0.5` will add a 0.5-second delay). * **Error Handling:** The code includes basic error handling for file loading, request validation, and response generation. * **`operationId`:** Uses the `operationId` from the OpenAPI spec as the endpoint name. If `operationId` is missing, it generates a name based on the method and path. **4. How to Use:** 1. **Install Dependencies:** ```bash pip install flask pyyaml jsonschema ``` 2. **Create an OpenAPI Specification:** Create a file named `openapi.yaml` (or `openapi.json`) with your OpenAPI specification. Here's a simple example: ```yaml openapi: 3.0.0 info: title: My API version: 1.0.0 paths: /users: get: summary: Get a list of users responses: '200': description: Successful operation content: application/json: example: - id: 1 name: John Doe - id: 2 name: Jane Smith post: summary: Create a new user requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: The user's name example: "New User" required: - name responses: '201': description: User created successfully content: application/json: example: id: 3 name: New User ``` 3. **Run the Script:** Save the Python code as `mcp_server.py` and run it: ```bash python mcp_server.py ``` 4. **Test the API:** Use `curl`, `Postman`, or any other HTTP client to test the API endpoints. For example: ```bash curl http://localhost:5000/users curl -X POST -H "Content-Type: application/json" -d '{"name": "Alice"}' http://localhost:5000/users ``` **5. Further Improvements and Considerations:** * **Schema-Based Response Generation:** Implement a more robust schema-based response generation using libraries like `Faker` or `mimesis`. This is crucial for generating realistic mock data. You'll need to map OpenAPI schema types to the corresponding Faker/Mimesis data generators. * **More Comprehensive Validation:** Add more comprehensive request validation, including: * Data type validation (e.g., check if a parameter is an integer, string, etc.). * Regular expression validation. * Enum validation. * Header validation. * **Configuration:** Allow users to configure the server's behavior through a configuration file or command-line arguments. This could include: * Port number. * OpenAPI specification file path. * Default response codes. * Latency range. * **Logging:** Add logging to track requests, responses, and errors. * **Authentication/Authorization:** Implement basic authentication/authorization if your API requires it. You could use a simple token-based authentication scheme. * **Content Type Handling:** Support different content types (e.g., XML, plain text). * **Error Handling:** Improve error handling and provide more informative error messages. * **Testing:** Write unit tests to ensure the server is working correctly. * **UI:** Consider adding a simple web UI to view the OpenAPI specification and configure the server. * **Framework Choice:** While Flask is great for simple projects, consider using a more robust framework like FastAPI or Django REST Framework for larger, more complex APIs. FastAPI has excellent OpenAPI support built-in. **Example of Schema-Based Response Generation (using Faker):** ```python from faker import Faker fake = Faker() def generate_response_from_schema(schema): """Generates a response based on a JSON schema using Faker.""" if schema['type'] == 'object': response = {} for property_name, property_def in schema.get('properties', {}).items(): response[property_name] = generate_response_from_schema(property_def) return response elif schema['type'] == 'string': if 'format' in schema and schema['format'] == 'email': return fake.email() elif 'format' in schema and schema['format'] == 'uuid': return fake.uuid4() else: return fake.name() # Or fake.text(), fake.address(), etc. elif schema['type'] == 'integer': return fake.random_int() elif schema['type'] == 'boolean': return fake.boolean() elif schema['type'] == 'array': item_schema = schema.get('items', {}) return [generate_response_from_schema(item_schema) for _ in range(random.randint(1, 3))] # Generate a list of 1-3 items else: return None # Unknown type ``` **Important Notes:** * This is a starting point. Building a fully functional MCP server is a significant undertaking. * The complexity of the implementation will depend on the complexity of the OpenAPI specifications you need to support. * Consider using existing libraries and tools to simplify the development process. This detailed explanation and code example should give you a solid foundation for building your MCP server. Remember to adapt and extend the code to meet your specific requirements. Good luck!

Universal AI Memory MCP Server

Universal AI Memory MCP Server

Provides a local-first secure memory store with encrypted payloads, entity extraction, and vector persistence, exposing read, write, and delete tools with granular capability controls.

business-central-mcp

business-central-mcp

Gives AI assistants direct access to Microsoft Dynamics 365 Business Central via the native WebSocket protocol, replacing OData, APIs, and browser automation. Enables page navigation, data reading/writing, actions, searches, and report execution.

mcp-random

mcp-random

MCP server providing true randomness capabilities to Claude, enabling cryptographically secure random number generation for games, decision-making, sampling, simulations, and any operation requiring genuine randomness.

Workflow MCP Server

Workflow MCP Server

hyper-video-service

hyper-video-service

MCP server for programmatic video generation. Send a prompt, get an MP4.

CVM: Processos Administrativos Sancionadores

CVM: Processos Administrativos Sancionadores

Enables read-only queries to official CVM (Brazilian Securities Commission) administrative sanctioning procedures via a paid, hosted MCP server. Works with any MCP-over-HTTP client like Claude, Cursor, and VS Code.

Personal DB MCP Server

Personal DB MCP Server

Provides structured personal data (skills, experiences, values) as context to AI services, enabling personalized outputs across different AI applications.

weather-forecast-mcp

weather-forecast-mcp

Enables querying South Korean meteorological observation data and short-term forecasts by region name or grid coordinates via the MCP protocol.

Math Solver AI MCP

Math Solver AI MCP

Math Solver AI - MCP server providing AI-powered tools and automation by MEOK AI Labs

Code Executor MCP Server

Code Executor MCP Server

Provides sandboxed code execution for AI agents with support for Python, JavaScript, and shell commands. Includes comprehensive safety features like destructive pattern blocking, timeout protection, and restricted file access for secure production use.

Attio MCP Server

Attio MCP Server

Provides tools to interact with the Attio API, enabling management of resources in an Attio workspace.

VIYAN MCP

VIYAN MCP

Enables autonomous satellite agents to communicate and coordinate for orbital operations such as collision avoidance, maneuver planning, and mission execution.

Azure Log Analytics MCP Server

Azure Log Analytics MCP Server

Enables querying and managing Azure Log Analytics workspaces using KQL (Kusto Query Language). Supports executing queries, managing saved queries, and exploring workspace tables and schemas with Service Principal authentication.

jira-mcp

jira-mcp

A Model Context Protocol (MCP) server that provides tools for interacting with Jira. Enables Cursor and other MCP clients to fetch tickets, manage linked tickets, and update ticket status.

Datum

Datum

Enables natural-language querying of SQLite databases through a governed semantic layer, with citations and typed abstention for PII or uncertified data.

Eversince MCP Server

Eversince MCP Server

A creative agent that plans and executes across image, video, and audio. Uses 30+ tools, orchestrates 20+ AI models, and does agentic timeline editing.

OrchestrateKit MCP

OrchestrateKit MCP

Enables Cursor and Claude Desktop to design production-ready AI workflows by exposing a structured registry of components, edges, stacks, routes, and playbooks, with capabilities for goal matching, route composition, and confidence scoring.

python-base-mcp-server

python-base-mcp-server

PythonベースのMCPサーバーを迅速に立ち上げるためのCookiecutterテンプレート。

Afro.tools MCP Server

Afro.tools MCP Server

Provides AI agents with structured, verified specs for African APIs like Wave and Paycard, enabling automatic integration code generation without manual documentation parsing.

Baidu Netdisk Knowledge MCP

Baidu Netdisk Knowledge MCP

Connects Baidu Netdisk to MCP-compatible AI clients, enabling AI to safely read selected files and generate summaries, key points, to-dos, tags, and organization suggestions.

@clikta/mcp-server

@clikta/mcp-server

Enables Claude to drive a real browser and automatically turn interactions into Clikta interactive demos, step-by-step guides, and narrated videos.

@jambonz/mcp-schema-server

@jambonz/mcp-schema-server

This server exposes jambonz verb schemas and developer documentation as MCP tools, enabling AI agents to query verb definitions, component types, callback payloads, and the full developer guide without needing local access to the schema files.

Pocket Connector

Pocket Connector

🔗 Pocket APIから保存された記事を取得し、Claudeに読み込むためのModel Context Protocol (MCP) サーバー

Zed Content Server Shopify Dev MCP Server

Zed Content Server Shopify Dev MCP Server

tsheets-mcp

tsheets-mcp

Exposes the full public TSheets REST API v1 as MCP tools, enabling time tracking, scheduling, and PTO management operations via natural language.

Agent-MQ

Agent-MQ

agent-mq is a message queue that enables AI coding agents to communicate with each other across sessions and machines. Agents can send messages, delegate tasks, and coordinate work — all through MCP tools. Supports Claude Code, Cursor, Codex, OpenClaw, and any MCP-compatible tool. UUID-based authentication with per-user data isolation. Self-hostable with Docker.

AppCan Helper MCP Server

AppCan Helper MCP Server

Enables users to search and access AppCan mobile development platform documentation with intelligent fuzzy search, caching, and content retrieval. Provides comprehensive access to AppCan's API documentation, development guides, and tutorials through natural language queries.

mcp-stytch-consumer-todo-list

mcp-stytch-consumer-todo-list

An MCP server that manages a TODO list with user authentication via Stytch, enabling AI agents to interact with a full-stack application.