Fibery MCP GraphQL Server
# Fibery MCP GraphQL Server
This is a Model Context Protocol (MCP) server that provides tools to introspect the Fibery GraphQL API to help your LLM to write valid graphql queries and mutations.
## Features
- **List Spaces and Types**: Fetches and lists all available GraphQL spaces and types in your Fibery account
- **Get Schema SDL**: Gets the complete GraphQL schema SDL for a Fibery space
- **Validate Fibery GraphQL**: Validates a generated GraphQL query or mutation for Fibery against the known schema
## Prerequisites
- Node.js (v20 or higher)
- Fibery account with API access
## Using with MCP Clients
This server implements the Model Context Protocol and can be used with any MCP-compatible client. The MCP endpoint is available at:
```json
{
"mcpServers": {
"fibery-mcp-graphql": {
"command": "node", // note: if using nvm, use the full path to the version of node you want to use
"args": ["/full-path-to/index.js"],
"env": {
"FIBERY_TOKEN": "your_fibery_token",
"FIBERY_URL": "your_fibery_domain.fibery.io"
}
}
}
}
```
## Installation
1. Clone the repository
2. Install dependencies:
```bash
bun install
```
## MCP Tools
### list_spaces_and_types
Lists all available GraphQL spaces and types in your Fibery account.
**Parameters**: None
**Response**:
```json
{
"spaces": [
{
"name": "Space Name",
"url": "https://your-domain.fibery.io/api/graphql/space/Space_Name",
"id": "Space_Name"
},
...
],
"count": 5
}
```
### get_schema_sdl
Gets the complete GraphQL schema SDL for a Fibery space. This includes all type definitions, queries, mutations, etc.
**Parameters**:
- `space_id`: The ID of the space to get the schema for (required)
**Response**:
```json
{
"space_id": "Space_Name",
"sdl": "type Query { ... } type Mutation { ... } ..."
}
```
### validate_fibery_graphql
Validates a generated GraphQL query or mutation for Fibery against the known schema. Returns any validation errors.
**Parameters**:
- `space_id`: The ID of the space to validate against (required)
- `query_to_validate`: The GraphQL query or mutation to validate (required)
**Response**:
```json
{
"valid": true,
"errors": []
}
```
## License
MIT
TDQS
Scored across 3 tools
The three tools target distinct stages: discovering space/type IDs, fetching the schema SDL, and validating a generated query. Boundaries are clear, though get_schema_sdl and validate_fibery_graphql both operate on 'the schema' and an agent could occasionally reach for the wrong one when debugging a query.
All names are snake_case verb_object (list_…, get_…, validate_…), which is predictable. Minor deviation: list_spaces_and_types uses a compound 'and' object and get_schema_sdl abbreviates, but the pattern is still readable.
Three tools is on the thin side for a GraphQL integration surface; the real work is pushed into freeform GraphQL strings rather than tool calls. It's a defensible minimal design, but borderline for the scope implied.
Discovery, introspection, and validation form a coherent loop, but there is no tool to actually execute a validated query/mutation, leaving the agent at a dead end unless execution happens outside this server. Read/write lifecycle coverage depends entirely on hand-written GraphQL the server never runs.