PubMed Custom Connector MCP Server

PubMed Custom Connector MCP Server

Enables users to search and fetch PubMed biomedical literature articles through natural language queries in Microsoft 365 Copilot.

Category
访问服务器

README

PubMed custom federated connector for Microsoft 365 Copilot

A Model Context Protocol (MCP) server that brings the public PubMed biomedical literature database into Microsoft 365 Copilot as a custom federated connector.

Users can ask Copilot natural-language questions ("find recent trials on CRISPR for sickle cell disease") and Copilot calls this server in real time to search and read PubMed articles.

What's in the box

Path Purpose
src/server.py MCP server exposing the read-only search and fetch tools
src/pubmed.py Async client for the NCBI E-utilities API (with rate-limit handling)
src/auth.py Microsoft Entra ID bearer-token validation (ASGI middleware)
src/config.py Environment-driven configuration
src/main.py ASGI entrypoint (Uvicorn)
Dockerfile Container image
azure.yaml, infra/ azd + Bicep for Azure Container Apps
scripts/smoke_test.py End-to-end MCP client test
docs/tenant-setup-guide.md Step-by-step tenant configuration + validation guide

Architecture

Microsoft 365 Copilot
   │  (1) user prompt
   ▼
Copilot orchestrator ──(2) bearer token from Microsoft enterprise token store──┐
   │                                                                            │
   │  (3) MCP search / fetch over HTTPS                                         │
   ▼                                                                            │
Azure Container Apps  ──(4) validate Entra JWT (issuer, audience, client app)──┘
   │
   │  (5) NCBI E-utilities (esearch / esummary / efetch)
   ▼
PubMed (public)

MCP tools

  • search(query, max_results){ "results": [ { id, title, url, snippet } ] } where id is the PubMed PMID.
  • fetch(id){ id, title, text, url, metadata } where text is the article abstract and metadata includes journal, authors, publication date, and DOI.

Both tools are read-only.

Quick start (local)

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt

# Run without auth for local testing
$env:AUTH_REQUIRED = "false"
$env:NCBI_EMAIL    = "you@example.com"   # recommended by NCBI
python -m src.main

# In another terminal: end-to-end test
python scripts\smoke_test.py

Then point MCP Inspector at http://localhost:8000/mcp (transport: Streamable HTTP) to explore the tools interactively:

npx @modelcontextprotocol/inspector

Configuration

All configuration is via environment variables (see .env.example):

Variable Required Description
AUTH_REQUIRED no (default true) Enforce Entra bearer-token validation.
ENTRA_TENANT_ID when auth on Your Microsoft Entra tenant ID.
ENTRA_AUDIENCE when auth on Accepted token audience = the Application ID URI from the Teams Developer Portal SSO registration. Comma-separated list allowed.
ENTRA_ALLOWED_CLIENT_IDS no Allowed calling client app IDs. Defaults to the Microsoft enterprise token store ab3be6b7-f5df-413d-ac2d-abf1e3fd9c0b.
NCBI_API_KEY no NCBI API key for higher PubMed rate limits (10/sec vs 3/sec).
NCBI_EMAIL no Contact email reported to NCBI (recommended).
MCP_PATH no (default /mcp) Path of the MCP streamable-HTTP endpoint.
ALLOWED_HOSTS no (default *) Hosts allowed by the MCP transport-security (DNS-rebinding) check. * disables the check (recommended behind Azure ingress, where Entra auth still applies). Set explicit hostnames to enable strict checking.
ALLOWED_ORIGINS no (default *) Origins allowed by the DNS-rebinding check.
PORT no (default 8000) Listen port.

Deploy to Azure

azd auth login
azd env new pubmed-connector
azd env set AUTH_REQUIRED false   # first deploy: get the URL, then lock down
azd up

Full deployment, Entra SSO setup, M365 admin center registration, and validation steps are in docs/tenant-setup-guide.md.

Security notes

  • The connector exposes only public PubMed data, but the transport is still authenticated: every /mcp request must carry a valid Entra token whose audience matches your Application ID URI and whose calling app is the Microsoft enterprise token store.
  • /health is intentionally unauthenticated for container liveness probes.
  • The server is read-only and performs no writes to any system.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选