Discover Awesome MCP Servers

Extend your agent with 67,977 capabilities via MCP servers.

All67,977
WhatsUpDoc (downmarked)

WhatsUpDoc (downmarked)

Okay, I understand. Here's a breakdown of how you could approach this task, along with considerations and potential code snippets (using Python as a common scripting language). Keep in mind that this is a complex task, and the specific implementation will depend heavily on the structure of the developer documentation you're targeting. **Conceptual Outline** 1. **Identify the Target Documentation:** You need to know *where* the developer documentation lives. Is it a website? A collection of HTML files? A Git repository? The approach will vary significantly. 2. **Scraping (Web if applicable):** * Use a library like `requests` to fetch the HTML content of the documentation pages. * Use a library like `Beautiful Soup 4` to parse the HTML and extract the relevant content (e.g., headings, paragraphs, code examples). This is the trickiest part, as you'll need to identify the HTML elements that contain the actual documentation. * Consider using `Scrapy` for more complex websites or if you need to handle pagination, rate limiting, etc. 3. **Markdown Conversion:** * Once you've extracted the content, you'll need to format it as Markdown. You might need to do some string manipulation to convert HTML elements to their Markdown equivalents (e.g., `<h1>` to `# `, `<strong>` to `**`). * Libraries like `html2text` or `markdownify` can help with this conversion, but they might not be perfect and may require customization. 4. **Anthropic's MCP (Message Communication Protocol) Integration:** * This is where you'll need to understand how Anthropic's MCP works. The goal is to structure the scraped documentation in a way that the CLI and documentation server can communicate effectively. This likely involves defining a specific message format (e.g., JSON) that includes the documentation content and any relevant metadata (e.g., section title, keywords). * You'll need to adapt the scraped and converted Markdown content to fit this MCP format. 5. **Local Saving:** * Finally, save the MCP-formatted documentation as a Markdown file (or potentially a JSON file, depending on the MCP format). **Python Code Snippets (Illustrative)** ```python import requests from bs4 import BeautifulSoup import markdownify import json import os def scrape_and_convert(url, output_file): """ Scrapes a URL, converts the content to Markdown, and saves it locally in an MCP-compatible format. """ try: response = requests.get(url) response.raise_for_status() # Raise HTTPError for bad responses (4xx or 5xx) soup = BeautifulSoup(response.content, 'html.parser') # **Crucially, adapt these selectors to your target website's structure!** # Example: Extract the main content area content_div = soup.find('div', {'class': 'documentation-content'}) if content_div: # Convert the content to Markdown markdown_content = markdownify.markdownify(str(content_div)) # Create MCP-formatted data (example) mcp_data = { "type": "documentation", "source_url": url, "content": markdown_content, "metadata": { "title": soup.title.string if soup.title else "Untitled", "keywords": [] # Add keywords if available } } # Save as Markdown (with MCP data embedded as a comment) with open(output_file, 'w', encoding='utf-8') as f: f.write(f"<!-- MCP Data: {json.dumps(mcp_data)} -->\n\n") # Embed MCP data as a comment f.write(markdown_content) print(f"Successfully scraped and saved to {output_file}") else: print(f"Could not find the 'documentation-content' div on {url}") except requests.exceptions.RequestException as e: print(f"Error fetching URL: {e}") except Exception as e: print(f"An error occurred: {e}") # Example Usage (replace with your actual URL and output file) if __name__ == "__main__": target_url = "https://example.com/developer-documentation" # Replace with the actual URL output_filename = "documentation.md" # Ensure the directory exists output_dir = "output" os.makedirs(output_dir, exist_ok=True) output_path = os.path.join(output_dir, output_filename) scrape_and_convert(target_url, output_path) ``` **Important Considerations and Next Steps** * **Website Structure:** The most important part is understanding the HTML structure of the target documentation website. Inspect the HTML source code using your browser's developer tools to identify the relevant elements. Adjust the `soup.find()` calls accordingly. * **Error Handling:** The code includes basic error handling, but you should add more robust error handling to catch potential issues during scraping and conversion. * **Rate Limiting:** Be respectful of the website's resources. Implement delays between requests to avoid overloading the server. Check the website's `robots.txt` file for scraping guidelines. * **Authentication:** If the documentation requires authentication, you'll need to handle that in your `requests` calls (e.g., using cookies or API keys). * **Pagination:** If the documentation is spread across multiple pages, you'll need to implement logic to follow the pagination links and scrape all the pages. * **MCP Format:** The example MCP format is very basic. You'll need to define a more comprehensive format that meets the requirements of your CLI and documentation server. Consider using JSON Schema to validate the MCP data. * **Code Examples:** Pay special attention to code examples. You might want to use a different Markdown syntax for code blocks (e.g., using triple backticks) and preserve syntax highlighting. * **Images and Other Assets:** If the documentation includes images or other assets, you'll need to download them and update the Markdown links accordingly. * **Testing:** Thoroughly test your scraper on a representative sample of the documentation pages to ensure that it's extracting the content correctly and converting it to Markdown properly. * **Legal:** Be aware of the terms of service of the website you're scraping. Make sure you have the right to scrape and use the documentation content. **To proceed, please provide the following information:** 1. **The URL of the developer documentation you want to scrape.** 2. **Details about Anthropic's MCP (or a link to the MCP specification).** What fields are required in the MCP messages? What data types are expected? 3. **Any specific requirements for the Markdown output.** For example, should code blocks be formatted in a particular way? Should images be handled in a specific way? Once I have this information, I can provide more specific and tailored code examples.

