{
"mcpServers": {
"mcp-mock-server": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
基于 Model Context Protocol (MCP) 的模拟服务器,用于开发和测试 MCP 客户端。
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
MIT. View license →
Is it maintained?
Last commit 131 days ago. 2 stars.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Persistent memory using a knowledge graph
Privacy-first. MCP is the protocol for tool access. We're the virtualization layer for context.
Pre-build reality check. Scans GitHub, HN, npm, PyPI, Product Hunt — returns 0-100 signal.
Monitor browser logs directly from Cursor and other MCP compatible IDEs.
MCP Security Weekly
Get CVE alerts and security updates for Mcp Mock Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
基于 Model Context Protocol (MCP) 的模拟服务器,用于开发和测试 MCP 客户端。
go mod tidy
编辑 mock.yaml 文件配置服务器参数:
server:
host: "0.0.0.0"
port: 9999
transport: "StreamableHTTP" # 或 "sse"
# 编译
go build
# 运行
./mcp_server
服务器将在 http://localhost:9999/mcp 启动。
在 mock.yaml 中定义工具:
tools:
- name: "get_weather"
description: "Get current weather for a city"
parameters:
- name: "city"
type: string #只支持字符串
required: true
mock_template: "The current weather in {{city}} is sunny, 25°C."
prompts:
- name: "summarize_article"
description: "Summarize a given article"
arguments:
- name: "article"
required: true
mock_template: "Summarize: {{article}}"
resources:
- name: "user_profile"
mime_type: "application/json"
uri: "internal://resources/user_profile.json"
mock_content: "{\"user_id\": \"{{user_id}}\"}"
mcp_server/
├── main.go # 服务器主程序
├── config.go # 配置加载和解析
├── registry.go # 工具、提示词、资源注册
├── mock.yaml # 服务器配置文件
├── go.mod # 模块定义
└── go.sum # 依赖校验
github.com/mark3labs/mcp-go/server:MCP 服务器库github.com/mark3labs/mcp-go/mcp:MCP 协议定义gopkg.in/yaml.v3:YAML 配置文件解析./mcp_servermcp_client -type http -url http://localhost:9999/mcp