Labsco
slawekradzyminski logo

Simple MCP Tool Server

from slawekradzyminski

A simple MCP server that provides a tool for fetching website content using SSE transport.

๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeNeeds API keys

Simple MCP Tool Server

A simple MCP server that exposes a website fetching tool using SSE transport.

MCP Python SDK Documentation

The MCP Python SDK documentation has been split into smaller files and organized in the docs/ directory. This structure makes it easier for AI agents to navigate and understand the SDK. The documentation covers:

  • Core concepts (servers, resources, tools, etc.)
  • Running MCP servers in different modes
  • Examples and advanced usage
  • And more!

Server Tools

The server exposes the following tools:

  • fetch: Remote HTTP fetcher โ€“ give an absolute URL; returns page text.

    • url: The URL of the website to fetch (required)
  • search_docs: Semantic search across SDK documentation; returns top-k excerpts.

    • query: Search phrase or question (required)
    • k: Number of top matches to return (optional, default = 3)
  • get_content: Get the full local file for any match returned by search_docs.

    • file: Path relative to docs (required)

Project Architecture

mcp_simple_tool/
    __init__.py          # Package initialization
    __main__.py          # Entry point when run as module
    cli.py               # Command-line interface
    server/              # Server implementation
        __init__.py      # Server package initialization
        app.py           # ASGI application setup
        config.py        # Configuration settings
        handlers.py      # Tool implementations
        http.py          # HTTP utilities
    semantic_search/     # Semantic search functionality
        __init__.py      # Package initialization
        indexing.py      # Build and persist vector store
        search.py        # Load index and query helpers

Using with Cursor

This MCP server can be used with Cursor as a client. For setup:

  1. Run the server in a terminal:
source venv/bin/activate
python -m mcp_simple_tool start
# or use the restart command
python -m mcp_simple_tool restart
  1. Configure Cursor by creating a .cursor/mcp.json file:
{
  "mcpServers": {
    "website-fetcher-sse": {
      "url": "http://localhost:7000/sse"
    }
  }
}
  1. Mention the server in your prompts when using Cursor