Skip to content

Commit 57fc811

Browse files
committed
docs(README): Migrate README from AsciiDoc to Markdown format
1 parent 243eb91 commit 57fc811

File tree

3 files changed

+54
-56
lines changed

3 files changed

+54
-56
lines changed

README.adoc

Lines changed: 0 additions & 28 deletions
This file was deleted.

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# MCP Server Examples
2+
3+
Built using pure [MCP Java SDK](https://github.com/modelcontextprotocol/java-sdk) – No Spring Framework Required.
4+
5+
For another easier way to develop your own MCP server, you can explore this [Annotation-driven MCP Java SDK](https://github.com/codeboyzhou/mcp-declarative-java-sdk).
6+
7+
## Requirements
8+
9+
- Java 17 or later (Restricted by MCP Java SDK)
10+
11+
## What is MCP?
12+
13+
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:
14+
15+
- Expose data through **Resources** (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
16+
- Provide functionality through **Tools** (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
17+
- Define interaction patterns through **Prompts** (reusable templates for LLM interactions)
18+
- And more!
19+
20+
You can start exploring everything about **MCP** from [here](https://modelcontextprotocol.io).
21+
22+
## Examples
23+
24+
If you are looking for servers implemented with Typescript MCP SDK or Python MCP SDK, see [here](https://github.com/modelcontextprotocol/servers).
25+
26+
These servers aim to demonstrate MCP features and the MCP Java SDK.
27+
28+
- [Filesystem](https://github.com/codeboyzhou/mcp-java-sdk-examples/blob/main/mcp-server-filesystem/README.md) - Secure file operations with configurable access controls
Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,55 @@
1-
= Filesystem MCP Server
1+
# Filesystem MCP Server
22

33
Java server implementing Model Context Protocol (MCP) for filesystem operations.
44

5-
== Features
5+
## Features
66

77
- Read file from the local filesystem.
88
- List files of a directory from the local filesystem.
99

10-
*Note*: The server will only allow operations within directories specified via `env`.
10+
**Note**: The server will only allow operations within directories specified via `env`.
1111

12-
== API
12+
## API
1313

14-
=== Resources
14+
### Resources
1515

1616
- `file://system`: File system operations interface.
1717

18-
=== Tools
18+
### Tools
1919

20-
- *read_file*
21-
* Read complete file contents with UTF-8 encoding.
22-
* Input:
23-
** `path` (string): The filepath to read, required.
24-
* Output: Complete file contents with UTF-8 encoding.
20+
- **read_file**
21+
- Read complete file contents with UTF-8 encoding.
22+
- Input:
23+
* `path` (string): The filepath to read, required.
24+
- Output: Complete file contents with UTF-8 encoding.
2525

26-
- *list_files*
27-
* List files of a directory.
28-
* Input:
29-
** `path` (string): The directory path to read, required.
30-
** `pattern` (string): Regular expression to filter files, optional, default is empty, means no filter.
31-
** `recursive` (boolean): Whether to list files recursively, optional, default is `false`.
32-
* Output: A list of file names (paths if 'recursive' is `true`), or empty string if no files found.
26+
- **list_files**
27+
- List files of a directory.
28+
- Input:
29+
* `path` (string): The directory path to read, required.
30+
* `pattern` (string): Regular expression to filter files, optional, default is empty, means no filter.
31+
* `recursive` (boolean): Whether to list files recursively, optional, default is `false`.
32+
- Output: A list of file names (paths if 'recursive' is `true`), or empty string if no files found.
3333

34-
== Usage with MCP Client
34+
## Usage with MCP Client
3535

3636
You can use any MCP client such as Cursor (IDE) or Cline (VS Code plugin) to interact with MCP server.
3737

38-
=== Build
38+
### Build
3939

40-
[source,bash]
41-
----
40+
```bash
4241
mvn clean package
43-
----
42+
```
4443

45-
=== Configuration
44+
### Configuration
4645

47-
*Note*: The `env` configuration is optional for access control.
46+
**Note**: The `env` configuration is optional for access control.
4847

4948
`readable`: Read access control with regular expressions, format example: `["^/var/log/(app|sys)\.log$"]`.
5049

5150
`writable`: Write access control with regular expressions, format example: `["^/var/log/(app|sys)\.log$"]`.
5251

53-
[source,json]
54-
----
52+
```json
5553
{
5654
"mcpServers": {
5755
"mcp-server-filesystem": {
@@ -69,4 +67,4 @@ mvn clean package
6967
}
7068
}
7169
}
72-
----
70+
```

0 commit comments

Comments
 (0)