Mock MCP Server 76210dfc

MCP开发工具

提供方 joerob-msft

开发工具 未标注 OAuth 授权 社区 / 第三方 VS Code

一个模拟MCP(模型上下文协议)代理服务器,支持两部分认证、SSE通知和基于CIMD的客户端身份验证,适用于开发和测试环境。

一句话选型结论

按资料字段整理

Mock MCP Server 76210dfc 属于开发工具类 MCP 服务器,传输方式未标注,OAuth 授权,可直接接入 VS Code,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类开发工具 传输方式未标注 鉴权OAuth 授权 部署方式未标注
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 4 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

开发工具
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量4暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

认证服务C#本地部署代理服务器SSE通知CIMD身份验证开发工具

安装与配置

未标注 OAuth 授权
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 4 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
代码与仓库操作

在对话里直接查代码、提 issue、走 PR,省掉来回切工具。

本地命令与脚本

把构建、测试、格式化这类重复命令交给模型执行。

接口联调与测试

让模型调你的接口、跑一遍用例,快速定位问题。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 4 个工具,职责相对集中,接入后不容易误操作。
  • 已适配 VS Code,换客户端不用重新研究配置。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好OAuth 授权对应的凭据,并按最小权限配置。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 VS Code 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Mock MCP Server 76210dfc当前 4 未标注 未标注 无 2026-05-17
Git 838e2ec1 12 stdio · 本地进程 本地部署 有 2026-05-17
Markitdown MCP 2c653a5f 1 stdio · 本地进程 本地部署 有 2026-05-17
JavaGuide 未标注 stdio · 本地进程 本地部署 有 2026-04-11
awesome-claude-skills 未标注 stdio · 本地进程 本地部署 有 2026-04-26
Context7 831acf40 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

开发工具
字段来自项目仓库与公开索引,中文说明由本站标注
提供方joerob-msft上游标注的维护方 joerob-msft
分类开发工具本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式OAuth 授权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

10.5 KB
来自项目仓库与上游目录的原文,未做删改

Mock MCP Server

