drio
Open app

MCP Server

Source

基于 FastAPI 和 MCP(模型上下文协议),实现 AI 模型与开发环境 之间的标准化上下文交互,提升 AI 应用的可扩展性和可维护性。

Catalog onlyCatalog onlySTDIO

Overview

MCP Server is a Python-based implementation that facilitates standardized context interaction between AI models and development environments using the Model Context Protocol (MCP). It enhances the scalability and maintainability of AI applications by simplifying model deployment and providing efficient API endpoints.

To use MCP Server, clone the repository, install the dependencies, and start the server. You can then run the client to interact with the server and send requests.

  • JSON-RPC 2.0 for request-response communication - Support for Server-Sent Events (SSE) for real-time notifications - Modular design for easy extension and customization - Asynchronous processing for high performance - Complete client implementation for testing
  1. Integrating AI models into applications
  2. Real-time data processing and notifications
  3. Simplifying the deployment of AI services

Add to your AI client

Use these steps to connect MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server-freedanfan": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-freedanfan"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-server-freedanfan": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-freedanfan"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-server-freedanfan": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-freedanfan"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-server-freedanfan": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-freedanfan"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-server-freedanfan": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-freedanfan"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-server-freedanfan": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-freedanfan"
      ]
    }
  }
}

FAQ

What is the MCP Protocol?

The MCP Protocol is a unified protocol for context interaction between AI models and development environments.

How do I start the server?

You can start the server by running `python mcp_server.py` after setting up the environment.

Can I customize the server settings?

Yes, you can customize the host and port using environment variables.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2147,"uuid":"00a61f4b-f44e-48e8-815d-5e11d6a354b9","name":"mcp_server","title":"MCP Server","description":"基于 FastAPI 和 MCP(模型上下文协议),实现 AI 模型与开发环境 之间的标准化上下文交互,提升 AI 应用的可扩展性和可维护性。","avatar_url":"https://avatars.githubusercontent.com/u/26640959?v=4","created_at":"2025-03-09T03:47:02.414Z","updated_at":"2025-03-12T10:19:31.279Z","status":"created","author_name":"freedanfan","author_avatar_url":"https://avatars.githubusercontent.com/u/26640959?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/freedanfan/mcp_server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"5\",\"license\":\"MIT license\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-05-02 08:24:20\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]