๐ Latitude MCP Server ๐
Stop copy-pasting prompts. Start managing them like a pro.
The complete MCP server for Latitude.so prompt management. Create projects, version prompts, push from local files, run AI conversations โ all from your AI assistant or CLI.
๐งญ Quick Navigation
โก Get Started โขโจ Features โข๐ ๏ธ Tools โข๐ Resources โข๐ป CLI
latitude-mcp-server gives your AI assistant superpowers for managing prompts on Latitude.so. Instead of switching between your IDE, Latitude dashboard, and AI chat, your AI can now create projects, version prompts, push content from local files, and even run prompts directly.
๐Project Management Create & list projects |
๐Version Control Drafts, publish, merge |
๐Prompt CRUD Push from files or inline |
๐คAI Execution Run prompts, chat, stream |
How it works:
- You: "Push my local prompt file to Latitude draft"
- AI: Reads file, extracts prompt path from filename, pushes to your project
- You: "Now run it with these parameters"
- AI: Executes prompt, streams response, maintains conversation
- Result: Full prompt lifecycle without leaving your IDE
๐ฅ Why This Beats Manual Management
Managing prompts manually is a context-switching nightmare. This MCP server makes traditional workflows look ancient.
| โ The Old Way (Pain) | โ The MCP Way (Glory) |
|
|
We're not just wrapping an API. We're enabling AI-native prompt development with file-based workflows, automatic path derivation, and streaming execution.
๐ Get Started in 60 Seconds
1. Get Your API Key
- Go to app.latitude.so/settings
- Create or copy your API key
- That's it โ one key, all features unlocked
2. Configure Your MCP Client
| Client | Config Location | Docs |
|---|---|---|
| ๐ฅ๏ธ Claude Desktop | claude_desktop_config.json |
Setup |
| โจ๏ธ Claude Code | ~/.claude.json or CLI |
Setup |
| ๐ฏ Cursor | .cursor/mcp.json |
Setup |
| ๐ Windsurf | MCP settings | Setup |
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"latitude": {
"command": "npx",
"args": ["latitude-mcp-server"],
"env": {
"LATITUDE_API_KEY": "your-api-key-here"
}
}
}
}
Claude Code (CLI)
One command setup:
claude mcp add latitude npx \
--scope user \
--env LATITUDE_API_KEY=your-api-key-here \
-- latitude-mcp-server
Or manually add to ~/.claude.json:
{
"mcpServers": {
"latitude": {
"command": "npx",
"args": ["latitude-mcp-server"],
"env": {
"LATITUDE_API_KEY": "your-api-key-here"
}
}
}
}
Cursor/Windsurf
Add to .cursor/mcp.json or MCP settings:
{
"mcpServers": {
"latitude": {
"command": "npx",
"args": ["latitude-mcp-server"],
"env": {
"LATITUDE_API_KEY": "your-api-key-here"
}
}
}
}
โจ Pro Tip: The server outputs in TOON format by default โ a token-efficient notation that uses 30-60% fewer tokens than JSON, keeping your LLM context lean.
โจ Feature Breakdown
| Feature | What It Does | Why You Care |
|---|---|---|
๐ Projectslist & create |
Manage Latitude projects | Organize prompts by use case |
๐ Versionsdraft โ live |
Git-like version control | Safe iteration without breaking prod |
๐ Promptsfull CRUD |
Create, read, update prompts | Complete prompt lifecycle |
๐ File Pushlocal โ cloud |
Push prompts from local files | IDE-native workflow |
๐ค Executionrun & chat |
Execute prompts with params | Test directly from AI |
๐ Logsmonitoring |
View execution history | Debug and optimize |
๐ Streamingreal-time |
Stream AI responses | See results as they generate |
๐ ๏ธ Tool Reference
This server provides 18 MCP tools covering the complete Latitude API plus built-in documentation.
| ๐Projects | ๐Versions | ๐Prompts | ๐คExecution | ๐Operations | ๐Docs |
list_projects create_project |
list_versions get_version create_version publish_version |
list_prompts get_prompt push_prompt push_prompt_from_file |
run_prompt chat get_conversation |
list_logs create_log trigger_evaluation |
help get_docs |
๐ Documentation Tools (AI Self-Learning)
The server includes self-documenting capabilities so AI agents can learn PromptL syntax on-demand without external lookups.
latitude_help
Get complete server overview โ all tools, documentation topics, and quick start workflow.
// No parameters required
{}
Returns: Server overview with tool list, doc topics, and suggested next actions.
AI agents should call this first to understand available capabilities.
latitude_get_docs
Get comprehensive PromptL documentation for a specific topic.
| Parameter | Type | Required | Description |
|---|---|---|---|
topic |
enum |
Yes | Documentation topic (see below) |
Available Topics:
| Topic | What You'll Learn |
|---|---|
overview |
What is PromptL, getting started |
structure |
Config section (YAML) + Messages (system, user, assistant) |
variables |
{{ }} syntax, expressions, defaults, assignments |
conditionals |
if/else/endif logic for dynamic content |
loops |
for/each iteration for few-shot examples |
references |
Include other prompts with <prompt> tag |
tools |
Function calling with JSON Schema parameters |
chains |
Multi-step prompts with <step> tags |
agents |
Multi-agent orchestration and collaboration |
techniques |
Few-shot, Chain-of-Thought, Tree-of-Thoughts, Role prompting |
{
"topic": "variables"
}
Returns: Comprehensive documentation with syntax, examples, best practices, and next steps.
Writing PromptL-Compliant Prompts
AI agents can use these tools to write valid PromptL prompts:
1. latitude_help โ Understand server capabilities
2. latitude_get_docs({ topic: "structure" }) โ Learn basic prompt structure
3. latitude_get_docs({ topic: "variables" }) โ Learn {{ }} syntax
4. latitude_push_prompt โ Push your prompt
5. latitude_run_prompt โ Test execution
Example learning flow for writing a prompt with conditionals:
AI: latitude_get_docs({ topic: "structure" })
โ Learns: Config section (---), message tags (<user>, <assistant>)
AI: latitude_get_docs({ topic: "conditionals" })
โ Learns: {{ if }}, {{ else }}, {{ endif }} syntax
AI: Now writes valid PromptL:
---
provider: OpenAI
model: gpt-4o
---
{{ if user.isPremium }}
You have access to all features!
{{ else }}
Upgrade for premium features.
{{ endif }}
<user>{{ question }}</user>
Project Tools
latitude_list_projects
List all projects in your Latitude workspace.
// No parameters required
{}
Returns: Array of projects with id, name, createdAt, updatedAt
latitude_create_project
Create a new project.
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | Project name |
{
"name": "My Awesome Prompts"
}
Version Tools
latitude_list_versions
List all versions (commits) for a project.
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId |
string |
Yes | Project ID |
{
"projectId": "27756"
}
latitude_get_version
Get details for a specific version.
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId |
string |
Yes | Project ID |
versionUuid |
string |
Yes | Version UUID |
latitude_create_version
Create a new draft version (branch).
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId |
string |
Yes | Project ID |
name |
string |
Yes | Version/commit name |
{
"projectId": "27756",
"name": "feature-new-tone"
}
latitude_publish_version
Publish a draft version to make it live.
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId |
string |
Yes | Project ID |
versionUuid |
string |
Yes | Draft version UUID |
title |
string |
No | Publication title |
description |
string |
No | Publication notes |
Prompt Tools
latitude_list_prompts
List all prompts in a version.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId |
string |
Yes | โ | Project ID |
versionUuid |
string |
No | "live" |
Version UUID |
latitude_get_prompt
Get a specific prompt by path.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId |
string |
Yes | โ | Project ID |
path |
string |
Yes | โ | Prompt path (e.g., "my-prompt") |
versionUuid |
string |
No | "live" |
Version UUID |
{
"projectId": "27756",
"path": "onboarding/welcome",
"versionUuid": "79b52596-7941-4ed3-82cf-23e13fa170db"
}
latitude_push_prompt
Push prompt content to a draft version.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId |
string |
Yes | โ | Project ID |
versionUuid |
string |
Yes | โ | Draft version UUID |
path |
string |
Yes | โ | Prompt path |
content |
string |
Yes | โ | Full prompt content with frontmatter |
force |
boolean |
No | false |
Overwrite if exists |
{
"projectId": "27756",
"versionUuid": "79b52596-7941-4ed3-82cf-23e13fa170db",
"path": "greeting",
"content": "---\nprovider: openai\nmodel: gpt-4o-mini\n---\nHello {{name}}! Welcome to our service."
}
latitude_push_prompt_from_file โญ
Push a prompt directly from a local file. This is the killer feature for IDE workflows.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId |
string |
Yes | โ | Project ID |
versionUuid |
string |
Yes | โ | Draft version UUID |
filePath |
string |
Yes | โ | Absolute path to prompt file |
promptPath |
string |
No | derived | Path in Latitude (auto-derived from filename) |
force |
boolean |
No | false |
Overwrite if exists |
Auto-derivation: If you push /path/to/my-prompt.md, it automatically becomes my-prompt in Latitude.
{
"projectId": "27756",
"versionUuid": "79b52596-7941-4ed3-82cf-23e13fa170db",
"filePath": "/Users/you/prompts/welcome-message.md"
}
Supported extensions: .md, .promptl, .txt
Execution Tools
latitude_run_prompt
Execute a prompt and get AI response.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId |
string |
Yes | โ | Project ID |
path |
string |
Yes | โ | Prompt path |
versionUuid |
string |
No | "live" |
Version UUID |
parameters |
object |
No | {} |
Template variables |
userMessage |
string |
No | โ | Additional user input |
stream |
boolean |
No | false |
Enable streaming |
{
"projectId": "27756",
"path": "greeting",
"parameters": { "name": "World" },
"stream": true
}
latitude_chat
Continue an existing conversation.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
conversationUuid |
string |
Yes | โ | Conversation UUID |
message |
string |
Yes | โ | User message |
stream |
boolean |
No | false |
Enable streaming |
latitude_get_conversation
Get full conversation history.
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationUuid |
string |
Yes | Conversation UUID |
Operations Tools
latitude_list_logs
Get execution logs for a prompt.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId |
string |
Yes | โ | Project ID |
documentUuid |
string |
No | โ | Filter by prompt UUID |
page |
number |
No | 1 |
Page number |
pageSize |
number |
No | 25 |
Results per page |
latitude_create_log
Create a log entry for external executions.
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId |
string |
Yes | Project ID |
documentPath |
string |
Yes | Prompt path |
messages |
array |
Yes | Conversation messages |
latitude_trigger_evaluation
Trigger an evaluation run for a prompt.
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId |
string |
Yes | Project ID |
evaluationUuid |
string |
Yes | Evaluation UUID |
๐ Resource Templates
Access Latitude data via MCP resources (read-only):
| Resource URI | Description |
|---|---|
latitude://projects |
List all projects |
latitude://projects/{projectId}/versions |
List versions for project |
latitude://projects/{projectId}/versions/{versionUuid}/prompts |
List prompts in version |
latitude://projects/{projectId}/versions/{versionUuid}/prompts/{path} |
Get specific prompt |
docs://latitude/help |
Server overview & quick start |
docs://latitude/{topic} |
PromptL documentation by topic |
๐ป CLI Reference
The server also works as a standalone CLI tool:
# Set your API key
export LATITUDE_API_KEY="your-key"
# Or use inline
LATITUDE_API_KEY="your-key" latitude-mcp projects list
Commands
# Projects
latitude-mcp projects list
latitude-mcp projects create "My Project"
# Versions
latitude-mcp versions list <projectId>
latitude-mcp versions create <projectId> "Draft Name"
# Prompts
latitude-mcp prompts list <projectId> -v <versionUuid>
latitude-mcp prompts get <projectId> <path> -v <versionUuid>
# Push (inline content)
latitude-mcp push <projectId> <versionUuid> <promptPath> --content "---\nprovider: openai\n---\nHello!"
# Push (from file) โญ
latitude-mcp push <projectId> <versionUuid> --file /path/to/prompt.md
# Run
latitude-mcp run <projectId> <path> -v <versionUuid> -p '{"name": "World"}'
# Chat
latitude-mcp chat <conversationUuid> -m "Follow up question"
Options
| Flag | Description |
|---|---|
-v, --version-uuid |
Version UUID (default: "live") |
-p, --parameters |
JSON parameters for run |
-m, --message |
Message for chat |
-s, --stream |
Enable streaming |
-o, --output-format |
"toon" or "json" (default: "toon") |
--file |
Path to prompt file |
--content |
Inline prompt content |
--force |
Force overwrite |
๐ฅ Recommended Workflows
Local Development Flow
1. Write prompt in your IDE: /prompts/my-feature.md
2. AI: "Push this to my Latitude draft"
โ latitude_push_prompt_from_file
3. AI: "Run it with test parameters"
โ latitude_run_prompt
4. Iterate on content locally
5. AI: "Push the updated version"
6. AI: "Publish to live"
โ latitude_publish_version
Prompt Audit Flow
1. AI: "List all my Latitude projects"
โ latitude_list_projects
2. AI: "Show me all prompts in project 27756"
โ latitude_list_prompts
3. AI: "Get the content of the onboarding prompt"
โ latitude_get_prompt
4. AI: "Check the execution logs"
โ latitude_list_logs
Conversation Testing Flow
1. AI: "Run the support-bot prompt"
โ latitude_run_prompt (returns conversationUuid)
2. AI: "Continue with: What about refunds?"
โ latitude_chat
3. AI: "Show the full conversation"
โ latitude_get_conversation
โ๏ธ Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
LATITUDE_API_KEY |
Yes | โ | Your Latitude API key |
LATITUDE_PROJECT_ID |
No | โ | Default project ID (skip projectId in all tools) |
LATITUDE_BASE_URL |
No | https://gateway.latitude.so |
API base URL |
Skip projectId with Default Project
Set LATITUDE_PROJECT_ID to avoid specifying projectId in every tool call:
{
"mcpServers": {
"latitude": {
"command": "npx",
"args": ["latitude-mcp-server"],
"env": {
"LATITUDE_API_KEY": "your-api-key",
"LATITUDE_PROJECT_ID": "27756"
}
}
}
}
When set, all tools that require projectId will use this default. You can still override per-call.
๐ฅ Common Issues & Quick Fixes
Expand for troubleshooting tips| Problem | Solution |
|---|---|
| "LATITUDE_API_KEY is required" | Set the env variable in your MCP config or shell |
| "Head commit not found" | Project has no published version โ use a specific versionUuid instead of "live" |
| "Provider API Key not found" | Add your LLM provider key (OpenAI, Anthropic) in Latitude settings |
| Push fails with "version is merged" | Can only push to draft versions โ create a new draft first |
| File push path wrong | The tool auto-derives from filename; use promptPath param to override |
๐ ๏ธ Development
# Clone
git clone https://github.com/yigitkonur/latitude-mcp-server.git
cd latitude-mcp-server
# Install
npm install
# Build
npm run build
# Test
npm test
# Run locally
LATITUDE_API_KEY=your-key node dist/index.js projects list
Built with ๐ because managing prompts should be as easy as writing code.
ISC ยฉ Yiฤit Konur