
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@fluree/fluree-mcp-server
Advanced tools
A TypeScript/Node.js implementation of the Model Context Protocol (MCP) server for Fluree database access.
npm install @fluree/fluree-mcp-server
# or
yarn add @fluree/fluree-mcp-server
yarn install
yarn build
# Development mode
yarn dev
# Production mode
yarn start
# Watch mode for development
yarn watch
# CLI Arguments
yarn dev --help # Show all available options
yarn dev --dataset "user/dataset" # Single dataset mode
yarn dev --data-agent "agent-name" # Data agent mode (multiple datasets)
yarn dev --data-model-dataset "company/schema" # Separate dataset for data model
yarn dev --fluree-api-key "handle=your_api_key" # API key authentication
yarn dev --nexus-session-token "your_token" # Session token authentication
yarn dev --transport stdio # Override transport type
yarn dev --port 8080 # Custom port
yarn dev --dataset-policy "ds1=policy1,policy2" # Dataset policies
# Note: --dataset and --data-agent are mutually exclusive
# Environment Variables
LOG_LEVEL=debug yarn dev # Enable debug logging
MCP_TRANSPORT=sse yarn dev # Set transport via environment
Add the following to your Claude Desktop configuration:
{
"mcpServers": {
"fluree": {
"command": "npx",
"args": ["@fluree/fluree-mcp-server"],
"env": {
"FLUREE_BASE_URL": "https://app.949824632714.flur.ee",
"FLUREE_DATASET": "your/dataset",
"FLUREE_API_KEY": "your-api-key",
"FLUREE_API_HANDLE": "your-handle"
}
}
}
}
Or if you prefer to install globally:
npm install -g @fluree/fluree-mcp-server
Then use:
{
"mcpServers": {
"fluree": {
"command": "fluree-mcp-server",
"env": {
"FLUREE_BASE_URL": "https://app.949824632714.flur.ee",
"FLUREE_DATASET": "your/dataset",
"FLUREE_API_KEY": "your-api-key",
"FLUREE_API_HANDLE": "your-handle"
}
}
}
}
The server can operate in one of two modes:
--dataset CLI arg or FLUREE_DATASET env var--dataset "user/my-dataset"--data-agent CLI arg or FLUREE_DATA_AGENT env var--data-agent "my-agent"Important: These modes are mutually exclusive. You cannot specify both a dataset and a data agent.
The server supports configuration via environment variables or a .env file:
Core Configuration:
MCP_TRANSPORT: Transport type (stdio, sse, http) - default: sseFLUREE_BASE_URL: Fluree instance URLBIND_ADDRESS: Server bind address - default: 127.0.0.1SERVER_PORT: Server port - default: 3456LOG_LEVEL: Log level (error, warn, info, debug) - default: infoSession Configuration:
FLUREE_DATASET: Single dataset to use (conflicts with FLUREE_DATA_AGENT)FLUREE_DATA_AGENT: Data agent to use for accessing multiple datasets (conflicts with FLUREE_DATASET)DATA_MODEL_DATASET: Optional dataset to use for fetching the data model (works with either FLUREE_DATASET or FLUREE_DATA_AGENT)FLUREE_API_KEY: Default Fluree API keyFLUREE_API_HANDLE: Default Fluree API handleNEXUS_SESSION_TOKEN: Nexus session token (alternative to API key)POLICY_GROUPS: JSON string of dataset policiesLegacy (Deprecated):
STARTUP_DATASETS: Legacy comma-separated datasets (deprecated - use FLUREE_DATASET instead)Performance Configuration:
RATE_LIMIT_PER_MINUTE: Rate limiting - default: 100CIRCUIT_BREAKER_FAILURE_THRESHOLD: Circuit breaker failure threshold - default: 5CIRCUIT_BREAKER_TIMEOUT_SECS: Circuit breaker timeout - default: 60CIRCUIT_BREAKER_HALF_OPEN_MAX_CALLS: Half-open max calls - default: 3HTTP_REQUEST_TIMEOUT_MS: HTTP request timeout - default: 30000HTTP_CONNECTION_TIMEOUT_SECS: HTTP connection timeout - default: 10Fallback Configuration:
DEFAULT_FLUREE_API_KEY: Fallback API keyDEFAULT_FLUREE_HANDLE: Fallback API handleCreate a .env file in the project root (copy from .env.example):
# Copy the example file
cp .env.example .env
# Edit with your configuration
nano .env
Example .env file:
MCP_TRANSPORT=stdio
FLUREE_BASE_URL=https://app.949824632714.flur.ee
FLUREE_QUERY_URL=https://api.fluree.cloud
STARTUP_DATASETS=your/dataset
DATA_MODEL_DATASET=company/shared-schema
FLUREE_API_KEY=your-api-key
FLUREE_API_HANDLE=your-handle
get_data_modelRetrieves and caches the data model schema from configured Fluree datasets.
sparql_queryExecutes SPARQL queries against session datasets with automatic FROM clause injection.
Parameters:
query (required): The SPARQL query to executefluree://sessionCurrent session information including datasets, policies, and cache status.
fluree://data-modelThe currently cached data model schema if available.
sparql_query_helperGenerate SPARQL queries from natural language descriptions using the data model.
data_model_summarizerCreate user-friendly summaries of complex data models.
sparql_error_handlerAnalyze SPARQL errors and provide corrected queries.
The server supports flexible data model sourcing:
By default, the data model is fetched from the same datasets used for SPARQL queries.
You can optionally specify a different dataset for fetching the data model:
# CLI
yarn dev --dataset "company/customer-data" --data-model-dataset "company/shared-schema"
# Environment Variable
STARTUP_DATASETS=company/customer-data
DATA_MODEL_DATASET=company/shared-schema
This is useful for:
The server is built with:
The server distinguishes between:
This approach helps LLMs learn from query mistakes while properly handling system failures.
# Install dependencies
yarn install
# Start development server
yarn dev
# Build for production
yarn build
# Run built version
yarn start
MIT
FAQs
TypeScript MCP server for Fluree database access
We found that @fluree/fluree-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.