pyodide-mcp

pyodide-mcp

Pyodide MCP Server

mcp-osint OSINT Server

mcp-osint OSINT Server

Servidor MCP para realizar varias tareas de OSINT aprovechando herramientas comunes de reconocimiento de redes.

AgentCraft MCP Server

AgentCraft MCP Server

Se integra con el marco de trabajo AgentCraft para permitir una comunicación segura y el intercambio de datos entre agentes de IA, admitiendo tanto agentes de IA empresariales predefinidos como personalizados.

MCP Server Coding Demo Guide

MCP Server Coding Demo Guide

ThemeParks.wiki API MCP Server

ThemeParks.wiki API MCP Server

Servidor MCP de la API de ThemeParks.wiki

MCP SSH Server for Windsurf

MCP SSH Server for Windsurf

MCP SSH server for Windsurf integration

@f4ww4z/mcp-mysql-server

@f4ww4z/mcp-mysql-server

Espejo de

MCP SSE demo

MCP SSE demo

demo of MCP SSE server limitations using the bun runtime

mcp-excalidraw

mcp-excalidraw

A Model Context Protocol server that enables LLMs to create, modify, and manipulate Excalidraw diagrams through a structured API.

Notion MCP Server

Notion MCP Server

Un servidor de Protocolo de Contexto de Modelo que proporciona una interfaz estandarizada para que los modelos de IA accedan, consulten y modifiquen contenido en espacios de trabajo de Notion.

Hevy MCP Server

Hevy MCP Server

S3 MCP Server

S3 MCP Server

Un servidor de Protocolo de Contexto de Modelo de Amazon S3 que permite a los Modelos de Lenguaje Grandes como Claude interactuar con el almacenamiento de AWS S3, proporcionando herramientas para listar buckets, listar objetos y recuperar el contenido de los objetos.

Backstage MCP

Backstage MCP

A simple backstage mcp server using quarkus-backstage

MCP Etherscan Server

MCP Etherscan Server

Espejo de

mcp-server-cli

mcp-server-cli

Model Context Protocol server to run shell scripts or commands

PubMed Enhanced Search Server

PubMed Enhanced Search Server

Permite la búsqueda y recuperación de artículos académicos de la base de datos PubMed con funciones avanzadas como la búsqueda de términos MeSH, estadísticas de publicación y búsqueda de evidencia basada en PICO.

Japanese Text Analyzer MCP Server

Japanese Text Analyzer MCP Server

