comp3900_server
Enables installation and management of the COMP3900 project, including cloning, prerequisite checks, backend/frontend setup, Docker Compose, and optional cloudflared installation.
README
This is the repo for testing my custom MCP-server
COMP3900 project installer server
comp3900_server.py is a dedicated MCP server for the project at
https://github.com/arctic-cheetah/COMP3900-Project. It can:
- clone the fixed repository onto the machine running the MCP server;
- expose the project README and bounded project-file reads to the LLM;
- check prerequisites, including whether Playwright's Chromium is usable;
- install the backend, Playwright Chromium, and frontend locally;
- build/start the documented Docker Compose stack; or
- optionally install the
cloudflaredclient (see below).
The download goes to ./COMP3900-Project by default. To use another location,
set COMP3900_PROJECT_DIR to an explicit project directory.
Install this MCP server's dependency first:
python3 -m pip install -r requirements.txt
Run it over stdio:
mcp run comp3900_server.py:mcp
Or launch it directly:
python3 comp3900_server.py
In an MCP client, select the install_comp3900 prompt for a guided workflow,
or call setup_project directly. Example arguments for a local installation:
{
"method": "local",
"install_browser": true,
"install_browser_system_dependencies": true,
"start_services": false,
"install_cloudflare_tunnel_client": false
}
For Docker, use "method": "docker"; set "start_services": true to run
the stack in the background after building it.
Playwright
The URL detector's HTML fetch engine runs on Playwright, so it is a genuine
requirement: backend/pyproject.toml lists playwright, and both
backend/Dockerfile and operational-install-manual.md run
playwright install --with-deps chromium.
install_browser_system_dependencies now defaults to true to match that
documented step. It shells out to the platform package manager for Chromium's
shared libraries, so on a host where the server does not already run as root it
can prompt for elevation. Set it to false if you would rather install those
libraries yourself. check_prerequisites reports url_detector_ready, which is
true only when both the Playwright module and its Chromium browser resolve.
cloudflared
install_cloudflared downloads the official release binary into
<checkout>/.tools/cloudflared and reports its sha256. It is off by default in
install_project and setup_project; pass
"install_cloudflare_tunnel_client": true to include it.
Two caveats worth knowing:
- Cloudflare is not a dependency of the COMP3900 project. It appears nowhere
in the README, the install manual, or any manifest. The only occurrences in the
repository are domain strings such as
cdnjs.cloudflare.cominside the ML training CSVs underbackend/ml/data/. - The server installs the client only. It never authenticates to Cloudflare and never starts a tunnel, because running one publishes a local service on the public internet. That remains a deliberate human step.
Installing into the checkout keeps the operation unprivileged: no system package manager runs and nothing is written outside the project directory.
Instructions
From the project directory, launch the interactive MCP Inspector:
mcp dev server.py
The command prints a local Inspector URL. Open it, connect, select the add tool, and provide:
{
"a": 1,
"b": 2
}
The result should be 3.
To run it as a normal stdio MCP server for an MCP client:
mcp run server.py:mcp
Running python server.py currently exits immediately because the file only defines the server. To support that command, append:
if __name__ == "__main__":
mcp.run()
Then run
python3 server.py
If MCP is not installed on another machine:
python3 -m pip install "mcp[cli]"
Then
mcp dev server.py
Deployments:
This is the description of what the code block changes: <changeDescription> Adding the connection guide (STDIO and HTTP options) to README.md after the existing content. </changeDescription>
This is the code block that represents the suggested code change:
Connecting to ChatGPT Desktop
Option 1: Connect through STDIO (recommended)
Because the server currently runs inside WSL, fill the desktop form as follows:
- Name:
MCP_test - Type: STDIO
- Command to launch:
wsl.exe - Arguments: add each item separately, in this order:
--cd /home/khalifa/MCP-server --exec /home/khalifa/pythonPackages/bin/mcp run server.py:mcp - Environment variables: leave empty
- Working directory: leave empty
If the wrong WSL distribution is selected, insert these arguments first:
--distribution
Ubuntu
Replace Ubuntu with the name reported by:
wsl.exe --list --verbose
So effectively it looks like:
- Arguments: add each item separately, in this order:
--distribution kali-linux --cd /home/khalifa/MCP-server --exec /home/khalifa/pythonPackages/bin/mcp run server.py:mcp
Save the server and restart the desktop app. In a chat, enter:
/mcp
You should see MCP_test and its add tool. Try:
Use the MCP_test add tool to add 17 and 25.
The official OpenAI documentation confirms that the desktop app supports both local STDIO processes and Streamable HTTP servers. It also requires restarting after saving the configuration. OpenAI MCP documentation
Option 2: Run the server over HTTP
Stop mcp dev, then run:
cd /home/khalifa/MCP-server
mcp run server.py:mcp --transport streamable-http
The default MCP endpoint is:
http://127.0.0.1:8000/mcp
In the desktop form:
- Name:
MCP_test_http - Type: Streamable HTTP
- URL:
http://127.0.0.1:8000/mcp
There is no launch command or arguments for this mode. The HTTP server must already be running.
If port 8000 is occupied, add this to server.py:
if __name__ == "__main__":
mcp.run(
transport="streamable-http",
host="127.0.0.1",
port=8001,
)
Then run:
python3 server.py
Use this desktop URL:
http://127.0.0.1:8001/mcp
Calling it with an HTTP request
MCP is JSON-RPC, not a conventional REST API. Opening /mcp in the browser address bar will therefore not invoke add. You must initialize an MCP session and then call the tool.
Initialize:
curl.exe -i -N http://127.0.0.1:8000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
--data "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-11-25\",\"capabilities\":{},\"clientInfo\":{\"name\":\"curl\",\"version\":\"1.0\"}}}"
Copy the value of the Mcp-Session-Id response header. Then call add:
curl.exe -N http://127.0.0.1:8000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Mcp-Session-Id: PASTE_SESSION_ID_HERE" \
--data "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"add\",\"arguments\":{\"a\":17,\"b\":25}}}"
For browser-based interactive testing, the Inspector you already have is easier than manually managing the JSON-RPC session. The HTTP endpoint is primarily intended for MCP clients such as ChatGPT Desktop, Codex, or the Inspector—not direct browser navigation.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。