1.0.1 • Published 8 months ago

@mcpflow.io/mcp-model-context-protocol-and-fireproof-demo-json-document-server v1.0.1

Weekly downloads
-
License
Other
Repository
-
Last release
8 months ago

Model Context Protocol and Fireproof Demo: JSON Document Server

此包由 MCPFlow 打包并发布到npm仓库。

从LLM工具中存储和加载JSON文档

安装与使用

直接使用npx运行:

npx @mcpflow.io/mcp-model-context-protocol-and-fireproof-demo-json-document-server

或者先安装后使用:

# 安装
npm install @mcpflow.io/mcp-model-context-protocol-and-fireproof-demo-json-document-server

# 使用
npx @mcpflow.io/mcp-model-context-protocol-and-fireproof-demo-json-document-server

使用方法

Installation

Install dependencies:

npm install
npm build

工具函数

save_json_doc

Saves a JSON document to the database.

参数:

  • doc: The JSON document to save.

delete_json_doc

Deletes a JSON document from the database by its ID.

参数:

  • id: The ID of the document to delete.

load_json_doc

Loads a JSON document from the database by its ID.

参数:

  • id: The ID of the document to load.

query_json_docs

Queries JSON documents from the database, sorted by a specified field.

参数:

  • sort_field: The field to sort the results by.

原始信息

原始README

Model Context Protocol and Fireproof Demo: JSON Document Server

This is a simple example of how to use a Fireproof database in a Model Context Protocol server (used for plugging code and data into A.I. systems such as Claude Desktop).

This demo server implements a basic JSON document store with CRUD operations (Create, Read, Update, Delete) and the ability to query documents sorted by any field.

Installation

Install dependencies:

npm install
npm build

Running the Server

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "fireproof": {
      "command": "/path/to/fireproof-mcp/build/index.js"
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

1.0.1

8 months ago

1.0.0

8 months ago