MCP.so
登录

Simple MCP Example with Claude and a Local JSON HTTP Server

@sunmer

基本信息

分类

AI 与智能体

传输方式

stdio

作者

sunmer

关于 Simple MCP Example with Claude and a Local JSON HTTP Server

Simple MCP server using Claude to interact with a local JSON server

#mcp#json-server#claude

Simple MCP Example with Claude and a Local JSON HTTP Server 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

Simple MCP Example with Claude and a Local JSON HTTP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is 🛠️ Simple MCP Example with Claude and a Local JSON HTTP Server?

A basic setup guide that demonstrates how to use Claude (MacOS desktop) to interact with a local mock JSON server via the Model-Computer Protocol (MCP). It is intended for developers learning how to integrate MCP tools with a local API.

How to use 🛠️ Simple MCP Example with Claude and a Local JSON HTTP Server?

Install dependencies with npm install, then run npm run mock-api and npm run mcp-server. Edit the claude_desktop_config.json file to add the MCP server configuration, restart Claude, and prompt it with commands like "get all posts" or "insert a post with id 500, title 'created by claude' and views 123".

Key features of 🛠️ Simple MCP Example with Claude and a Local JSON HTTP Server

  • Uses MCP to connect Claude to a local JSON server
  • Two MCP tools appear after configuration
  • Supports CRUD‑style prompts (get, insert)
  • Works with Claude for MacOS desktop
  • Requires Node.js and npm dependencies
  • Includes a testing inspector command

Use cases of 🛠️ Simple MCP Example with Claude and a Local JSON HTTP Server

  • Retrieve all posts from a local mock JSON server via Claude
  • Insert a new post with custom fields using natural language prompts
  • Test MCP tool functionality with the official inspector
  • Learn how to configure MCP servers in Claude Desktop

常见问题

1

What are the prerequisites?

Node.js installed, Claude for MacOS (download from Anthropic), and basic understanding of local servers and MCP tools.

2

How do I install and run the dependencies?

Run `npm install` in the project root, then `npm run mock-api` to start the JSON server and `npm run mcp-server` to start the MCP server.

3

How do I configure Claude to use the MCP server?

Edit the `claude_desktop_config.json` file (usually in `~/.claude/` or the app’s internal config folder) and add the MCP server configuration with the command `node` and the absolute path to `dist/index.js`.

4

What tools appear in Claude after configuration?

Two new MCP tools marked with a 🛠️ hammer icon appear below the input bar.

5

How can I test the MCP server?

Run `npx @modelcontextprotocol/inspector node build/index.js` and view the available resources at `http://127.0.0.1:6274/#resources`.

评论

AI 与智能体 分类下的更多 MCP 服务器