DnD 5e MCP Server
Enables executing GraphQL queries and exploring the schema of the D&D 5e SRD GraphQL API, providing access to D&D 5e rules data.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
DnD 5e MCP Server
MCP Server que expõe a API GraphQL do D&D 5e SRD para LLMs via Model Context Protocol. Compatível com Claude Desktop e ChatGPT.
Funcionalidades
2 tools:
graphql_query(execução de queries) +explore_schema(introspecção dinâmica de tipos)1 prompt:
dnd5e_guide— guia detalhado com exemplos, sob demanda, com contexto player/dm/generalinstructionsauto-injetado no system prompt do cliente (schema, Union types, filtros tipados)Cache Redis com stale-while-revalidate baseado em metadados
Dual transport: Streamable HTTP + SSE (legado)
Rate limiting por IP, CORS configurável, graceful shutdown
Docker Compose com healthchecks em ambos os serviços
Related MCP server: GraphQL MCP Toolkit
Quick Start
1. Configurar variáveis de ambiente
cp .env.example .env
# Editar .env se necessário (os defaults funcionam para deploy local)2. Subir os containers
docker compose up --build -dAguardar ambos os serviços ficarem healthy:
docker compose ps
# NAME STATUS PORTS
# mcp-mcp-1 Up (healthy) 0.0.0.0:3000->3000/tcp
# mcp-redis-1 Up (healthy) 6379/tcp3. Verificar
curl http://localhost:3000/health
# {"status":"ok","redis":true,"activeSessions":0,"uptime":...}Rebuild completo
docker compose down
docker compose up --force-recreate --build --remove-orphans -dConfiguração de Clientes MCP
Claude Desktop
Adicionar ao claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"dnd-5e": {
"url": "http://localhost:3000/mcp"
}
}
}Reiniciar o Claude Desktop após salvar.
Produção
{
"mcpServers": {
"dnd-5e": {
"url": "https://mcp.dnd.carromeu.com/mcp"
}
}
}Variáveis de Ambiente
Variável | Default | Descrição |
|
| Porta mapeada no host (Docker) |
|
| Ambiente |
|
| URL do upstream GraphQL |
|
| Timeout upstream (ms) |
|
| Staleness do cache (segundos) |
|
| Janela do rate limit (ms) |
|
| Requests por IP por janela |
|
| Sessions concorrentes (HTTP + SSE) |
|
| TTL de inatividade (ms) |
|
| Tamanho máximo de resposta (bytes) |
|
| Origens permitidas para CORS |
Desenvolvimento Local
Sem Docker (requer Redis rodando separadamente):
npm install
npm run dev # tsx com hot reloadBuild e execução:
npm run build
npm startEndpoints
Método | Path | Descrição |
|
| Streamable HTTP — init + requests |
|
| Streamable HTTP — SSE streaming |
|
| Streamable HTTP — encerrar session |
|
| SSE legado — estabelecer conexão |
|
| SSE legado — enviar mensagens |
|
| Health check (sem rate limiting) |
Arquitetura
Para detalhes técnicos completos sobre a arquitetura, decisões de design e stack tecnológico, consulte docs/tech-spec.md.
Tech Stack
Runtime: Node.js 22 LTS (Alpine) + TypeScript 5.x
MCP SDK:
@modelcontextprotocol/sdk1.27.xHTTP: Express 5.x
GraphQL:
graphql-request7.x comrawRequest()+errorPolicy: 'all'Cache: Redis 7 (Alpine) via
ioredis5.xInfra: Docker multi-stage build + Docker Compose
Licença
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
The Grafbase MCP server sits in front of a GraphQL API and exposes an MCP protocol-compliant interface that allows AI agents and LLMs to explore and query GraphQL APIs using natural language. It provides tools to search schemas, introspect types and fields, and execute GraphQL queries while minimizing context bloat by returning only relevant schema subsets, with built-in support for authentication, authorization, and configurable access control.
A Model Context Protocol server for Wix AI tools
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Provide detailed Pokémon data and information through a standardized MCP interface. Enable LLMs an…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.3MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.MIT
- AlicenseCqualityDmaintenanceA Model Context Protocol server for executing GraphQL queries, allowing AI models to interact with GraphQL APIs through introspection and query execution.3MIT
- AlicenseNot gradedqualityDmaintenanceConnects AI assistants to Dungeons & Dragons 5e game information via the Model Context Protocol, enabling queries for spells, monsters, equipment, and more.55MIT