Servers

Servers Overview

Learn how MCP servers work in Agent Dojo and how they expose tools to AI clients.

What is an MCP Server?

A server is a custom MCP endpoint with a unique slug and URL. Each server bundles specific toolkits and their tools, providing a JSON-RPC 2.0 interface for AI clients.

When you create a server, Agent Dojo gives it a dedicated URL that any MCP-compatible client can connect to. The server handles all the protocol details, routing tool calls to the appropriate toolkits and returning structured results.

Server Properties

PropertyTypeDescription
idintegerUnique server identifier
slugstringURL-friendly identifier used in the server endpoint
namestringDisplay name of the server
descriptionstringOptional description of the server's purpose
urlstringFull endpoint URL for MCP connections
api_keystringServer-specific API key for authentication
toolkitsarrayArray of toolkit configurations attached to this server
is_activebooleanWhether the server is currently active and accepting requests
request_countintegerTotal number of requests the server has processed
last_used_attimestampWhen the server last received a request

How Servers Work

Your server gets a URL like https://api.agentdojo.dev/{slug}. Any MCP client can POST JSON-RPC requests to it. The server handles the following methods:

initialize

Establishes a session and returns server capabilities.

tools/list

Returns all available tools from the server's toolkits.

tools/call

Executes a specific tool with the provided arguments.

resources/list

Lists available resources exposed by the server.

resources/read

Reads the content of a specific resource.

prompts/list

Lists available prompt templates on the server.

prompts/get

Retrieves a specific prompt template with arguments.

ping

Health check to verify the server is responsive.

API Endpoints

MethodEndpointDescription
POST/mcp/serversCreate a new server
GET/mcp/serversList all servers
GET/mcp/servers/{id}Get server details
DELETE/mcp/servers/{id}Delete a server

Multi-Tenant Architecture

Servers are scoped by project via API key. Each API key belongs to a project, and servers created with that key are only visible and accessible within that project. This ensures complete isolation between different projects and teams.

# Each API key scopes to a specific project
# Server A (Project 1) cannot access Server B (Project 2)

curl https://api.agentdojo.dev/mcp/servers \
  -H "Authorization: Bearer YOUR_PROJECT_API_KEY"

# Only returns servers belonging to your project

Next Steps