Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/allow_server_description_to_be_configured.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
default: minor
---

# Allow server "description" to be configured

Example:

```yaml title="config.yaml"
server_info:
name: "Acme Corp GraphQL Server"
version: "2.0.0"
title: "Acme MCP Server"
website_url: "https://acme.com/mcp-docs"
description: "MCP server for Acme Corp's GraphQL API"
```
1 change: 1 addition & 0 deletions crates/apollo-mcp-server/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ mod test {
version: None,
title: None,
website_url: None,
description: None,
},
custom_scalars: None,
endpoint: Endpoint(
Expand Down
15 changes: 13 additions & 2 deletions crates/apollo-mcp-server/src/server/states/running.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,7 @@ impl ServerHandler for Running {
title: self.server_info.title().map(|s| s.to_string()),
version: self.server_info.version().to_string(),
website_url: self.server_info.website_url().map(|s| s.to_string()),
// TODO: Add support for this via configuration similar to above fields
description: None,
description: self.server_info.description().map(|s| s.to_string()),
},
capabilities,
..Default::default()
Expand Down Expand Up @@ -1429,6 +1428,13 @@ mod tests {
info.server_info.website_url,
Some("https://www.apollographql.com/docs/apollo-mcp-server".to_string())
);
assert_eq!(
info.server_info.description,
Some(
"A Model Context Protocol (MCP) server for exposing GraphQL APIs as tools."
.to_string()
)
);
assert_eq!(info.server_info.icons, None);
}

Expand All @@ -1444,6 +1450,7 @@ mod tests {
version: Some("3.0.0-beta".to_string()),
title: Some("Custom GraphQL Server".to_string()),
website_url: Some("https://my-server.example.com/docs".to_string()),
description: Some("A custom MCP server for testing".to_string()),
};

let running = Running {
Expand Down Expand Up @@ -1482,6 +1489,10 @@ mod tests {
info.server_info.website_url,
Some("https://my-server.example.com/docs".to_string())
);
assert_eq!(
info.server_info.description,
Some("A custom MCP server for testing".to_string())
);
}

mod sse_resumability {
Expand Down
9 changes: 9 additions & 0 deletions crates/apollo-mcp-server/src/server_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ pub struct ServerInfoConfig {

/// URL to the server's website or documentation
pub website_url: Option<String>,

/// A brief description of the server
pub description: Option<String>,
}

impl ServerInfoConfig {
Expand All @@ -37,4 +40,10 @@ impl ServerInfoConfig {
.as_deref()
.or(Some("https://www.apollographql.com/docs/apollo-mcp-server"))
}

pub fn description(&self) -> Option<&str> {
self.description.as_deref().or(Some(
"A Model Context Protocol (MCP) server for exposing GraphQL APIs as tools.",
))
}
}
4 changes: 3 additions & 1 deletion docs/source/config-file.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@
| `name` | `string` | `"Apollo MCP Server"` | The name of the MCP server implementation (used as a technical identifier) |
| `version` | `string` | Current crate version (e.g., `"1.5.0"`) | The version of the MCP server implementation |
| `title` | `string` | `"Apollo MCP Server"` | Human-readable title for the server (used for display in UIs) |
| `website_url` | `URL` | `"https://www.apollographql.com/docs/apollo-mcp-server"` | URL to the server's website or documentation |
| `website_url` | `URL` | `"https://www.apollographql.com/docs/apollo-mcp-server"` | URL to the server's website or documentation |

Check notice on line 470 in docs/source/config-file.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/config-file.mdx#L470

Use a leading article for descriptions in tables to ensure a complete and professional phrase. ```suggestion | `website_url` | `URL` | `"https://www.apollographql.com/docs/apollo-mcp-server"` | The URL to the server's website or documentation | ```
| `description` | `string` | `"A Model Context Protocol (MCP) server for exposing GraphQL APIs as tools."` | A brief description of the server |

Check notice on line 471 in docs/source/config-file.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/config-file.mdx#L471

Use the GraphQL scalar `String` instead of the lowercase `string` when defining a field type in a reference table. ```suggestion | `description` | `String` | "A Model Context Protocol (MCP) server for exposing GraphQL APIs as tools." | A brief description of the server | ```

All fields are optional. If not specified, sensible defaults are used. This is useful when wrapping Apollo MCP Server or branding it for specific use cases.

Expand All @@ -477,6 +478,7 @@
version: "2.0.0"
title: "Acme MCP Server"
website_url: "https://acme.com/mcp-docs"
description: "MCP server for Acme Corp's GraphQL API"

Check warning on line 481 in docs/source/config-file.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/config-file.mdx#L481

Use double quotes for string values in YAML and JSON configurations to ensure valid parsing and consistency. ```suggestion description: "MCP server for Acme Corp's GraphQL API" ```
```

## Example config files
Expand Down
Loading