surya madhav MCP

surya madhav MCP avatar

by surya-madhav

What is surya madhav MCP

MCP Web Tools Server

A Model Context Protocol (MCP) server that provides tools for web-related operations. This server allows LLMs to interact with web content through standardized tools.

Current Tools

  • web_scrape: Converts a URL to use r.jina.ai as a prefix and returns the markdown content

Installation

  1. Clone this repository:

    git clone <repository-url>
    cd MCP
    
  2. Install the required dependencies:

    pip install -r requirements.txt
    

    Alternatively, you can use uv for faster installation:

    uv pip install -r requirements.txt
    

Running the Server and UI

This repository includes convenient scripts to run either the MCP server or the Streamlit UI.

Using the Run Scripts

On macOS/Linux:

# Run the server with stdio transport (default)
./run.sh server

# Run the server with SSE transport
./run.sh server --transport sse --host localhost --port 5000

# Run the Streamlit UI
./run.sh ui

On Windows:

# Run the server with stdio transport (default)
run.bat server

# Run the server with SSE transport
run.bat server --transport sse --host localhost --port 5000

# Run the Streamlit UI
run.bat ui

Running Manually

Alternatively, you can run the server directly:

Using stdio (default)

python server.py

Using SSE

python server.py --transport sse --host localhost --port 5000

This will start an HTTP server on localhost:5000 that accepts MCP connections.

And to run the Streamlit UI manually:

streamlit run streamlit_app.py

Testing with MCP Inspector

The MCP Inspector is a tool for testing and debugging MCP servers. You can use it to interact with your server:

  1. Install the MCP Inspector:

    npm install -g @modelcontextprotocol/inspector
    
  2. Run the Inspector with your server:

    npx @modelcontextprotocol/inspector python server.py
    
  3. Use the Inspector interface to test the web_scrape tool by providing a URL like example.com and viewing the returned markdown content.

Integrating with Claude for Desktop

To use this server with Claude for Desktop:

  1. Make sure you have Claude for Desktop installed.

  2. Open the Claude for Desktop configuration file:

    • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. Add the following configuration (adjust the path as needed):

{
  "mcpServers": {
    "web-tools": {
      "command": "python",
      "args": [
        "/absolute/path/to/MCP/server.py"
      ]
    }
  }
}
  1. Restart Claude for Desktop.

  2. You should now see the web_scrape tool available in Claude's interface. You can ask Claude to fetch content from a website, and it will use the tool.

Example Usage

Once integrated with Claude, you can ask questions like:

  • "What's on the homepage of example.com?"
  • "Can you fetch and summarize the content from mozilla.org?"
  • "Get the content from wikipedia.org/wiki/Model_Context_Protocol and explain it to me."

Claude will use the web_scrape tool to fetch the content and provide it in its response.

Adding More Tools

To add more tools to this server:

  1. Create a new Python file in the tools/ directory, e.g., tools/new_tool.py.

  2. Implement your tool function, following a similar pattern to the existing tools.

  3. Import your tool in server.py and register it with the MCP server:

# Import your new tool
from tools.new_tool import new_tool_function

# Register the tool with the MCP server
@mcp.tool()
async def new_tool(param1: str, param2: int) -> str:
    """
    Description of what your tool does.
    
    Args:
        param1: Description of param1
        param2: Description of param2
        
    Returns:
        Description of return value
    """
    return await new_tool_function(param1, param2)
  1. Restart the server to apply the changes.

Streamlit UI

This repository includes a Streamlit application that allows you to connect to and test all your MCP servers configured in Claude for Desktop.

Running the Streamlit UI

streamlit run streamlit_app.py

This will start the Streamlit server and open a web browser with the UI.

Features

  • Load and parse your Claude for Desktop configuration file
  • View all configured MCP servers
  • Connect to any server and view its available tools
  • Test tools by providing input parameters and viewing results
  • See available resources and prompts

Usage

  1. Start the Streamlit app
  2. Enter the path to your Claude for Desktop configuration file (default path is pre-filled)
  3. Click "Load Servers" to see all available MCP servers
  4. Select a server tab and click "Connect" to load its tools
  5. Select a tool and provide the required parameters
  6. Click "Execute" to run the tool and see the results

Troubleshooting

  • Missing dependencies: Make sure all dependencies in requirements.txt are installed.
  • Connection issues: Check that the server is running and the configuration in Claude for Desktop points to the correct path.
  • Tool execution errors: Look for error messages in the server output.
  • Streamlit UI issues: Make sure Streamlit is properly installed and the configuration file path is correct.

License

This project is available under the MIT License. See the LICENSE file for more details.

Leave a Comment

Frequently Asked Questions

What is MCP?

MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.

What are MCP Servers?

MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.

How do MCP Servers work?

MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.

Are MCP Servers secure?

Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.

Related MCP Servers

chrisdoc hevy mcp avatar

chrisdoc hevy mcp

mcp
sylphlab pdf reader mcp avatar

sylphlab pdf reader mcp

An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts. Uses pdf-parse.

pdf-parsetypescriptnodejs
aashari mcp server atlassian bitbucket avatar

aashari mcp server atlassian bitbucket

Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.

atlassianrepositorymcp
aashari mcp server atlassian confluence avatar

aashari mcp server atlassian confluence

Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.

atlassianmcpconfluence
prisma prisma avatar

prisma prisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

cockroachdbgomcp
Zzzccs123 mcp sentry avatar

Zzzccs123 mcp sentry

mcp sentry for typescript sdk

mcptypescript
zhuzhoulin dify mcp server avatar

zhuzhoulin dify mcp server

mcp
zhongmingyuan mcp my mac avatar

zhongmingyuan mcp my mac

mcp
zhixiaoqiang desktop image manager mcp avatar

zhixiaoqiang desktop image manager mcp

MCP 服务器,用于管理桌面图片、查看详情、压缩、移动等(完全让Trae实现)

mcp
zhixiaoqiang antd components mcp avatar

zhixiaoqiang antd components mcp

An MCP service for Ant Design components query | 一个减少 Ant Design 组件代码生成幻觉的 MCP 服务,包含系统提示词、组件文档、API 文档、代码示例和更新日志查询

designantdapi

Submit Your MCP Server

Share your MCP server with the community

Submit Now