- Home
- MCP servers
- FoodBlock
FoodBlock
- javascript
0
GitHub Stars
javascript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can use the FoodBlock MCP Server to store, verify, and federate food data across actors, places, and actions. It provides a content-addressable data model with provenance, tamper evidence, and offline capabilities so you can share trustworthy information across the food ecosystem.
How to use
Connect your MCP client to a FoodBlock server to read, create, and update blocks, follow provenance chains, and participate in federation with other servers. Use the standard block types to model actors, products, transfers, inspections, and reviews, then rely on cryptographic signatures for authenticity and Merkle-like proofs for selective disclosure when needed.
How to install
Prerequisites: install Node.js (version 14+ recommended). You may also want npm for package management.
Step by step, your flow looks like this.
# 1) Clone the repository that contains the FoodBlock MCP server and the sandbox for local testing
git clone https://example.com/foodxdevelopment/foodblock.git
cd foodblock
# 2) Use the sandbox for a zero-setup test server
cd sandbox
node server.js
Notes on usage
- The sandbox ships with a complete bakery-like dataset and vocabularies you can reference when experimenting with blocks, templates, and federation.
- The MCP HTTP API is reachable at the local server in the sandbox examples. Use the provided endpoints to create blocks, fetch chains, or discover federated servers.
Troubleshooting and tips
- If the server won’t start, verify Node.js is installed and that you are in the correct directory when launching the sandbox server. Check that port 3111 is not in use by another process.
Available tools
create
Create a new FoodBlock with a specific type, initial state, and references to other blocks.
update
Create an updated version of a block, preserving history and linking to the original.
hash
Compute the deterministic SHA-256 hash for a block's canonical JSON representation.
chain
Follow the update chain backwards to reveal provenance history.
tree
Build the full provenance tree by resolving all refs recursively.
head
Identify the latest version in an update chain.
sign
Sign a block with an author key using Ed25519 for authenticity.
verify
Verify a signed block wrapper with the corresponding public key.
generateKeypair
Create a new Ed25519 key pair for signing blocks.
tombstone
Create a tombstone to erase content while preserving graph structure.
offlineQueue
Enable offline block creation with batch synchronization to a server.
registry
Alias-based human readable references for block lookup during creation.
parse
Parse a single line of FoodBlock Notation into structured data.
parseAll
Parse multiple lines of FoodBlock Notation into blocks.
explain
Generate a human-readable narrative from a block’s provenance.
toURI
Convert a block to a compact fb: URI for sharing.
fromURI
Parse an fb: URI back into block references.
createTemplate
Create a reusable workflow pattern as an observe.template block.
fromTemplate
Instantiate a template into real blocks with overrides.
discover
Fetch a server’s discovery document for federation.
federatedResolver
Resolve blocks across multiple servers in priority order.
createVocabulary
Define a vocabulary block for canonical field names and aliases.
mapFields
Extract field values from natural language text using a vocabulary.
VOCABULARIES
Built-in vocabularies for domains like bakery, farm, and restaurant.
quantity
Create validated quantity objects for weight, volume, or temperature.
transition
Validate workflow state transitions against a vocabulary map.
nextStatuses
Get valid next statuses for a given workflow state.
localize
Resolve locale-specific text from multilingual state fields.
forward
Find references to a given block hash grouped by role.
recall
Trace downstream references to explore contamination paths or lineage.
downstream
Identify all downstream substance blocks that use a given ingredient.
merkleize
Build a Merkle tree from a state for selective disclosure.
selectiveDisclose
Reveal specific fields with a Merkle proof.
verifyProof
Verify a selective disclosure proof against a Merkle root.
merge
Resolve forks between update chains by creating a merge block.
attest
Create an attestation block validating a claim with confidence levels.
dispute
Create a dispute block challenging a claim.
trustScore
Compute a net trust score from attestations and disputes.
createSnapshot
Summarize blocks into a snapshot with a Merkle root for archival verification.