A mock MCP (Model Context Protocol) proxy server with two-part authentication, SSE notifications, and CIMD-based client identity. Built as a .NET 8 ASP.NET Core app. Models a real-world architecture where an MCP proxy authenticates clients via CIMD (AAD App #1) and internally authenticates to a backend MCP server via a separate AAD app (App #2).

Two-Part Authentication Flow```

VS Code (MCP Client)
│
├─ CIMD OAuth ──→ AAD App #1 ──→ proxy token
│
├─ tools/list ──→ [discover_tools only]
│
├─ tools/call discover_tools ──→ elicitation URL
│ │
│ └─ User opens browser → /backend-auth/login
│ → Entra login (AAD App #2)
│ → Backend tokens stored server-side
│ → "Success, close window"
│
├─ tools/list ──→ [full tools list]
│
└─ tools/call echo ──→ proxy uses stored backend token internally


### Part 1: Proxy Auth (CIMD + AAD App #1)
1. Client discovers PRM at `/.well-known/oauth-protected-resource`
2. Client authenticates via CIMD OAuth flow (`/oauth/authorize` → `/oauth/token`)
3. Client receives a **proxy token** — this is the only token the client ever sees
4. With proxy token, `tools/list` returns only `discover_tools`

### Part 2: Backend Auth (AAD App #2, server-side)
5. Client calls `discover_tools` → receives elicitation URL
6. User opens URL in browser → authenticates against AAD App #2
7. Backend tokens (access + refresh) stored **server-side**, keyed by proxy token
8. Now `tools/list` returns full tools and `tools/call` works
9. Client continues using the same proxy token — backend tokens are never exposed

## Endpoints

| Method | Route | Description |
|--------|-------|-------------|
| GET | `/.well-known/oauth-protected-resource` | Protected Resource Metadata (PRM) |
| GET | `/.well-known/oauth-authorization-server` | OAuth Authorization Server Metadata |
| GET | `/oauth/authorize` | OAuth authorization endpoint (CIMD) |
| GET | `/oauth/callback` | Entra ID callback (proxy auth) |
| POST | `/oauth/token` | OAuth token endpoint (proxy auth) |
| GET/POST | `/mcp` | MCP JSON-RPC endpoint |
| GET | `/backend-auth/login` | Start backend auth (AAD App #2) |
| GET | `/backend-auth/callback` | Backend auth callback |
| GET | `/backend-auth/status` | Check backend auth status |
| GET | `/cimd-policy` | Current CIMD policy configuration |
| GET/POST | `/backend/mcp` | Backend MCP server (JSON-RPC + SSE) |

## Supported MCP Methods

- `initialize` - Returns server capabilities
- `tools/list` - Returns available tools (expands after consent)
- `tools/call` - Executes a tool call (echo, get_weather, calculate)
- `resources/list` - Returns available resources (empty)
- `prompts/list` - Returns available prompts (empty)

## Streaming Proxy Architecture (SSE Sidecar)

After backend auth completes, the proxy needs to receive server-initiated notifications from the backend MCP server. The **BackendSseManager** acts as an in-process SSE sidecar:

1. Client ↔ Proxy: SSE established at `initialize` (proxy token)
2. After backend auth: sidecar opens SSE to `GET /backend/mcp` (backend token)
3. Backend sends notification → sidecar reads it → relays via `McpServer.NotifyClient()` → written to client SSE
4. Tool calls are stateless POST forwarding (proxy → backend), no SSE involved

In production, the sidecar would be a separate Azure Container App per environment, keeping backend SSE connections off APIM.

## Configuration

### Auth Modes

Set `MCP_AUTH_MODE` in `local.settings.json`:

| Mode | Description |
|------|-------------|
| `mock` (default) | No external calls. Auth codes and tokens generated locally. Good for offline testing. |
| `entra` | Real Azure AD integration. Redirects to Entra ID for user authentication. Requires AAD app registration. |

### Auth Strategy

Set `MCP_AUTH_STRATEGY` in `local.settings.json`:

| Strategy | Description |
|----------|-------------|
| `cimd` (default) | Proxy acts as its own OAuth Authorization Server. Clients authenticate via CIMD. Works with any MCP client. |
| `entra-direct` | PRM points directly to Entra ID. VS Code uses WAM for silent auth (no browser popup). Only works with Entra-registered clients. |

### Environment Variables

#### Proxy Auth (AAD App #1)

| Variable | Default | Description |
|----------|---------|-------------|
| `MCP_AUTH_MODE` | `mock` | Auth mode: `mock` or `entra` |
| `MCP_AUTH_STRATEGY` | `cimd` | Auth strategy: `cimd` (proxy is OAuth AS) or `entra-direct` (Entra ID is AS) |
| `MCP_EXPOSED_SCOPE` | `Runtime.All` | Exposed scope name on AAD app (used in entra-direct PRM) |
| `AZURE_TENANT_ID` | `common` | Entra tenant ID |
| `AZURE_CLIENT_ID` | — | AAD App #1 client ID (proxy) |
| `AZURE_CLIENT_SECRET` | — | AAD App #1 client secret (only needed for CIMD strategy) |

#### Backend Auth (AAD App #2 — real MCP server)

| Variable | Default | Description |
|----------|---------|-------------|
| `BACKEND_CLIENT_ID` | — | AAD App #2 client ID (backend) |
| `BACKEND_CLIENT_SECRET` | — | AAD App #2 client secret |
| `BACKEND_TENANT_ID` | `AZURE_TENANT_ID` | Backend tenant (defaults to proxy tenant) |
| `BACKEND_SCOPES` | `openid profile offline_access` | Scopes for App #2 |

#### Other

| Variable | Default | Description |
|----------|---------|-------------|
| `MCP_VERBOSE_LOGGING` | `false` | Enable verbose request/response logging |
| `CIMD_POLICY_MODE` | `open` | CIMD client policy: `open`, `allowlist`, or `denylist` |
| `CIMD_ALLOWED_CLIENTS` | — | Semicolon-delimited list of allowed CIMD client patterns (used when mode=`allowlist`) |
| `CIMD_DENIED_CLIENTS` | — | Semicolon-delimited list of denied CIMD client patterns (used when mode=`denylist`) |

### CIMD Client Policy

Controls which MCP clients are permitted to authenticate via CIMD. The policy is evaluated **before** fetching the CIMD document (prevents SSRF from untrusted `client_id` URLs).

| Mode | Behavior |
|------|----------|
| `open` (default) | All CIMD clients allowed |
| `allowlist` | Only explicitly listed clients/domains permitted |
| `denylist` | All clients allowed except explicitly blocked ones |

**Pattern types** (semicolon-delimited in `CIMD_ALLOWED_CLIENTS` / `CIMD_DENIED_CLIENTS`):
- **Exact URL:** `https://vscode.dev/oauth/client-metadata.json`
- **Exact domain:** `vscode.dev` (matches any CIMD on that host)
- **Wildcard domain:** `*.microsoft.com` (matches subdomains only)

**Example — allowlist only VS Code and GitHub clients:**```json
{
  "Values": {
    "CIMD_POLICY_MODE": "allowlist",
    "CIMD_ALLOWED_CLIENTS": "https://vscode.dev/oauth/client-metadata.json;*.github.com"
  }
}

Example — block a specific client:```json
{
"Values": {
"CIMD_POLICY_MODE": "denylist",
"CIMD_DENIED_CLIENTS": "*.untrusted.dev"
}
}


**Check current policy:** `curl http://localhost:7071/cimd-policy`

### Entra Mode Setup (CIMD Strategy)

1. **App #1 (Proxy):** Register in Azure Portal, add redirect URI `http://localhost:7071/oauth/callback`
2. **App #2 (Backend):** Register separately, add redirect URI `http://localhost:7071/backend-auth/callback`
3. Set environment variables in `local.settings.json`:```json
   {
     "Values": {
       "MCP_AUTH_MODE": "entra",
       "MCP_AUTH_STRATEGY": "cimd",
       "AZURE_TENANT_ID": "your-tenant-id",
       "AZURE_CLIENT_ID": "app1-client-id",
       "AZURE_CLIENT_SECRET": "app1-secret",
       "BACKEND_CLIENT_ID": "app2-client-id",
       "BACKEND_CLIENT_SECRET": "app2-secret",
       "BACKEND_SCOPES": "api://app2-client-id/.default"
     }
   }
   ```

### Entra-Direct Setup (Silent Auth via WAM)

In this mode, VS Code authenticates silently using the user's existing Microsoft session — no browser popup needed. The PRM points directly to Entra ID as the authorization server.

1. **App #1 (Proxy):** Register in Azure Portal
2. **Expose an API** on App #1:
   - Add a scope (e.g., `Runtime.All`)
   - Pre-authorize VS Code's client ID: `aebc6443-996d-45c2-90f0-388ff96faa56`
3. **App #2 (Backend):** Register separately, add redirect URI `http://localhost:7071/backend-auth/callback`
4. Set environment variables in `local.settings.json`:```json
   {
     "Values": {
       "MCP_AUTH_MODE": "entra",
       "MCP_AUTH_STRATEGY": "entra-direct",
       "MCP_EXPOSED_SCOPE": "Runtime.All",
       "AZURE_TENANT_ID": "your-tenant-id",
       "AZURE_CLIENT_ID": "app1-client-id",
       "BACKEND_CLIENT_ID": "app2-client-id",
       "BACKEND_CLIENT_SECRET": "app2-secret",
       "BACKEND_SCOPES": "api://app2-client-id/.default"
     }
   }
   ```
   Note: `AZURE_CLIENT_SECRET` is not needed for entra-direct (the proxy is just a resource server, not an OAuth AS).

## Local Development

### Prerequisites

- .NET 8 SDK

### Running Locally```bash
dotnet run
# Server starts on http://localhost:7071

Testing the CIMD Flow```bash

1. Check Protected Resource Metadata

curl http://localhost:7071/.well-known/oauth-protected-resource

2. Check OAuth Authorization Server Metadata

curl http://localhost:7071/.well-known/oauth-authorization-server

3. Start authorization (opens redirect)

curl -v "http://localhost:7071/oauth/authorize?response_type=code&client_id=https://client.example.dev/oauth/metadata.json&redirect_uri=https://client.example.dev/oauth/callback&scope=mcp.tools.execute&state=test123"

4. Exchange code for token

curl -X POST http://localhost:7071/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=authorization_code&code=<AUTH_CODE>&client_id=https://client.example.dev/oauth/metadata.json"

5. Use token for MCP calls

curl -X POST http://localhost:7071/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{},"id":1}'


## Project Structure```
mock-mcp-server/
├── McpServer.cs               # Proxy server logic (MCP, OAuth/CIMD, SSE, backend auth)
├── BackendMcpServer.cs        # Simulated backend MCP server (tools, SSE notifications)
├── BackendSseManager.cs       # SSE sidecar — manages backend SSE connections per session
├── Program.cs                 # ASP.NET Core host, route mapping, config loading
├── MockMcpServer.csproj       # Project file (.NET 8 Web SDK)
├── local.settings.json        # Local dev settings (auth mode, credentials)
├── samplecalls.http           # HTTP test file for VS Code REST Client
├── APIHUB_MCP_INTEGRATION.md  # Architecture, requirements, and demo script
└── README.md

License

MIT

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
Mock MCP Server 76210dfc 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Mock MCP Server 76210dfc 怎么在 VS Code 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Mock MCP Server 76210dfc 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Mock MCP Server 76210dfc 需要 API Key 吗?

资料标注需要OAuth 授权认证,使用前准备好对应凭据,并按最小权限配置。

Mock MCP Server 76210dfc 支持哪些客户端?

资料标注支持 VS Code;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Mock MCP Server 76210dfc 能提供哪些能力?

资料显示约 4 个工具;能力标签包括 认证服务、C#、VS Code、开发工具。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。