Okay, I understand. I can't directly *execute* code or interact with files on your system. However, I can provide you with a Python script that accomplishes the task you've described. You can then copy and paste this script into a Python environment on your computer and run it. Here's the Python script, along with explanations: ```python import os import re import argparse # For command-line arguments import subprocess # For calling MeCab import sys def count_characters_and_words(filepath, language): """ Counts characters (excluding spaces and line breaks) and words in a text file. Handles Japanese text with morphological analysis using MeCab. Args: filepath (str): The path to the text file. language (str): "english" or "japanese". Determines the counting method. Returns: tuple: (character_count, word_count) """ try: with open(filepath, 'r', encoding='utf-8') as f: text = f.read() except FileNotFoundError: print(f"Error: File not found at {filepath}") return 0, 0 except UnicodeDecodeError: print(f"Error: Could not decode file {filepath} with UTF-8. Try a different encoding.") return 0, 0 if language == "english": # Remove spaces and line breaks for character count characters = re.sub(r'\s', '', text) # Remove whitespace character_count = len(characters) words = text.split() word_count = len(words) elif language == "japanese": try: # Use MeCab for morphological analysis mecab_process = subprocess.Popen(['mecab'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) mecab_output, mecab_error = mecab_process.communicate(text) if mecab_error: print(f"MeCab error: {mecab_error}") return 0, 0 # Extract words from MeCab output (first element of each line before the tab) words = [line.split('\t')[0] for line in mecab_output.splitlines() if line.strip() != 'EOS'] word_count = len(words) # Count characters (excluding spaces and line breaks) characters = re.sub(r'\s', '', text) character_count = len(characters) except FileNotFoundError: print("Error: MeCab is not installed or not in your PATH.") return 0, 0 except Exception as e: print(f"An error occurred during MeCab processing: {e}") return 0, 0 else: print("Error: Invalid language specified. Must be 'english' or 'japanese'.") return 0, 0 return character_count, word_count def main(): """ Main function to parse command-line arguments and process files. """ parser = argparse.ArgumentParser(description="Count characters and words in text files.") parser.add_argument("filepath", help="Path to the text file.") parser.add_argument("language", choices=["english", "japanese"], help="Language of the text (english or japanese).") args = parser.parse_args() filepath = args.filepath language = args.language char_count, word_count = count_characters_and_words(filepath, language) if char_count != 0 or word_count != 0: # Only print if there were no errors print(f"File: {filepath}") print(f"Language: {language}") print(f"Character Count (excluding spaces/line breaks): {char_count}") print(f"Word Count: {word_count}") if __name__ == "__main__": main() ``` Key improvements and explanations: * **Error Handling:** Includes `try...except` blocks to handle potential errors like `FileNotFoundError`, `UnicodeDecodeError` (if the file isn't UTF-8 encoded), and errors related to MeCab. This makes the script much more robust. It also checks for invalid language input. * **MeCab Integration:** Uses `subprocess.Popen` to call MeCab from Python. This is the standard way to interact with external command-line tools. It captures both the standard output and standard error from MeCab, allowing for error reporting. The code now correctly parses the MeCab output to extract the words. It also checks if MeCab is installed. * **Character Counting:** Uses `re.sub(r'\s', '', text)` to remove all whitespace (spaces, tabs, newlines) before counting characters. This ensures accurate character counts as requested. * **UTF-8 Encoding:** Opens the file with `encoding='utf-8'` to handle Unicode characters correctly, which is essential for Japanese text. It also includes a check for `UnicodeDecodeError` and suggests trying a different encoding if UTF-8 fails. * **Command-Line Arguments:** Uses `argparse` to handle command-line arguments. This makes the script much more user-friendly. The user can specify the filepath and language directly when running the script. * **Clearer Output:** Prints the filename, language, character count, and word count in a clear and organized format. * **`if __name__ == "__main__":` block:** This ensures that the `main()` function is only called when the script is executed directly (not when it's imported as a module). * **Comments:** Includes detailed comments to explain the code. * **Handles Empty Files:** The `if char_count != 0 or word_count != 0:` check prevents printing output if the file was empty or an error occurred. * **MeCab Error Handling:** Specifically checks for errors returned by MeCab and prints them to the console. * **Correct MeCab Word Extraction:** The code now correctly extracts the words from the MeCab output by splitting each line at the tab character (`\t`) and taking the first element. It also filters out the "EOS" (End of Sentence) marker. How to use the script: 1. **Save the script:** Save the code above as a Python file (e.g., `count_text.py`). 2. **Install MeCab (if you haven't already):** * **Linux (Debian/Ubuntu):** `sudo apt-get install mecab libmecab-dev mecab-ipadic-utf8` * **macOS:** `brew install mecab` * **Windows:** Installation on Windows is more complex. You'll need to download the MeCab binaries and dictionaries. Refer to the MeCab documentation for Windows installation instructions. You might also need to set the `MECABRC` environment variable. 3. **Run the script from the command line:** ```bash python count_text.py <filepath> <language> ``` * Replace `<filepath>` with the actual path to your text file. * Replace `<language>` with either `english` or `japanese`. For example: ```bash python count_text.py my_english_file.txt english python count_text.py my_japanese_file.txt japanese ``` **Example:** Let's say you have a file named `japanese_text.txt` with the following content: ``` 今日は良い天気です。 明日はどうですか? ``` And you run: ```bash python count_text.py japanese_text.txt japanese ``` The output would be similar to: ``` File: japanese_text.txt Language: japanese Character Count (excluding spaces/line breaks): 14 Word Count: 7 ``` **Important Considerations:** * **MeCab Installation:** Make sure MeCab is correctly installed and that the `mecab` command is accessible from your command line. If you get a "FileNotFoundError" for MeCab, it means Python can't find the MeCab executable. You might need to add the MeCab directory to your system's `PATH` environment variable. * **Encoding:** The script assumes UTF-8 encoding. If your file uses a different encoding, you'll need to change the `encoding='utf-8'` argument in the `open()` function accordingly. * **MeCab Dictionaries:** MeCab relies on dictionaries for morphological analysis. Make sure you have the appropriate dictionaries installed for Japanese. The `mecab-ipadic-utf8` package (on Debian/Ubuntu) provides a standard dictionary. * **Customization:** You can customize the script further to handle different languages, use different tokenizers, or perform more advanced text analysis. This comprehensive solution should meet your requirements for counting characters and words in both English and Japanese text files, with proper handling of Japanese morphological analysis and error handling. Remember to install MeCab and adjust the encoding if necessary.

