1. Conduid
  2. Developer Tools
  3. Mock Server
MCP server · Developer Tools

Mock Server

A zero-dependency, configurable mock MCP server for testing MCP clients and harnesses. Serves a correct MCP handshake over stdio (initialize, tools/list, tools/call). You describe tools and canned responses in a JSON file. Simulates errors and missing-argument handling. Perfect target for your existing conformance, audit, and load-test tools.

Unclaimed last commit 11 months ago devtools
39Low

Scored 15 days ago · breakdown

About Mock Server

Mock Server is an MCP server published by fengf233 in the Developer Tools category: a zero-dependency, configurable mock MCP server for testing MCP clients and harnesses. Serves a correct MCP handshake over stdio (initialize, tools/list, tools/call). You describe tools and canned responses in a JSON file. Simulates errors and missing-argument handling. Perfect target for your existing conformance, audit, and load-test tools.

The repository has 2 stars and 0 forks, with the last commit 11 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/fengf233/mcp-mock-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Mock Server

Powered by Claude · Grounded in docs

I know everything about Mock Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

MCP 服务器

基于 Model Context Protocol (MCP) 的模拟服务器,用于开发和测试 MCP 客户端。

功能

  • 工具调用:提供模拟工具,支持参数化模板
  • 提示词管理:动态生成提示词内容
  • 资源访问:提供模拟资源数据
  • 多传输支持:支持 StreamableHTTP 和 SSE 传输

快速开始

安装依赖

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 配置文件解析

使用示例

  1. 启动服务器:./mcp_server
  2. 使用 MCP 客户端连接:mcp_client -type http -url http://localhost:9999/mcp
  3. 在客户端中调用工具、获取提示词、查看资源

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Mock Server

How do I install Mock Server?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Mock Server safe to use with an AI agent?

Its trust score is 39 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Mock Server still maintained?

The last commit was 11 months ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.