Skip to main content
Glama

mcp-personal · Personal MCP Server

A personal MCP server built with Python (FastMCP) that can connect to any MCP client such as Cursor / VS Code / DeepSeek Harness.

See PLAN.md for the full plan · See docs/展示指南.md for demo materials · Current progress: four scenarios + HTTP + auth + pdf_extract ✅ · 21 tests passing · See .env.example for environment variables

Quick Start

# 1. 创建虚拟环境并安装(需 Python 3.11+ 或 uv)
uv venv
uv pip install -e ".[dev]"

# 2. 跑测试
uv run pytest tests -q

# 3. 启动服务器(stdio,供客户端接入)
uv run python -m mcp_personal

# 4. 冒烟测试:真实 stdio 子进程链路
uv run python scripts/smoke_stdio.py

# 5. 查看服务器注册的能力清单(Tools/Prompts/Resources)
uv run python scripts/verify_capabilities.py

# 6. 调试:官方 MCP Inspector
uv run mcp dev src/mcp_personal/server.py

Related MCP server: DDG MCP Server

Connecting Clients

Configuration is preconfigured (portable approach: uv run --project . automatically locates the environment, so the repository can be moved anywhere):

Client

Config file

Cursor

.cursor/mcp.json (Settings → MCP → Add local server)

VS Code

.vscode/mcp.json (requires the "MCP" extension / Copilot Chat)

Other

Standard stdio config: command + args as above

After connecting, have the AI call the ping tool to verify the link.

HTTP Remote Access (Optional)

# 终端 1:启动 HTTP 服务(默认 127.0.0.1:8000,--host 0.0.0.0 可局域网访问)
uv run python scripts/run_http.py --port 8000

# 终端 2:用官方客户端验证链路
uv run python scripts/client_http_check.py --url http://127.0.0.1:8000/mcp

For other remote clients, simply set the MCP server address to http://<host>:<port>/mcp.

HTTP Authentication (Optional)

After setting the environment variable and starting, all requests must include Authorization: Bearer <token>:

# 终端 1:带鉴权启动
MCP_API_TOKEN=my-secret uv run python scripts/run_http.py --port 8000

# 终端 2:带 token 验证
uv run python scripts/client_http_check.py --url http://127.0.0.1:8000/mcp --token my-secret

Note: Based on FastMCP's official StaticTokenVerifier (API key style), the token is stored in plaintext and is only suitable for personal/development use; production should switch to OAuth/JWT.

Directory Structure

├── PLAN.md            # 项目规划书
├── pyproject.toml     # 依赖与打包
├── src/mcp_personal/  # 服务器代码
│   ├── server.py      # FastMCP 入口(注册全部原语)
│   ├── tools/         # Tool:paper(检索)/dataset(摸底)/scaffold(课设)/devtools(目录树)
│   ├── prompts.py     # Prompt:literature_review 文献综述框架
│   └── resources.py   # Resource:papers://list 本地论文库
├── papers/            # 本地论文库(放 PDF)
├── datasets/          # 竞赛数据集(dataset_info 工具使用)
├── tests/             # pytest 测试(13 个)
├── .github/workflows/ # CI:push/PR 自动跑测试
├── scripts/           # smoke_stdio.py / verify_capabilities.py
├── .cursor/ .vscode/  # 客户端接入配置
└── README.md

Available Tools

8 tools
course_reportA

生成一份课设报告 Markdown 骨架并保存到 reports/ 目录,返回保存路径与结构。

  • title: 报告标题(同时作为文件名)

  • course_name: 课程名称

  • student: 姓名学号(默认占位)

  • sections: 主体章节数(1-8)

Inputs: title (required), course_name (required), student, sections. Returns: result

dataset_infoA

分析本地数据集(CSV/JSON),返回结构/行数/每列统计,供竞赛数据处理前快速摸底。

  • path: 数据集路径;相对路径默认基于 datasets/ 目录(或 MCP_DATASETS_DIR),绝对路径也可

Inputs: path (required). Returns: object

echoA

原样返回输入的文本,用于测试工具参数传递是否正常。

Inputs: text (required). Returns: result

pdf_extractA

下载 arXiv 论文 PDF 并解析正文,返回页数与正文预览(论文精读前快速浏览用)。

  • arxiv_id: arXiv 编号,如 "2507.19570v1"

  • max_chars: 预览字符数上限(100-5000,默认 500)

Inputs: arxiv_id (required), max_chars. Returns: object

pingA

连接自检:返回 "pong"。客户端接入后先调用它确认链路通畅。

Inputs: no named parameters. Returns: result

project_treeA

列出目录的文件树(只读),默认跳过 .venv/.git/pycache 等目录。

  • path: 目录路径(默认当前目录;可用绝对路径)

  • max_depth: 最大递归深度(1-4)

  • skip_hidden: 跳过隐藏目录与常见依赖目录

Inputs: path, max_depth, skip_hidden. Returns: result

scaffold_projectA

创建一个新项目的目录骨架(README/.gitignore/入口文件),返回创建的文件清单。

  • name: 项目名(单级目录名,防路径穿越)

  • language: python / node / plain

  • description: 项目简介,写入 README

Inputs: name (required), language, description. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 8 tools

    Disambiguation4/5

    The eight actual tools have distinct purposes: connectivity/test, arXiv search, PDF text preview, dataset stats, project scaffolding, report generation, and file-tree listing. ping and echo are both test helpers but differ clearly (link check vs parameter passthrough), so an agent is unlikely to select the wrong tool.

    Naming Consistency2/5

    Naming is a mix of bare verbs (ping, echo), verb+object (scaffold_project), object+verb (pdf_extract), and noun compounds (paper_search, project_tree, course_report). All names are lowercase, but there is no consistent verb_noun or action-oriented convention.

    Tool Count5/5

    Eight tools is comfortably within the ideal range for a personal MCP server, and each tool provides a genuinely different capability. None feel like padding, and the count is not overwhelming for an agent to choose from.

    Completeness4/5

    For the inferred domain of research/development personal utilities, the advertised workflows are largely covered: search then extract papers, inspect datasets, scaffold a project, generate a report, and view a file tree. Minor gaps exist (e.g., no dataset sample-row preview or paper metadata fetch by ID), but they are workable and not severe dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      A basic MCP server built with FastMCP framework that provides example tools including message echoing and server information retrieval. Supports both stdio and HTTP transports with Docker deployment capabilities.
      -
    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      A basic MCP server built with FastMCP framework that provides example tools including message echoing and server information retrieval. Supports both stdio and HTTP transports for integration with various MCP clients.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server built with FastMCP that features dynamic tool loading and modular management via a dedicated tool directory. It supports both stdio and HTTP transport modes, enabling efficient development and deployment of custom MCP tools.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      A high-performance personal Model Context Protocol (MCP) server built with the FastMCP Python framework.
      MIT