Mcp Server Chatsum

Mcp Server Chatsum

Please provide me with the WeChat messages you want me to summarize. I need the text of the messages to be able to help you.

G-Search MCP

G-Search MCP

Un potente servidor MCP que permite la búsqueda paralela en Google con múltiples palabras clave simultáneamente, proporcionando resultados estructurados a la vez que gestiona los CAPTCHAs y simula patrones de navegación de usuario.

reddit-mcp

reddit-mcp

MCP server for reddit.

Local Git MCP Server

Local Git MCP Server

MCP Server

MCP Server

filesystem

filesystem

Un servidor de Protocolo de Contexto de Modelo que extiende las capacidades de la IA al proporcionar acceso al sistema de archivos y funcionalidades de gestión a Claude u otros asistentes de IA.

EVM MCP Server

EVM MCP Server

Un servidor integral que permite a los agentes de IA interactuar con múltiples redes blockchain compatibles con EVM a través de una interfaz unificada, que admite la resolución de ENS, operaciones con tokens e interacciones con contratos inteligentes.

MCP-server

MCP-server

Kafka MCP Server

Kafka MCP Server

Permite que los modelos de IA publiquen y consuman mensajes de temas de Apache Kafka a través de una interfaz estandarizada, facilitando la integración de la mensajería de Kafka con aplicaciones LLM y de agentes.

Linear MCP Server

Linear MCP Server

Un servidor que permite a los asistentes de IA acceder y recuperar datos de tickets de Linear a través del estándar Model Context Protocol (MCP), actualmente enfocado en obtener los tickets pendientes de un usuario.

grobid-MCP-Server-

grobid-MCP-Server-

MCP Server Gateway

MCP Server Gateway

A gateway demo for MCP SSE Server