Upload & Manage
Upload files, URLs, GitHub repos, and YouTube videos to your project
Chat & Ask
Ask questions about your documents with conversational memory
Extract Data
Extract structured data from documents using JSON Schema
Semantic Search
Retrieve relevant document chunks for custom RAG pipelines
How It Works
The Graphor MCP Server uses a Code Mode tool scheme. Instead of exposing individual API endpoints as separate tools, it exposes two powerful tools to your agent:- Documentation Search — The agent can query for documentation about the Graphor SDK, learning how to use any method on the fly.
- Code Execution — The agent writes TypeScript code against the Graphor SDK, which is then executed in an isolated sandbox. The results are returned to the agent.
The sandbox environment does not have web or filesystem access. All operations go through the Graphor SDK.
Installation
Prerequisites
- Node.js 20+ (LTS recommended)
- A Graphor API key — Create one in the dashboard or see the API Tokens guide
Quick Start with npx
You can run the MCP Server directly vianpx without installing anything:
Setup by Client
Cursor
Install the MCP server directly in Cursor using the button below:mcp.json (found in Cursor Settings > Tools & MCP > New MCP Server):
VS Code
Install the MCP server in VS Code by clicking the link below: Install Graphor MCP for VS Code Or manually add it to your VS Codemcp.json (found via Command Palette > MCP: Open User Configuration):
Claude Code
Install the MCP server for Claude Code by running the following command in your terminal:.claude.json file (found in your home directory).
Other MCP Clients
For any MCP-compatible client, use the following configuration:See the full list of MCP-compatible clients at modelcontextprotocol.io/clients.
Available Tools
Once installed, your agent has access to two tools that together cover the entire Graphor API surface:search_docs
Search the Graphor SDK documentation to learn how to use any method.
| Parameter | Type | Description |
|---|---|---|
query | string | What to search for (e.g., “how to upload a file”, “extract structured data”) |
language | string | SDK language to search for (typescript) |
execute
Write and execute TypeScript code against the Graphor SDK in an isolated sandbox.
| Parameter | Type | Description |
|---|---|---|
code | string | TypeScript code defining an async function run(client) |
intent | string | Description of what the code does (used for analytics) |
console.log or returned from the function is sent back to the agent.
Example agent prompt: “Upload my-report.pdf and extract the title and author.”
What Your Agent Can Do
With the MCP server, your agent can perform any operation available in the Graphor SDK:Upload Documents
Upload Documents
Upload local files, web pages, GitHub repositories, and YouTube videos.
List & Manage Sources
List & Manage Sources
List all uploaded documents, check processing status, and delete files.
Process Documents
Process Documents
Reprocess documents with different parsing methods for better quality.
Chat with Documents
Chat with Documents
Ask questions with conversational memory and structured output.
Extract Structured Data
Extract Structured Data
Extract structured data from documents using JSON Schema.
Semantic Search (RAG)
Semantic Search (RAG)
Retrieve relevant document chunks for custom RAG pipelines.
Running Remotely
You can run the MCP server as a remote HTTP server using Streamable HTTP transport:| Flag | Description |
|---|---|
--transport=http | Enables remote HTTP mode (Streamable HTTP transport) |
--port=<number> | Port to listen on (e.g., 3000) |
--socket=<path> | Run on a Unix socket instead of a TCP port |
Authentication for Remote Mode
Authorization can be provided via theAuthorization header using the Bearer scheme, or via the x-graphor-api-key header:
| Header | Equivalent Client Option | Security Scheme |
|---|---|---|
x-graphor-api-key | apiKey | HTTPBearer |
Remote Client Configuration
For clients connecting to a remote server (e.g., hosted athttp://localhost:3000):
Troubleshooting
Authentication errors
Authentication errors
Causes: Missing or invalid API keySolutions:
- Verify your
GRAPHOR_API_KEYis set correctly in the MCP configuration - Ensure the key starts with
grlm_ - Generate a new key in the Graphor dashboard
Server not connecting
Server not connecting
Causes: Node.js not installed, npx not available, or network issuesSolutions:
- Verify Node.js 20+ is installed:
node --version - Ensure
npxis available:npx --version - Try running the server manually first:
npx -y graphor-mcp@latest - Check your MCP client logs for error messages
Server not responding
Server not responding
Causes: Server crashed or timed outSolutions:
- Restart your MCP client
- Check if another process is using the same port (remote mode)
- Try a fresh install:
npx -y graphor-mcp@latest
Agent execution errors
Agent execution errors
Causes: Invalid code or SDK usageSolutions:
- Ask the agent to use the
search_docstool first to check the correct method signatures - Ensure your documents have been uploaded and processed before querying
- Check that file names and IDs match what is in your project
Next Steps
SDK Overview
Learn the full SDK API that your agent can use via the MCP server
Upload Sources
Detailed guide on uploading documents, URLs, GitHub repos, and videos
Chat with Documents
Ask questions and have conversations about your documents
Data Extraction
Extract structured data from documents with JSON Schema

