The DraCor MCP server enables seamless interaction with the Drama Corpora Project API, allowing Claude and other LLMs to analyze dramatic texts, character networks, and play information across different languages and periods. This server bridges the gap between large language models and structured drama corpora data.
pip install uv
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .
mcp install dracor_mcp_fastmcp.py # Recommended (v1 API)
For testing and development purposes:
mcp dev dracor_mcp_fastmcp.py
This launches the MCP Inspector for interactive tool and resource testing.
Configure Claude to use the DraCor MCP server by adding this to your Claude configuration file:
{
"mcpServers": {
"DraCor API v1": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"--with",
"requests",
"--with",
"pydantic",
"--with",
"python-multipart",
"mcp",
"run",
"/path/to/dracor-mcp/dracor_mcp_fastmcp.py"
],
"env": {
"DRACOR_API_BASE_URL": "https://dracor.org/api/v1"
}
}
}
}
Replace /path/to/dracor-mcp/
with the actual path to your dracor-mcp directory.
To use a different server such as staging:
"env": {
"DRACOR_API_BASE_URL": "https://staging.dracor.org/api/v1"
}
If you prefer using Docker:
docker build -t dracor-mcp .
docker run dracor-mcp
For the FastMCP implementation:
docker run -e IMPLEMENTATION=fastmcp dracor-mcp
Once installed in Claude Desktop, you can interact with the DraCor API through natural language queries.
Ask Claude about available corpora:
Can you list all available drama corpora in DraCor?
Get information about specific plays:
Tell me about Goethe's Faust in the German corpus
Analyze character networks:
Analyze the character network in Hamlet from the Shakespeare corpus
Analyze character relationships:
What are the strongest character relationships in Pushkin's Boris Godunov?
Compare different plays:
Compare Goethe's Faust and Schiller's Die Räuber in terms of network density and character count
Identify influential characters:
Who are the most central characters in Shakespeare's Hamlet based on speaking time and relationships?
Analyze gender representation:
Analyze the gender distribution and representation in Molière's Le Misanthrope
Find characters across multiple plays:
Find all plays that feature a character named "Hamlet" or similar
Analyze complete play texts:
Provide a comprehensive analysis of the full text of Goethe's Faust
Extract themes and motifs:
What are the main themes and motifs in the full text of Shakespeare's Hamlet?
Examine language patterns:
Analyze the language patterns and style in Chekhov's The Cherry Orchard
Analyze play structure:
Analyze the structure of Molière's Le Misanthrope in terms of acts, scenes, and dialogue distribution
Compare different playwrights:
Compare the network structures in plays by Shakespeare and Molière
Examine historical context:
Put Pushkin's Boris Godunov in its historical context and analyze how this is reflected in the character network
If you encounter issues:
mcp dev dracor_mcp_fastmcp.py
Remember that the DraCor API is publicly accessible with rate limits, so be mindful of excessive requests.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "DraCor-API-v1" '{"command":"uv","args":["run","--with","mcp[cli]","--with","requests","--with","pydantic","--with","python-multipart","mcp","run","/path/to/dracor-mcp/dracor_mcp_fastmcp.py"],"env":{"DRACOR_API_BASE_URL":"https://dracor.org/api/v1"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"DraCor API v1": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"--with",
"requests",
"--with",
"pydantic",
"--with",
"python-multipart",
"mcp",
"run",
"/path/to/dracor-mcp/dracor_mcp_fastmcp.py"
],
"env": {
"DRACOR_API_BASE_URL": "https://dracor.org/api/v1"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"DraCor API v1": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"--with",
"requests",
"--with",
"pydantic",
"--with",
"python-multipart",
"mcp",
"run",
"/path/to/dracor-mcp/dracor_mcp_fastmcp.py"
],
"env": {
"DRACOR_API_BASE_URL": "https://dracor.org/api/v1"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect