MCP Project Management API
Programmatically create and delete projects using the Model Context Protocol (MCP) API.
Evergreen's Model Context Protocol (MCP) server now offers endpoints for programmatically managing your projects. This allows you to integrate project creation and deletion directly into your automated workflows or custom applications.
These operations require an API key or OAuth token with the write:projects permission.
Evergreen's MCP server now supports GET, POST, and DELETE HTTP methods, meaning clients can perform read, create, and delete operations.
Authentication
To use the Project Management API, you must authenticate with an API key or OAuth 2.0 access token that includes the write:projects permission.
- API Keys: When creating an API key in Settings → MCP Server, ensure the "Allow adding and removing projects" option is enabled (it's on by default for new keys).
- OAuth 2.0: When requesting an OAuth token, ensure your client requests the
write:projectsscope.
Requests without the necessary permission will be rejected with a 403 Forbidden status.
Endpoints
POST /api/mcp/projects
Creates a new project for your organization or personal account.
Requires: write:projects permission.
Request Body (JSON):
{
"domain": "string",
"sitemapUrl": "string" (optional)
}
domain(required): The primary domain of the website (e.g.,example.com). This will be used to generate the project's name and slug. Evergreen automatically normalizes the domain (e.g.,https://www.example.com/becomesexample.com).sitemapUrl(optional): The URL to the project's sitemap (e.g.,https://example.com/sitemap.xml). If provided, Evergreen will attempt to fetch and process it immediately after project creation. Must be anhttp(s)URL.
Responses:
-
200 OK: Project created successfully. Returns the new project's ID, name, and slug.{ "project": { "_id": "project_…", "name": "example.com", "slug": "example-com" }, "crawl": { "status": "started", "message": "Crawl initiated from sitemap. Check project dashboard for progress." } } -
400 Bad Request: InvaliddomainorsitemapUrlformat. -
401 Unauthorized: No valid authentication credentials provided. -
403 Forbidden: Authentication credentials lackwrite:projectspermission, or the API key is project-scoped (project-scoped keys cannot create or delete projects). -
409 Conflict: A project for the given domain already exists under your account.{ "error": "A project for example.com already exists.", "project": { "_id": "project_…", "name": "example.com", "slug": "example-com" } } -
403 Forbidden: Project limit reached for your account's plan.{ "error": "Project limit reached (X of Y on the Z plan). Remove a project or upgrade in Evergreen to add another." }
Example (using curl):
curl -X POST \
https://api.evergreensite.com/api/mcp/projects \
-H "Authorization: Bearer evg_…" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.com",
"sitemapUrl": "https://example.com/sitemap.xml"
}'
DELETE /api/mcp/projects/:slug
Deletes an existing project from your account.
Requires: write:projects permission.
Path Parameters:
slug(required): The unique slug of the project to delete (e.g.,example-com). Project slugs are derived from their domain.
Responses:
-
200 OK: Project deleted successfully.{ "message": "Project example-com deleted." } -
401 Unauthorized: No valid authentication credentials provided. -
403 Forbidden: Authentication credentials lackwrite:projectspermission, or the API key is project-scoped. -
404 Not Found: No project with the givenslugexists under your account.
Example (using curl):
curl -X DELETE \
https://api.evergreensite.com/api/mcp/projects/example-com \
-H "Authorization: Bearer evg_…"
