# MCP Server Configuration
To use the ADL MCP server with a client (like Claude Desktop or other MCP clients), add the following configuration:
## Configuration for MCP Client
Add this to your MCP client configuration file:
```json
{
"mcpServers": {
"adl": {
"command": "node",
"args": ["/path/to/ADL/mcp-server/server.js"],
"env": {
"GRAPHQL_URL": "http://localhost:4000/graphql"
}
}
}
}
```
## For Claude Desktop
On Windows, edit: `%APPDATA%\Claude\claude_desktop_config.json`
On macOS, edit: `~/Library/Application Support/Claude/claude_desktop_config.json`
On Linux, edit: `~/.config/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"adl": {
"command": "node",
"args": ["/absolute/path/to/ADL/mcp-server/server.js"],
"env": {
"GRAPHQL_URL": "http://localhost:4000/graphql"
}
}
}
}
```
## Available MCP Tools
Once configured, the following tools will be available:
### adl_list
Lists all architectural decision log entries.
**Usage:**
```
List all ADL entries
```
### adl_get
Gets a specific ADL entry by ID.
**Parameters:**
- `id` (string): The unique ID of the ADL entry
**Usage:**
```
Get ADL entry with ID abc123
```
### adl_create
Creates a new architectural decision log entry.
**Parameters:**
- `author` (string, required): The author of the decision
- `title` (string, required): The title of the decision
- `decision` (string, required): Detailed description of the architectural decision
- `factSheets` (array of strings, required): List of related SAP/LeanIX Fact Sheet names
- `status` (string, required): Either "Proposed" or "Approved"
**Usage:**
```
Create a new ADL entry:
- Author: John Doe
- Title: Adopt microservices architecture
- Decision: We will migrate from monolithic to microservices...
- Fact Sheets: ["API Gateway", "Service Mesh"]
- Status: Proposed
```
### adl_update
Updates an existing ADL entry.
**Parameters:**
- `id` (string, required): The unique ID of the ADL entry to update
- `author` (string, optional): Updated author name
- `title` (string, optional): Updated title
- `decision` (string, optional): Updated decision description
- `factSheets` (array of strings, optional): Updated list of fact sheets
- `status` (string, optional): Updated status ("Proposed" or "Approved")
**Usage:**
```
Update ADL entry abc123 to set status to Approved
```
### adl_delete
Deletes an ADL entry by ID.
**Parameters:**
- `id` (string, required): The unique ID of the ADL entry to delete
**Usage:**
```
Delete ADL entry with ID abc123
```
## Example Workflow
1. **List existing entries:**
```
List all ADL entries
```
2. **Create a new entry:**
```
Create a new ADL entry for using GraphQL as our API layer,
authored by Jane Smith, with status Proposed,
and related fact sheets: API Design, Integration Layer
```
3. **Update entry status:**
```
Update ADL entry [id] to change status to Approved
```
4. **View specific entry:**
```
Show me ADL entry [id]
```
## Testing MCP Server Standalone
You can test the MCP server directly:
```bash
# Start the GraphQL server first
npm run start:graphql
# In another terminal, start the MCP server
npm run start:mcp
# The MCP server will run on stdio and wait for JSON-RPC messages
```
## Troubleshooting
### MCP Server not connecting
- Ensure the GraphQL server is running on port 4000
- Check that the path to server.js is absolute in the config
- Verify Node.js is in your PATH
### GraphQL errors
- Confirm the GRAPHQL_URL environment variable is set correctly
- Test the GraphQL endpoint directly: http://localhost:4000/graphql
### MCP tools not appearing
- Restart your MCP client after updating the configuration
- Check the client's logs for configuration errors