Skip to content

Commit 20b6a49

Browse files
committed
Improved overview page
1 parent d267edc commit 20b6a49

File tree

1 file changed

+17
-33
lines changed

1 file changed

+17
-33
lines changed

Sources/SwiftMCP/SwiftMCP.docc/SwiftMCP.md

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,10 @@
11
# ``SwiftMCP``
22

3-
A framework for exposing Swift functions as tools that can be called by AI assistants.
3+
A Swift framework that makes it easy to expose your functions as Model Context Protocol (MCP) tools for AI assistants.
44

55
## Overview
66

7-
SwiftMCP provides a powerful way to expose Swift functions as tools that can be called by AI assistants. The framework offers:
8-
9-
- Documentation-driven tool definitions
10-
- Multiple transport options (HTTP+SSE, stdio)
11-
- OpenAPI specification generation
12-
- AI plugin manifest generation
13-
14-
### Documentation-Driven Development
15-
16-
Define your tools using Swift's native documentation comments. SwiftMCP automatically extracts descriptions, parameter info, and return types.
17-
18-
### Multiple Transport Options
19-
20-
Choose between HTTP+SSE for web integration or stdio for command-line tools. Easy to extend with custom transports.
21-
22-
### OpenAPI Compatible
23-
24-
Automatically generate OpenAPI specifications from your tool definitions for easy integration with existing tools.
25-
26-
### AI-Ready Integration
27-
28-
Generate AI plugin manifests and function schemas compatible with leading AI platforms.
29-
30-
## Getting Started
31-
32-
To start using SwiftMCP, first create a server that exposes your tools:
7+
SwiftMCP lets you turn any Swift function into an MCP tool with just a single decorator. It handles all the complexity of JSON-RPC communication, parameter validation, and documentation generation, letting you focus on writing your tool's logic.
338

349
```swift
3510
@MCPServer
@@ -41,13 +16,22 @@ class Calculator {
4116
}
4217
```
4318

44-
Then choose a transport to expose your server:
19+
The framework automatically:
20+
- Extracts documentation from your Swift comments to describe tools
21+
- Validates and converts parameters to the correct types
22+
- Generates OpenAPI specifications for AI integration
23+
- Provides multiple transport options (HTTP+SSE, stdio)
4524

46-
```swift
47-
let calculator = Calculator()
48-
let transport = HTTPSSETransport(server: calculator)
49-
try await transport.run()
50-
```
25+
### Key Features
26+
27+
- **Documentation-Driven**: Your standard Swift documentation comments are automatically turned into tool descriptions, parameter info, and return type documentation.
28+
- **Type-Safe**: All parameters are automatically validated and converted to their correct Swift types.
29+
- **AI-Ready**: Built-in support for OpenAPI specification generation and AI plugin manifests.
30+
- **Flexible Transport**: Choose between HTTP+SSE for web applications or stdio for command-line tools.
31+
32+
## Next Steps
33+
34+
Start with <doc:GettingStarted> to create your first MCP server, then explore <doc:CoreConcepts> to understand how SwiftMCP uses documentation to power AI interactions.
5135

5236
## Topics
5337

0 commit comments

Comments
 (0)