MCP server for editing RFC documents using rfc-editor library
Project description
mcp-rfc-editor
An MCP (Model Context Protocol) server for editing RFC TXT documents using the rfc-editor Python library.
Installation
pip install mcp-rfc-editor
Usage
CLI
python -m mcp_rfc_editor
Programmatic
from mcp_rfc_editor import main
main()
MCP Tools
The server exposes the following tools:
load_rfc- Load and parse an RFC TXT file (creates session)download_rfc- Download an RFC from rfc-editor by ID (creates session)create_rfc- Create a new empty RFC document (creates session)get_document- Get the current document from session contextsave_rfc- Save an RFC document to TXT formatset_title- Set the document titleset_abstract- Set the document abstractadd_section- Add a new sectionupdate_section- Update an existing sectiondelete_section- Delete a sectionlist_sections- List all sections in the documentset_copyright- Set copyright noticeset_authors- Set document authorsto_dict- Convert document to dictionary
Session-Based Workflow
The server maintains session context so you don't need to pass the full document object on every call:
# 1. Download an RFC - returns Session ID
result = download_rfc(rfc_id="791")
# Returns: {document..., "Session ID": "abc-123"}
# 2. Use session ID to get title (no document needed)
get_title(session_id="abc-123")
# 3. Modify and changes are persisted
set_title(session_id="abc-123", title="New Title")
Alternatively, you can always pass the full document object directly (legacy mode).
Development
Requirements
- Python 3.11+
- mcp
- rfc-editor
Setup
pip install -e ".[dev]"
Testing
pytest tests/
Linting
black src/ tests/
ruff check src/ tests/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_rfc_editor-0.1.1.tar.gz.
File metadata
- Download URL: mcp_rfc_editor-0.1.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57bea0442e75d23883ebdc2c17c348c64f4c7d78614892357702632aa0bb4629
|
|
| MD5 |
3eb302c353edaf47e2f4571e9dd875d2
|
|
| BLAKE2b-256 |
03f508626e77f813c0e3cda45eea9804683c7ed0f996931f0222cd25c16db1c5
|
Provenance
The following attestation bundles were made for mcp_rfc_editor-0.1.1.tar.gz:
Publisher:
pypi-publish.yml on daedalus/mcp-rfc-editor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_rfc_editor-0.1.1.tar.gz -
Subject digest:
57bea0442e75d23883ebdc2c17c348c64f4c7d78614892357702632aa0bb4629 - Sigstore transparency entry: 1181950647
- Sigstore integration time:
-
Permalink:
daedalus/mcp-rfc-editor@53552e6b3bffcd8d16dbb5317382f8bcf16ae953 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/daedalus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@53552e6b3bffcd8d16dbb5317382f8bcf16ae953 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_rfc_editor-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mcp_rfc_editor-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d584656d5ab949d1ea1282e99b5d26d7e8520d193bcad2b383df492c192e594
|
|
| MD5 |
a4c1dfd84d522112ce6b2d720a0aef17
|
|
| BLAKE2b-256 |
e95b164b52fdba6a9648b8bbe612ca765cf90d055c6235db18cacc315586f548
|
Provenance
The following attestation bundles were made for mcp_rfc_editor-0.1.1-py3-none-any.whl:
Publisher:
pypi-publish.yml on daedalus/mcp-rfc-editor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_rfc_editor-0.1.1-py3-none-any.whl -
Subject digest:
3d584656d5ab949d1ea1282e99b5d26d7e8520d193bcad2b383df492c192e594 - Sigstore transparency entry: 1181950658
- Sigstore integration time:
-
Permalink:
daedalus/mcp-rfc-editor@53552e6b3bffcd8d16dbb5317382f8bcf16ae953 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/daedalus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@53552e6b3bffcd8d16dbb5317382f8bcf16ae953 -
Trigger Event:
release
-
Statement type: