Model Context Protocol (MCP) Server
Connect AI agents to your personalized context, skills, and workflows. Stop building orchestration. Start shipping agents.
What is MCP?
The Model Context Protocol (MCP) is an open standard for connecting AI agents to external data sources and tools. ContextFile.ai implements an MCP server that exposes your personalized context, skills, tasks, and use cases to any MCP-compatible AI client.
Getting Started
1Get an API Key
Navigate to API Keys in your dashboard and create a new API key. Make sure to save it securely - you'll only see it once.
Go to API Keys2MCP Server Endpoint
The MCP server is available at the following endpoint:
https://contextfile.ai/api/mcp3Configure Your Client
Add the MCP server to your AI client configuration (see examples below).
Manual Configuration
If you prefer to configure manually, use these examples for different clients.
Add to your Claude Desktop configuration file:
{
"mcpServers": {
"contextfile": {
"url": "https://contextfile.ai/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Config file locations:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Available Tools
Tools are executable actions that AI agents can invoke. Each tool requires specific scopes for authorization.
get_contextcontexts:readGet the user's context file content
Params: context_id (optional)
list_contextscontexts:readList all context files for the user
Params: limit, context_type
search_contextscontexts:readSearch across user's context files
Params: query (required), limit
get_skillskills:readLoad a specific skill by ID or name
Params: skill_id, skill_name
list_skillsskills:readList all available skills for the user
Params: limit, category, active_only
list_taskstasks:readList all available tasks for the user
Params: limit, category, active_only
run_tasktasks:executeExecute a task with input
Params: task_id (required), input (required), variables, context_id
execute_tasktasks:executeExecute a task workflow with variables
Params: task_id (required), variables, context_id
run_use_caseuse_cases:executeExecute a complete use case workflow
Params: use_case_id (required), input (required), variables
Available Resources
Resources provide read-only access to data. AI agents can read resources to get context, skills, tasks, and more.
context://primaryThe user's primary context file
context://allList of all user context files
context://{id}Specific context file by ID
skills://activeList of active user skills
skill://{id}Specific skill by ID
tasks://activeList of active user tasks
task://{id}Specific task by ID
use-cases://activeList of active use cases
use-case://{id}Specific use case by ID
profile://infoUser profile information
Available Prompts
Prompts are pre-configured templates that generate contextual messages. Dynamic prompts are automatically created from your active use cases.
context-summaryGet a summary of your context file
Args: context_id (optional)
skill-guideGet guidance on using a specific skill
Args: skill_name (required)
task-instructionsGet detailed instructions for a task
Args: task_id (required), include_context
introductionGenerate a professional introduction
Args: audience, length
expertise-areasList key expertise areas from context
Args: none
use-case-assembleAssemble a complete prompt from a use case
Args: use_case_id (required), variables
use-case-guideGet guidance on a use case workflow
Args: use_case_id (required)
use-case-listList available use cases
Args: category, active_only
usecase:{id}DynamicDynamic prompt - execute any active use case
Args: input (required), variables, context_id
Dynamic Prompts
usecase:{id}. This lets you execute any use case as a prompt directly.Example Usage
Execute a tool to get your primary context:
// Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_context",
"arguments": {}
}
}
// Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [{
"type": "text",
"text": "{ \"id\": \"..\", \"name\": \"My Context\", ... }"
}],
"isError": false
}
}Execute a use case workflow:
// Request
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "run_use_case",
"arguments": {
"use_case_id": "write-blog-post",
"input": "How to use MCP with ContextFile.ai",
"variables": {
"tone": "professional",
"length": "medium"
}
}
}
}
// Response includes the generated content
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [{
"type": "text",
"text": "{ \"use_case\": {...}, \"status\": \"completed\", ... }"
}],
"isError": false
}
}Authentication & Scopes
All MCP requests require authentication via API key. Each API key can have specific scopes that control what operations it can perform.
contexts:read- Read context filesskills:read- Read skillstasks:read- Read taskstasks:execute- Execute tasksuse_cases:execute- Execute use cases*- Full access (default for session auth)
- API Key: Authorization: Bearer cf_xxx
- OAuth Token: Authorization: Bearer cf_at_xxx
- Session: Cookie-based (browser requests)
Tips for Building with MCP
- Use get_context to provide AI agents with your personalized context automatically
- Combine skills and tasks to create powerful automated workflows
- Use run_use_case for complex multi-step operations
- Dynamic prompts (usecase:{id}) let you execute any use case as a prompt
- Resources provide read-only access - great for displaying data
- Scopes control what operations each API key can perform