Skip to main content
Glama
karkir0003

MyPlayground

by karkir0003

levels-fyi-mcp

用于从 levels.fyi 查询薪酬数据的 MCP 服务器。

此服务器提供的功能

服务器名称:MyPlayground

工具:

  • calculate_addition(a: int, b: int) -> int

  • get_mock_weather(city: str) -> str (模拟天气,非真实 API 数据)

  • generate_username(base_name: str, add_numbers: bool = true) -> str

Related MCP server: FastMCP Demo Server

最终用户安装(在 Cursor 中使用)

本节适用于只想在 Cursor 中安装并运行此 MCP 服务器的用户。

要求

  • Python >=3.11

  • uv

Cursor MCP 配置(推荐)

使用 uv run 以便 Cursor 直接使用项目环境。

{
  "mcpServers": {
    "user-MyPlayground": {
      "command": "uv",
      "args": ["run", "python", "main.py"],
      "cwd": "/absolute/path/to/levels-fyi-mcp"
    }
  }
}

开始使用

  1. 打开 Cursor MCP 设置并添加上述服务器配置。

  2. 确保 cwd 指向您本地克隆的此仓库路径。

  3. 在 Cursor 中启动/重新加载 MCP 服务器。

  4. 调用诸如 calculate_additionget_mock_weathergenerate_username 等工具。

可选:直接使用 fastmcp 命令

如果您更喜欢在 Cursor 中使用 command: "fastmcp",请将其作为全局工具安装:

uv tool install fastmcp

如果 Cursor 无法找到 fastmcp,请使用上述推荐的 uv run 配置。

开发者设置

本节适用于进行代码贡献的开发者。

安装依赖

在项目根目录下执行:

uv sync

本地运行服务器

uv run python main.py

添加或更新依赖

uv add <package>
uv sync

快速环境检查

uv run python -c "import fastmcp; print('fastmcp ok')"

项目结构

.
├── main.py
├── pyproject.toml
└── README.md

故障排除

Failed to spawn: fastmcp (os error 2)

原因:Cursor 无法找到 fastmcp 可执行文件。

解决方法:

  1. 优先使用 uv run python main.py 的 Cursor 配置,或者

  2. 使用 uv tool install fastmcp 安装全局工具,并确保 PATH 包含 uv 工具的 bin 目录(通常为 ~/.local/bin)。

工具参数类型错误

  • generate_username.add_numbers 必须是布尔值(true/false),不能是数字或字符串。

注意事项

  • get_mock_weather 返回用于演示的随机模拟数据。

  • 工具日志由 main.py 打印,并显示在服务器输出中。

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    A simple demonstration project for the Model Control Protocol (MCP) server that provides tools for AI assistants to fetch news articles, perform calculations, retrieve weather data, and generate personalized greetings.
    3
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Provides utility tools including random jokes, current weather, and name-based age prediction.
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • Generate IDs, QR codes, and hashes, encode values, geolocate IPs, plus gated host diagnostics.

  • Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.

  • 500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/karkir0003/levels-fyi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server